Bug #921
openswap16, swap32 not in gnu-libstdc++
100%
Description
I tried to use crystax as a drop-in replacement to build our project.
A dependency of our project is GnuTLS 3.3, Using the vanilla NDK, GnuTLS compiles and links fine.
With CrystaX, GnuTLS compiles successfully, however when linking with it the following error happens:
libtool: link: arm-linux-androideabi-g++ --sysroot=/home/adrien/crystax-ndk-10.1.0/platforms/android-15/arch-arm -g -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -O2 -DHAVE_PTHREADS -I/home/adrien/crystax-ndk-10.1.0/sources/cxx-stl/gnu-libstdc++/4.9/include -I/home/adrien/crystax-ndk-10.1.0/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -DNDEBUG -I/home/adrien/sfl/ring-client-android/ring/contrib/arm-linux-androideabi/include -g -g -fPIC -O3 -std=c++11 -march=armv7-a -Wl,--fix-cortex-a8 -o dhtnode dhtnode.o /home/adrien/sfl/ring-client-android/ring/contrib/native/opendht/src/.libs/libopendht.a -L/home/adrien/crystax-ndk-10.1.0/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/adrien/sfl/ring-client-android/ring/contrib/arm-linux-androideabi/lib -L../src/.libs /home/adrien/sfl/ring-client-android/ring/contrib/arm-linux-androideabi/lib/libgnutls.a -lnettle -lhogweed -lz /home/adrien/sfl/ring-client-android/ring/contrib/arm-linux-androideabi/lib/libgmp.a -lgnustl_static
./gnutls_num.h:87: error: undefined reference to 'swap32'
./gnutls_num.h:111: error: undefined reference to 'swap32'
./gnutls_num.h:130: error: undefined reference to 'swap16'
./gnutls_num.h:102: error: undefined reference to 'swap32'
./../gnutls_num.h:102: error: undefined reference to 'swap32'
./../gnutls_num.h:121: error: undefined reference to 'swap16'
./../gnutls_num.h:121: error: undefined reference to 'swap16'
./../gnutls_num.h:130: error: undefined reference to 'swap16'
collect2: error: ld returned 1 exit status
Updated by Dmitry M. about 9 years ago
- Status changed from Open to Waiting for feedback
- Assignee set to Dmitry M.
This is fixed in @master@ branch: https://github.com/crystax/android-platform-ndk/commit/04aa6c35c4c17f38d49d663fb743f685f4defd2f
This fix will be included to the upcoming 10.2 release.
In the meantime, you can manually replace @sources/crystax/include/endian.h@ and @platforms/android-$APILEVEL/arch-$ARCH/usr/include/endian.h@ by "this one":https://github.com/crystax/android-platform-ndk/blob/master/sources/crystax/include/endian.h. This should fix the linking problem.
Updated by Adrien B. about 9 years ago
Many thanks :-)
This bug is a duplicate of https://tracker.crystax.net/issues/876
Updated by Dmitry M. about 9 years ago
- Status changed from Waiting for feedback to Duplicated
- % Done changed from 0 to 100
Adrien BĂ©raud wrote:
Many thanks :-)
No problem.
This bug is a duplicate of https://tracker.crystax.net/issues/876
Exactly. So closing as 'duplicated'.