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

ld: cannot find -lc++ on NDK r18

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.5, 5.13.1
    • 5.11.2
    • Build System
    • None
    • Fedora 28
    • Android
    • 176a216f4f6c36c769e9b667c12717c277a003ca 56f949ad3ca8a13d9c49913bae1c9396946672e2

    Description

      I can't build Qt (qtbase submodule) for Android using Clang and NDK r18. Log:

      Command line: -v -confirm-license -opensource -prefix /home/alexey/projects/tremotesf-android/3rdparty/qt/install-armeabi-v7a -xplatform android-clang -c++std c++1z -android-ndk /home/alexey/Android/Sdk/ndk-bundle/ -android-sdk /home/alexey/Android/Sdk/ -android-ndk-host linux-x86_64 -android-arch armeabi-v7a -android-ndk-platform android-16 -nomake tests -nomake examples -no-dbus -no-gui -no-opengl -no-widgets -no-feature-animation -no-feature-bearermanagement -no-feature-big_codecs -no-feature-codecs -no-feature-commandlineparser -no-feature-datetimeparser -no-feature-dnslookup -no-feature-dom -no-feature-filesystemiterator -no-feature-filesystemwatcher -no-feature-ftp -no-feature-itemmodel -no-feature-itemmodeltester -no-feature-localserver -no-feature-mimetype -no-feature-networkdiskcache -no-feature-networkproxy -no-feature-process -no-feature-processenvironment -no-feature-sql -no-feature-regularexpression -no-feature-sharedmemory -no-feature-statemachine -no-feature-systemsemaphore -no-feature-temporaryfile -no-feature-testlib -no-feature-translation -no-feature-udpsocket -no-feature-xml -no-feature-xmlstream -openssl-linked -I/home/alexey/projects/tremotesf-android/3rdparty/openssl/install-armeabi-v7a/include
      
      This is the Qt Open Source Edition.
      
      You have already accepted the terms of the Open Source license.
      
      Running configuration tests...
      
      + cd /home/alexey/projects/tremotesf-android/3rdparty/qt/build-armeabi-v7a/config.tests && /home/alexey/Android/Sdk/ndk-bundle//toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -D__ANDROID_API__=16 -target armv7-none-linux-androideabi -gcc-toolchain /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -DANDROID_HAS_WSTRING --sysroot=/home/alexey/Android/Sdk/ndk-bundle//sysroot -isystem /home/alexey/Android/Sdk/ndk-bundle//sysroot/usr/include/arm-linux-androideabi -isystem /home/alexey/Android/Sdk/ndk-bundle//sources/cxx-stl/llvm-libc++/include -isystem /home/alexey/Android/Sdk/ndk-bundle//sources/android/support/include -isystem /home/alexey/Android/Sdk/ndk-bundle//sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -fuse-ld=gold -o conftest-out conftest.cpp
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot open crtbegin_dynamic.o: Нет такого файла или каталога
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot open crtend_android.o: Нет такого файла или каталога
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -lstdc++
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -lm
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -ldl
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -lc
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -ldl
      > clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      Checking for valid makespec... 
      + cd /home/alexey/projects/tremotesf-android/3rdparty/qt/build-armeabi-v7a/config.tests/verifyspec && /home/alexey/projects/tremotesf-android/3rdparty/qt/build-armeabi-v7a/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'INCLUDEPATH += /home/alexey/projects/tremotesf-android/3rdparty/openssl/install-armeabi-v7a/include' -early "CONFIG += cross_compile" /home/alexey/projects/tremotesf-android/3rdparty/qt/qtbase/config.tests/verifyspec
      + cd /home/alexey/projects/tremotesf-android/3rdparty/qt/build-armeabi-v7a/config.tests/verifyspec && MAKEFLAGS= /usr/bin/gmake clean && MAKEFLAGS= /usr/bin/gmake
      > rm -f verifyspec.o
      > rm -f *~ core *.core
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -D__ANDROID_API__=16 -target armv7-none-linux-androideabi -gcc-toolchain /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -DANDROID_HAS_WSTRING --sysroot=/home/alexey/Android/Sdk/ndk-bundle//sysroot -isystem /home/alexey/Android/Sdk/ndk-bundle//sysroot/usr/include/arm-linux-androideabi -isystem /home/alexey/Android/Sdk/ndk-bundle//sources/cxx-stl/llvm-libc++/include -isystem /home/alexey/Android/Sdk/ndk-bundle//sources/android/support/include -isystem /home/alexey/Android/Sdk/ndk-bundle//sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -mthumb -Oz -fPIC  -I/home/alexey/projects/tremotesf-android/3rdparty/qt/qtbase/config.tests/verifyspec -I. -I/home/alexey/projects/tremotesf-android/3rdparty/openssl/install-armeabi-v7a/include -I/home/alexey/projects/tremotesf-android/3rdparty/qt/qtbase/mkspecs/android-clang -o verifyspec.o /home/alexey/projects/tremotesf-android/3rdparty/qt/qtbase/config.tests/verifyspec/verifyspec.cpp
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -D__ANDROID_API__=16 -target armv7-none-linux-androideabi -gcc-toolchain /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -Wl,--exclude-libs,libgcc.a --sysroot=/home/alexey/Android/Sdk/ndk-bundle//platforms/android-16/arch-arm/ -Wl,-soname,libverifyspec.so -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libverifyspec.so verifyspec.o   -L/home/alexey/Android/Sdk/ndk-bundle//sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -lc++ -llog -lz -lm -ldl -lc
      > /home/alexey/Android/Sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc++
      > clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      > gmake: *** [Makefile:66: libverifyspec.so] Ошибка 1
      Note: Also available for Linux: linux-clang linux-icc
      
      ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
      

      On NDK r17b it builds fine (using clang).

      Attachments

        Issue Links

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

          Activity

            People

              buddenha Oswald Buddenhagen
              equeim Alexey
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes