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

android cmake: ignore symlinks to match toolchain machine name #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aleksander0m
Copy link

If the NDK contains more than one file suffixed with -gcc, it will
fail to detect the toolchain machine name, as the logic expects only
one result.

Just ignore the any symlink we may have when listing the -gcc suffixed
files.:

ls -l /opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/*-gcc
/opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc
/opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-gcc -> arm-linux-androideabi-gcc

If the NDK contains more than one file suffixed with -gcc, it will
fail to detect the toolchain machine name, as the logic expects only
one result.

Just ignore the any symlink we may have when listing the -gcc suffixed
files.:

ls -l /opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/*-gcc
    /opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc
    /opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-gcc -> arm-linux-androideabi-gcc
@ao2
Copy link

ao2 commented Sep 4, 2020

This would be a very welcome addition, and would save people some time.
I came up with something similar when trying to build a project with ANDROID_API_LEVEL=21 and only found this PR later on when trying to report the issue.

Thanks anyway @aleksander0m

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

Successfully merging this pull request may close these issues.

2 participants