Monday 15 August 2011

android - arm-linux-androideabi/bin/ld: fatal error: -soname: must take a non-empty argument -



android - arm-linux-androideabi/bin/ld: fatal error: -soname: must take a non-empty argument -

i cross compiling gdcm cmake android goes till end of compilation @ lastly next error. how guys set -soname in cmake-gui or cmake while compiling libraries can avoid below kind of error.

/opt/android/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux- androideabi/bin/ld: fatal error: -soname: must take non-empty argument collect2: error: ld returned 1 exit status make[2]: *** [/home/likewise-open/slktechlabs/kirtan.patel/desktop/gdcm/gdcmsource/libs/armeabi-v7a/libgdcmjni.so] error 1 make[1]: *** [wrapping/java/cmakefiles/gdcmjni.dir/all] error 2 make[1]: *** waiting unfinished jobs.... /home/kirtan.patel/desktop/gdcm/gdcmsource/source/mediastorageandfileformat/gdcmimagewriter.h:36: warning 822: covariant homecoming types not supported in java. proxy method homecoming gdcm::pixmap const &. /home/kirtan.patel/desktop/gdcm/gdcmsource/source/mediastorageandfileformat/gdcmimagecodec.h:45: warning 473: returning pointer or reference in director method not recommended.

as romanski pointed out cmake versions 3.2 , 3.0 have different behaviour because of difference in useswig.cmake files. in 3.2 no_soname property enabled default looks raises conflict in android build producing invalid linking alternative -wl,-soname, empty target_soname.

there 2 ways prepare build 3.2 version

string(replace "<cmake_shared_library_soname_cxx_flag><target_soname>" "" cmake_cxx_create_shared_module "${cmake_cxx_create_shared_module}") eliminates broken linking alternative @ all set_target_properties(${my_target} properties no_soname off) prepare broken linking alternative right so-name.

android c++ android-ndk cmake

No comments:

Post a Comment