ast@superstar ~/src/sfml-tmxloader/build/armeabi-v7a $ make VERBOSE=1 pugi
...
Linking CXX shared library libpugi.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/pugi.dir/link.txt --verbose=1
/home/ast/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -fPIC -fexceptions -frtti -fpic -Wno-psabi --sysroot=/home/ast/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack -std=c++11 -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-allow-shlib-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libpugi.so -o libpugi.so CMakeFiles/pugi.dir/src/pugixml/pugixml.cpp.o -L/home/ast/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/user/libs/armeabi-v7a /home/ast/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm/usr/lib/libm.so /home/ast/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm/usr/lib/libz.so "/home/ast/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a" "/home/ast/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libsupc++.a" -lm
CMakeFiles/pugi.dir/src/pugixml/pugixml.cpp.o:pugixml.cpp:function pugi::impl::(anonymous namespace)::is_nan(double): error: undefined reference to '__fpclassifyd'
CMakeFiles/pugi.dir/src/pugixml/pugixml.cpp.o:pugixml.cpp:function pugi::impl::(anonymous namespace)::convert_number_to_string_special(double): error: undefined reference to '__fpclassifyd'
collect2: error: ld returned 1 exit status
make[3]: *** [libpugi.so] Error 1
make[3]: Leaving directory `/home/ast/src/sfml-tmxloader/build/armeabi-v7a'
make[2]: *** [CMakeFiles/pugi.dir/all] Error 2
make[2]: Leaving directory `/home/ast/src/sfml-tmxloader/build/armeabi-v7a'
make[1]: *** [CMakeFiles/pugi.dir/rule] Error 2
make[1]: Leaving directory `/home/ast/src/sfml-tmxloader/build/armeabi-v7a'
make: *** [pugi] Error 2
ast@superstar ~/src/sfml-tmxloader/build/armeabi-v7a $
There was libm.so with full path, which I added by hand:
-L ... /home/ast/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm/usr/lib/libm.so
But still it did not found the '__fpclassifyd'. There was also -lm in the end, which I think links the math library normally (works perfectly when building for Linux desktop).
If I check what libm's are present in the referenced directory I find couple.
ast@superstar ~/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm/usr/lib $ ls -lh libm*
-rw-r--r-- 1 ast ast 973K maali 10 15:56 libm.a
-rw-r--r-- 1 ast ast 1,3M maali 10 15:55 libm_hard.a
-rwxr-xr-x 1 ast ast 13K maali 10 15:57 libm.so
ast@superstar ~/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm/usr/lib $
Grepping the missing function finds it in static libraries. The shared library does not match but it is only 13K so I guess the actual binary code is somewhere else. (where?)
ast@superstar ~/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm/usr/lib $ grep __fpclassifyd *
Binary file libm.a matches
Binary file libm_hard.a matches
ast@superstar ~/Android/Sdk/ndk-bundle/platforms/android-8/arch-arm/usr/lib $
Any of the tons of sfml android developers there ever stumbled on similar problems?
It seems likely that all these cmake woes are caused by some false configuration. Would just like to know what..