Skip to content Skip to sidebar Skip to footer

Libgdal.so Android Error: Could Not Load Library "libgdal.so.1"

My problem is the following: I have succesfully built GDAL 1.10.1 using an Android toolchain (CC=i686-linux-android-gcc, CXX=i686-linux-android-c++) that produces the following out

Solution 1:

After several days of trials and errors (mainly errors) I have found a solution to my problem.

I'm writing it as an answer to my question so that it may be helpful to others.

The problem was during the link-time of GDAL. Briefly: the linker created the "real name" shared library libgdal.so.1.17.1 together with the links to it libgdal.so.1 and libgdal.so.

For some reasons (which I ignore) forcing the link to libgdal.so, the linker searches for libgdal.so.1 (which, in turn, would have searched for libgdal.so.1.17.1).

The workaround that solved my problem can be summarized in the following steps:

  1. In the GDAL root, run the ./configure according to the desired configuration (see http://trac.osgeo.org/gdal/wiki/BuildingForAndroid) checking that libtool is ENABLED

  2. Edit the created libtool file (e. g. with gedit) as follows:

    • replace the value of library_names_spec with library_names_spec="\$libname\${shared_ext}"
    • replace the value of soname_spec with soname_spec=""
  3. Type make

In the output folder .libs/ the only libgdal.so will be created and now the link to libgdal.so seems to work fine.

Post a Comment for "Libgdal.so Android Error: Could Not Load Library "libgdal.so.1""