Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70673

broken mkspec compile test for android ndk r18 on qtbase (missing libc++abi) or perhaps libunwind?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.11.0, 5.12.0 Alpha
    • Extras: Android
    • None
    • Android

    Description

      Generated (correct) reference sample ndk-build libc++_static clang invocation :

       

      d:/android_ndk_r18/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -Wl,--gc-sections -Wl,-z,nocopyreloc --sysroot=d:/android_ndk_r18/build//../platforms/android-16/arch-x86 -Wl,-rpath-link=d:/android_ndk_r18/build//../platforms/android-16/arch-x86/usr/lib -Wl,-rpath-link=./obj/local/x86 ./obj/local/x86/objs/program/test.o ./obj/local/x86/objs/program/test_fn.o d:/android_ndk_r18/build//../sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a d:/android_ndk_r18/build//../sources/cxx-stl/llvm-libc++abi/../llvm-libc++/libs/x86/libc++abi.a d:/android_ndk_r18/build//../sources/android/support/../../cxx-stl/llvm-libc++/libs/x86/libandroid_support.a -lgcc -Wl,--exclude-libs,libgcc.a -latomic -Wl,--exclude-libs,libatomic.a -target i686-none-linux-android16 -no-canonical-prefixes   -gcc-toolchain d:/android_ndk_r18/build//../toolchains/x86-4.9/prebuilt/windows-x86_64   -Wl,--build-id -nostdlib++ -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -fPIE -pie   -lc -lm -o ./obj/local/x86/program
      

       

      Currently qt generated mkspec is as following one:

      > d:/android_ndk_r18/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -D__ANDROID_API__=16 -target armv7-none-linux-androideabi -gcc-toolchain d:/android_ndk_r18/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 -Wl,--exclude-libs,libgcc.a --sysroot=d:/android_ndk_r18/platforms/android-16/arch-arm/ -Wl,-soname,libc++1z.so -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libc++1z.so main.obj   -Ld:/android_ndk_r18/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -lc++_static -llog -lz -lm -ldl -lc
      > main.obj:main.cpp:function main: error: undefined reference to '__cxa_allocate_exception'
      > main.obj:main.cpp:function main: error: undefined reference to '__cxa_throw'
      > main.obj:main.cpp:function main: error: undefined reference to 'std::exception::~exception()'
      
      

       

      So I think that this require static libcxx, +static libcxx+abi and libandroid_support (only when targeting android >=lollipop https://github.com/android-ndk/ndk/wiki/Changelog-r17) . I'm not sure libunwind would this be necessary here?

      Also the c++11 future test shall passed, since libpthread was bundled in libandroid_support https://developer.android.com/ndk/guides/stable_apis ?

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              jiraiya jiraiya sensei
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes