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

Linker error when building Qt for Android with LTCG enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.13.0
    • Build System
    • None
    • Ubuntu 18.04
    • Android

    Description

      Android NDK version is r20, full build log in attachment.

      /home/alexey/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -D__ANDROID_API__=21 -target aarch64-none-linux-android -gcc-toolchain /home/alexey/android-ndk-r20/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot=/home/alexey/android-ndk-r20/platforms/android-21/arch-arm64/ -Wl,--no-undefined -D__ANDROID_API__=21 -target aarch64-none-linux-android -gcc-toolchain /home/alexey/android-ndk-r20/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -fno-limit-debug-info -DANDROID_HAS_WSTRING --sysroot=/home/alexey/android-ndk-r20/sysroot -isystem /home/alexey/android-ndk-r20/sysroot/usr/include/aarch64-linux-android /home/alexey/android-ndk-r20/sources/cxx-stl/llvm-libc++/include /home/alexey/android-ndk-r20/sources/android/support/include /home/alexey/android-ndk-r20/sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -O3 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -flto -Wl,--no-undefined -Wl,-z,noexecstack -shared -fPIC -Wl,-soname,libQt5Core.so -o libQt5Core.so .obj/qversiontagging.o .obj/qendian.o .obj/qglobal.o .obj/qlibraryinfo.o .obj/qmalloc.o .obj/qnumeric.o .obj/qfloat16.o .obj/qoperatingsystemversion.o .obj/qlogging.o .obj/qrandom.o .obj/qhooks.o .obj/minimum-linux.o .obj/qrunnable.o .obj/qthread.o .obj/qthread_unix.o .obj/qatomic.o .obj/qmutex.o .obj/qmutexpool.o .obj/qreadwritelock.o .obj/qsemaphore.o .obj/qthreadpool.o .obj/qthreadstorage.o .obj/qwaitcondition_unix.o .obj/qexception.o .obj/qfutureinterface.o .obj/qfuturewatcher.o .obj/qresultstore.o .obj/qarraydata.o .obj/qbitarray.o .obj/qbytearray.o .obj/qbytearraylist.o .obj/qbytearraymatcher.o .obj/qcollator.o .obj/qcryptographichash.o .obj/qdatetime.o .obj/qeasingcurve.o .obj/qfreelist.o .obj/qhash.o .obj/qline.o .obj/qlinkedlist.o .obj/qlist.o .obj/qlocale.o .obj/qlocale_tools.o .obj/qpoint.o .obj/qmap.o .obj/qmargins.o .obj/qmessageauthenticationcode.o .obj/qcontiguouscache.o .obj/qrect.o .obj/qregexp.o .obj/qrefcount.o .obj/qringbuffer.o .obj/qshareddata.o .obj/qsharedpointer.o .obj/qsimd.o .obj/qsize.o .obj/qstring.o .obj/qstringbuilder.o .obj/qstringlist.o .obj/qstringview.o .obj/qtextboundaryfinder.o .obj/qtimeline.o .obj/qunicodetools.o .obj/qvsnprintf.o .obj/qversionnumber.o .obj/qlocale_unix.o .obj/qcollator_posix.o .obj/qtimezone.o .obj/qtimezoneprivate.o .obj/qtimezoneprivate_android.o .obj/harfbuzz-buffer.o .obj/harfbuzz-gdef.o .obj/harfbuzz-gsub.o .obj/harfbuzz-gpos.o .obj/harfbuzz-impl.o .obj/harfbuzz-open.o .obj/harfbuzz-stream.o .obj/harfbuzz-shaper-all.o .obj/qharfbuzz.o .obj/bignum.o .obj/bignum-dtoa.o .obj/cached-powers.o .obj/diy-fp.o .obj/double-conversion.o .obj/fast-dtoa.o .obj/fixed-dtoa.o .obj/strtod.o .obj/qabstractfileengine.o .obj/qbuffer.o .obj/qdataurl.o .obj/qtldurl.o .obj/qdebug.o .obj/qdir.o .obj/qdiriterator.o .obj/qfile.o .obj/qfiledevice.o .obj/qfileinfo.o .obj/qipaddress.o .obj/qiodevice.o .obj/qlockfile.o .obj/qnoncontiguousbytedevice.o .obj/qstorageinfo.o .obj/qtemporarydir.o .obj/qtemporaryfile.o .obj/qresource.o .obj/qresource_iterator.o .obj/qsavefile.o .obj/qstandardpaths.o .obj/qurl.o .obj/qurlidna.o .obj/qurlquery.o .obj/qurlrecode.o .obj/qfsfileengine.o .obj/qfsfileengine_iterator.o .obj/qfilesystementry.o .obj/qfilesystemengine.o .obj/qfileselector.o .obj/qloggingcategory.o .obj/qloggingregistry.o .obj/qfsfileengine_unix.o .obj/qfilesystemengine_unix.o .obj/qlockfile_unix.o .obj/qfilesystemiterator_unix.o .obj/forkfd_qt.o .obj/qstandardpaths_android.o .obj/qstorageinfo_unix.o .obj/qfactoryinterface.o .obj/qpluginloader.o .obj/qfactoryloader.o .obj/quuid.o .obj/qlibrary.o .obj/qelfparser_p.o .obj/qmachparser.o .obj/qlibrary_unix.o .obj/qabstracteventdispatcher.o .obj/qabstractnativeeventfilter.o .obj/qbasictimer.o .obj/qdeadlinetimer.o .obj/qelapsedtimer.o .obj/qeventloop.o .obj/qcoreapplication.o .obj/qcoreevent.o .obj/qmetaobject.o .obj/qmetatype.o .obj/qmetaobjectbuilder.o .obj/qmimedata.o .obj/qobject.o .obj/qobjectcleanuphandler.o .obj/qsignalmapper.o .obj/qsocketnotifier.o .obj/qtimer.o .obj/qtranslator.o .obj/qvariant.o .obj/qcoreglobaldata.o .obj/qsharedmemory.o .obj/qsystemsemaphore.o .obj/qpointer.o .obj/qmath.o .obj/qsystemerror.o .obj/qtestsupport_core.o .obj/qcore_unix.o .obj/qeventdispatcher_unix.o .obj/qtimerinfo_unix.o .obj/qelapsedtimer_unix.o .obj/qsharedmemory_android.o .obj/qsystemsemaphore_android.o .obj/qjnionload.o .obj/qjnihelpers.o .obj/qjni.o .obj/qutfcodec.o .obj/qcborstream.o .obj/qcbordiagnostic.o .obj/qcborvalue.o .obj/qdatastream.o .obj/qjson.o .obj/qjsoncbor.o .obj/qjsondocument.o .obj/qjsonobject.o .obj/qjsonarray.o .obj/qjsonvalue.o .obj/qjsonwriter.o .obj/qjsonparser.o .obj/qtextstream.o .obj/qxmlstream.o .obj/qxmlutils.o .obj/qstring_compat.o .obj/qfloat16tables.o   -lm /home/alexey/android-ndk-r20/platforms/android-21/arch-arm64/usr/lib/libz.so -L/home/alexey/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/arm64-v8a /home/alexey/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++.so.21 -llog -lz -lm -ldl -lc 
      /home/alexey/android-ndk-r20/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find crtbegin_so.o: No such file or directory
      /home/alexey/android-ndk-r20/sources/cxx-stl/llvm-libc++/include: file not recognized: Is a directory
      clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      Makefile:955: recipe for target '../../lib/libQt5Core.so' failed
      

      Attachments

        1. ndk-r19.patch
          6 kB
        2. build.log.txt
          968 kB

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              equeim Alexey
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes