-
Notifications
You must be signed in to change notification settings - Fork 257
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
[BUG] Bionic - undefined reference to 'operator new(unsigned int)' #1130
Comments
What's in the build.gradle? There's nothing obviously wrong from what I can see in that project, and without the rest of the project we can't reproduce the error. |
The repository to the full project: https://github.com/hypothermic/ValaAndroid |
Nothing immediately suspicious there either. I'll try building it later and see what I find. |
I have the same issue, when trying to compile xmllib2 for Android. |
@DanAlbert Hi, have you built it? |
I've been out sick for a couple weeks. Haven't had a chance. |
And when I was back I'd totally forgotten about this... sorry about that! Seems like this is an issue with using the static libc++ with anything that ends up using the locale code in libandroid_support? The linker script for libc++.a is I'm not sure why this wouldn't show up in testing. I suspect none of our tests use enough of libc++ to end up depending on locale code when using libc++_static? |
Make `android_support` and `c++abi` link order-agnostic to prevent link errors like `undefined reference to 'operator new(unsigned int)'`. Upstream issue in Android NDK r21: android/ndk#1130 ref:7fe1884295c588b137d1bfa7954051e536c3566c
https://android-review.googlesource.com/c/platform/ndk/+/1326079 fixes the linker scripts. A bit more testing revealed that this is also fixed by just using LLD since it'll re-search earlier libraries for missing symbols, so this would have gone away for most users in r22 anyway :) Apparently this has actually been broken since r17. I guess most code does a pretty good job of avoiding |
Make `android_support` and `c++abi` link order-agnostic to prevent link errors like `undefined reference to 'operator new(unsigned int)'`. Upstream issue in Android NDK r21: android/ndk#1130 ref:7fe1884295c588b137d1bfa7954051e536c3566c
We are using LLD and NDK r23 at the time. [This issue](android/ndk#1130) should be fixed. ref:52e634c8ea6cccb53897f4dbf3ff49ea9ee4f949
Make `android_support` and `c++abi` link order-agnostic to prevent link errors like `undefined reference to 'operator new(unsigned int)'`. Upstream issue in Android NDK r21: android/ndk#1130 ref:7fe1884295c588b137d1bfa7954051e536c3566c
We are using LLD and NDK r23 at the time. [This issue](android/ndk#1130) should be fixed. ref:52e634c8ea6cccb53897f4dbf3ff49ea9ee4f949
Description
Compiler gives the following error when building:
Project "app/src/cpp" folder: https://github.com/hypothermic/bionic-bug-repro
Using cmake version 3.10.2
Environment Details
The text was updated successfully, but these errors were encountered: