Project

General

Profile

Actions

Bug #921

closed

swap16, swap32 not in gnu-libstdc++

Added by Adrien Béraud about 6 years ago. Updated about 6 years ago.

Status:
Duplicated
Priority:
Normal
Category:
build
Target version:
-
Start date:
04/08/2015
Due date:
% Done:

100%

Estimated time:
CPU Architecture:
arm
Host OS:
Linux
Toolchain:
gcc-4.9
Android version:
4.0.3 (android-15)
CrystaX Version:

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

Actions #1

Updated by Dmitry Moskalchuk about 6 years ago

  • Status changed from Open to Waiting for feedback
  • Assignee set to Dmitry Moskalchuk

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.

Actions #2

Updated by Adrien Béraud about 6 years ago

Many thanks :-)
This bug is a duplicate of https://tracker.crystax.net/issues/876

Actions #3

Updated by Dmitry Moskalchuk about 6 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'.

Actions

Also available in: Atom PDF