I see on the Android NDK page that libc++ can cause crashes on ARM when uses c++_shared as its STL, but it says nothing about c++_static. Does c++_static have the same problem? Throwing an exception causes an abort for me despite being compiled with -fexceptions when using c++_static on an armv7 device. libstdc++ doesn't have this problem but libstdc++ is destroyed by c++11 because GCC couldn't actually comply with it until GCC 5.x it seems so I can't use it. Is there something I am missing here? The same thing happens in both 13b and 14-beta1.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3a0f5ced-f65c-46f4-b01d-f4894f8beab1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This hasn't been in our known issues list for a while and our tests are passing. Could you for a bug with a failing test case?
On Jan 27, 2017 07:27, "James Borden" <borr...@gmail.com> wrote:
I see on the Android NDK page that libc++ can cause crashes on ARM when uses c++_shared as its STL, but it says nothing about c++_static. Does c++_static have the same problem? Throwing an exception causes an abort for me despite being compiled with -fexceptions when using c++_static on an armv7 device. libstdc++ doesn't have this problem but libstdc++ is destroyed by c++11 because GCC couldn't actually comply with it until GCC 5.x it seems so I can't use it. Is there something I am missing here? The same thing happens in both 13b and 14-beta1.--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
Another piece of info is that r11c does not exhibit the same problems as r13b or r14beta1.
I am using CMake so that might be adding to it
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/2f943c2b-e312-4ab4-b4a5-3a7751b02a8c%40googlegroups.com.
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=16 -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_STL_TYPE=c++_static
I also do something similar for arm64-v8a (with SYSTEM_VERSION 21 instead) that shows the same problems. If I remember correctly it doesn't happen on x86 but I can double check that if it is helpful. Also this entire project is open source so I can provide some instructions for reproducing on that if it is helpful. Also not sure if this is relevant, but because I don't feel like dealing with APKs just to run some C++ unit tests (Eventually this will happen, but I'm actually a .NET developer and our Android developer is too busy at the moment), what I am doing is running a native executable from adb shell instead. Could that be causing this (The simple case is working in the same way though...)? Here is an excerpt from the generated commands from the Makefile:
Sample compile:
| /Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/platforms/android-16/arch-arm -DC4DB_THREADSAFE -DCMAKE -DSQLITE_OMIT_LOAD_EXTENSION -D_CRYPTO_OPENSSL -I/Users/borrrden/Development/couchbase-lite-core/vendor/fleece/Fleece -I/Users/borrrden/Development/couchbase-lite-core/vendor/fleece/vendor -I/Users/borrrden/Development/couchbase-lite-core/vendor/SQLiteCpp/include -I/Users/borrrden/Development/couchbase-lite-core/vendor/sqlite3-unicodesn -I/Users/borrrden/Development/couchbase-lite-core/vendor/openssl/libs/include -I/Users/borrrden/Development/couchbase-lite-core/vendor/SQLiteCpp/sqlite3 -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/Android -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/BlobStore -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/Database -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/Indexes -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/Query -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/RevTrees -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/Storage -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/Support -I/Users/borrrden/Development/couchbase-lite-core/LiteCore/VersionVectors -I/Users/borrrden/Development/couchbase-lite-core/C/include -I/Users/borrrden/Development/couchbase-lite-core/C -isystem /Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include -isystem /Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++abi/include -isystem /Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/android/support/include -march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -funwind-tables -no-canonical-prefixes -fexceptions -frtti -Os -DNDEBUG -fPIC -std=gnu++11 -o CMakeFiles/LiteCoreStatic.dir/LiteCore/Indexes/Index.cc.o -c /Users/borrrden/Development/couchbase-lite-core/LiteCore/Indexes/Index.cc
Link command for shared lib:
| /Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/platforms/android-16/arch-arm -fPIC -march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -funwind-tables -no-canonical-prefixes -fexceptions -frtti -Os -DNDEBUG -Wl,--fix-cortex-a8 -shared -Wl,-soname,libLiteCore.so -o libLiteCore.so CMakeFiles/LiteCore.dir/empty.cpp.o -Wl,--whole-archive libLiteCoreStatic.a vendor/fleece/libFleeceStatic.a vendor/sqlite3-unicodesn/libSQLite3_UnicodeSN.a -Wl,--no-whole-archive libsqlite3.so ../../../vendor/openssl/libs/android/clang/armeabi-v7a//libcrypto.a -latomic -llog "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a" "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a" "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a" "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a" -latomic
Link command for test runner executable
| /Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/platforms/android-16/arch-arm -march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -funwind-tables -no-canonical-prefixes -fexceptions -frtti -Os -DNDEBUG -Wl,--fix-cortex-a8 -fPIE -pie -Wl,--gc-sections -Wl,-z,nocopyreloc CMakeFiles/C4Tests.dir/c4AllDocsPerformanceTest.cc.o CMakeFiles/C4Tests.dir/c4BlobStoreTest.cc.o CMakeFiles/C4Tests.dir/c4DatabaseTest.cc.o CMakeFiles/C4Tests.dir/c4DocumentTest.cc.o CMakeFiles/C4Tests.dir/c4KeyTest.cc.o CMakeFiles/C4Tests.dir/c4ObserverTest.cc.o CMakeFiles/C4Tests.dir/c4PerfTest.cc.o CMakeFiles/C4Tests.dir/c4QueryTest.cc.o CMakeFiles/C4Tests.dir/c4Test.cc.o CMakeFiles/C4Tests.dir/c4ThreadingTest.cc.o CMakeFiles/C4Tests.dir/c4ViewTest.cc.o CMakeFiles/C4Tests.dir/__/__/LiteCore/tests/main.cpp.o CMakeFiles/C4Tests.dir/__/__/LiteCore/Support/Logging.cc.o -o C4Tests ../../libLiteCore.so -llog ../../libsqlite3.so "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a" "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a" "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a" "/Users/borrrden/Library/Developer/Xamarin/android-ndk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a" -latomic
I'm willing to file a bug report with the compiled runner (and link to sources) if you think it will be helpful
Another piece of info is that r11c does not exhibit the same problems as r13b or r14beta1.I did make some changes in how libc++ gets linked in r12, but that was specifically to fix this sort of problem.I am using CMake so that might be adding to itWhich version of Studio are you using? New versions will use the cmake toolchain that we ship in the NDK, but earlier versions will use Studio's copy (and idk if it has the libc++ exception fixes). The cmake paths are less well tested on the NDK end, so it wouldn't be surprising if that had something to do with it. I'll poke at it a bit too.
On Fri, Jan 27, 2017 at 4:02 PM, James Borden <borr...@gmail.com> wrote:
I'll work on trying to get a more simple test case but so far have been unsuccessful in reproducing the issue. I suspect something in my setup is causing the issues but I can't figure out what it could be or how to get more info about it.--Another piece of info is that r11c does not exhibit the same problems as r13b or r14beta1. I am using CMake so that might be adding to it but when I run a verbose make I notice -fexceptions getting passed and the __cpp_exceptions compiler define is present.
On Saturday, January 28, 2017 at 3:44:57 AM UTC+9, Dan Albert wrote:This hasn't been in our known issues list for a while and our tests are passing. Could you for a bug with a failing test case?On Jan 27, 2017 07:27, "James Borden" <borr...@gmail.com> wrote:I see on the Android NDK page that libc++ can cause crashes on ARM when uses c++_shared as its STL, but it says nothing about c++_static. Does c++_static have the same problem? Throwing an exception causes an abort for me despite being compiled with -fexceptions when using c++_static on an armv7 device. libstdc++ doesn't have this problem but libstdc++ is destroyed by c++11 because GCC couldn't actually comply with it until GCC 5.x it seems so I can't use it. Is there something I am missing here? The same thing happens in both 13b and 14-beta1.--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3a0f5ced-f65c-46f4-b01d-f4894f8beab1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/47d10b2a-f03d-4d00-bf09-075effef2d7c%40googlegroups.com.
There were definitely bugs fixed for libc++ exception handling in r12 and r13. That doesn't mean we got all of them. The only way to know is to try.
On Thu, Mar 2, 2017 at 10:16 AM, Brendan Cordingley <cordingle...@gmail.com> wrote:
I'm having this problem as well, currently using r11. If I get a more recent version, will this fix the issue?
On Friday, January 27, 2017 at 9:27:26 AM UTC-6, James Borden wrote:I see on the Android NDK page that libc++ can cause crashes on ARM when uses c++_shared as its STL, but it says nothing about c++_static. Does c++_static have the same problem? Throwing an exception causes an abort for me despite being compiled with -fexceptions when using c++_static on an armv7 device. libstdc++ doesn't have this problem but libstdc++ is destroyed by c++11 because GCC couldn't actually comply with it until GCC 5.x it seems so I can't use it. Is there something I am missing here? The same thing happens in both 13b and 14-beta1.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.