-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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 build fails with ld: error: undefined symbol: aligned_alloc #973
Comments
We need to pass |
I'd like to note that this is compiled on my Mac, for a different architecture and system => Android. |
Try if using this helps:
|
@prusnak new command is cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 -DCMAKE_C_FLAGS="-std=c11 -march=armv8.4a+dotprod" .. but the same error is shown |
Try building the |
It looks like the code compiles now, I'll verify if I can get it working on
my phone now. Cheers!
…On Sat, Apr 15, 2023 at 11:36 PM Pavol Rusnak ***@***.***> wrote:
Try building the master branch now - it contains aa485ce
<aa485ce>
which replaces aligned_alloc with posix_memalign.
—
Reply to this email directly, view it on GitHub
<#973 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFJABKIN4JTUEU2M5PN4U3XBMIFNANCNFSM6AAAAAAW6WVCCU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Compile for android.
Current Behavior
An error message when running make
Environment and Context
Mac OSX M2 Air
Installed latest NDK, exported as NDK=/Users/blewandowski/Library/Android/sdk/ndk/25.2.9519653
then followed instructions in the README
$ mkdir build-android
$ cd build-android
$ export NDK=<your_ndk_directory>
$ cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 -DCMAKE_C_FLAGS=-march=armv8.4a+dotprod ..
$ make
The text was updated successfully, but these errors were encountered: