Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86_64 prebuilt libraries are not linking correctly #47

Closed
cmaster11 opened this issue Mar 25, 2016 · 2 comments
Closed

x86_64 prebuilt libraries are not linking correctly #47

cmaster11 opened this issue Mar 25, 2016 · 2 comments
Assignees

Comments

@cmaster11
Copy link

While building a x86_64 app, with following settings:

// Toolchain config
-DANDROID_TOOLCHAIN_NAME=x86_64-4.9 -DANDROID_ABI=x86_64

// CMake config
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -std=c++0x -fPIC")

Following errors appear:

/opt/android/ndk/android-ndk-r11/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/x86_64-linux-android/4.9/../../../../x86_64-linux-android/bin/ld: warning: skipping incompatible /opt/android/ndk/android-ndk-r11/platforms/android-21/arch-x86_64/usr/lib/libm.so while searching for m
/opt/android/ndk/android-ndk-r11/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/x86_64-linux-android/4.9/../../../../x86_64-linux-android/bin/ld: warning: skipping incompatible /opt/android/ndk/android-ndk-r11/platforms/android-21/arch-x86_64/usr/lib/libc.so while searching for c
/opt/android/ndk/android-ndk-r11/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/x86_64-linux-android/4.9/../../../../x86_64-linux-android/bin/ld: warning: skipping incompatible /opt/android/ndk/android-ndk-r11/platforms/android-21/arch-x86_64/usr/lib/libdl.so while searching for dl

If I create a symlink pointing to /opt/android/ndk/android-ndk-r11/platforms/android-21/arch-x86_64/usr/lib64, named /opt/android/ndk/android-ndk-r11/platforms/android-21/arch-x86_64/usr/lib (so, replacing the lib folder with the lib64 one), errors disappear and compile process works fine.

Is it just a toolchain config error, or am I missing something in the config?

@DanAlbert DanAlbert self-assigned this Mar 25, 2016
@DanAlbert
Copy link
Member

Did this work with r10e? I think this is something that should work, but knowing that would help track down the problem.

As a temporary workaround, you can use build/tools/make-standalone-toolchain.sh. It'll build a toolchain that can be used in this way. There are some known issues (read: it's pretty much broken) if you're using libc++ though.

@cmaster11
Copy link
Author

My bad, obsolete build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants