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

qtpdf linking: unable to find library -landroid_support

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • None
    • 6.7.0 Beta1
    • PDF
    • None

    Description

      I am trying to build QtPDF for Android.

      It used to work with Qt 6.6.1 & ndk r25b. With ndk r26b & qt 6.7.0 beta1 I get this:
       

      $ cmake --build debian/build-qtpdf-x86 -t qtwebengine/all
      
      [0/48] Running ninja for QtPdf in /mnt/packages/git_repos/dpkg/qt-android/debian/build-qtpdf-x86/qtwebengine/src/pdf/Release/i686
      
      ninja: Entering directory `/mnt/packages/git_repos/dpkg/qt-android/debian/build-qtpdf-x86/qtwebengine/src/pdf/Release/i686'
      
      ninja: no work to do.
      
      [1/48] Check QtWebEngine support
      
      QtWebEngine will not be built: Build can be done only on Linux, Windows or macOS.
      
      [3/48] Linking CXX shared library qtbase/lib/libQt6Pdf_x86.so
      
      FAILED: qtbase/lib/libQt6Pdf_x86.so  
      : && /usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=i686-none-linux-android23 --sysroot=/usr/lib/android-ndk/toolch
      ains/llvm/prebuilt/linux-x86_64/sysroot -fPIC -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-p
      refixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DNDEBUG -Oz  -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-
      version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments  -Wl,--gc-sections   -Wl,--no-undefined @/mnt/packages/git_repos/dpkg/qt-android/
      debian/build-qtpdf-x86/qtwebengine/src/pdf/Release/i686/QtPdf_objects.rsp -Wl,--gc-sections -Wl,--version-script,/mnt/packages/git_repos/dpkg/qt-and
      roid/debian/build-qtpdf-x86/qtwebengine/src/pdf/Pdf.version -shared -Wl,-soname,libQt6Pdf_x86.so -o qtbase/lib/libQt6Pdf_x86.so qtwebengine/src/pdf/
      CMakeFiles/Pdf.dir/Pdf_autogen/mocs_compilation.cpp.o qtwebengine/src/pdf/CMakeFiles/Pdf.dir/qpdfbookmarkmodel.cpp.o qtwebengine/src/pdf/CMakeFiles/
      Pdf.dir/qpdfdocument.cpp.o qtwebengine/src/pdf/CMakeFiles/Pdf.dir/qpdffile.cpp.o qtwebengine/src/pdf/CMakeFiles/Pdf.dir/qpdflink.cpp.o qtwebengine/s
      rc/pdf/CMakeFiles/Pdf.dir/qpdflinkmodel.cpp.o qtwebengine/src/pdf/CMakeFiles/Pdf.dir/qpdfpagenavigator.cpp.o qtwebengine/src/pdf/CMakeFiles/Pdf.dir/
      qpdfpagerenderer.cpp.o qtwebengine/src/pdf/CMakeFiles/Pdf.dir/qpdfsearchmodel.cpp.o qtwebengine/src/pdf/CMakeFiles/Pdf.dir/qpdfselection.cpp.o  qtba
      se/lib/libQt6Gui_x86.so  qtbase/lib/libQt6Network_x86.so  -Wl,--no-fatal-warnings @/mnt/packages/git_repos/dpkg/qt-android/debian/build-qtpdf-x86/qt
      webengine/src/pdf/Release/i686/QtPdf_ldir.rsp @/mnt/packages/git_repos/dpkg/qt-android/debian/build-qtpdf-x86/qtwebengine/src/pdf/Release/i686/QtPdf
      _libs.rsp -Wl,--no-fatal-warnings  /usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/23/libGLESv2.so  /u
      sr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/23/libEGL.so  qtbase/lib/libQt6Core_x86.so  -llog  -pthr
      ead  -latomic -lm && :
      
      ld.lld: error: unable to find library -landroid_support
      
      clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      
      ninja: build stopped: subcommand failed.
      
       

      Configuration command

      cmake -B debian/build-qtpdf-x86 -S . --log-level=STATUS -DCMAKE_INSTALL_PREFIX=/usr/lib/qt-android-6.7-x86 -DBUILD_WITH_PCH=OFF -DANDROID_SDK_ROOT
      =/usr/lib/android-sdk/ -DCMAKE_TOOLCHAIN_FILE=/usr/lib/android-ndk//build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 -DCMAKE_BUILD_TYPE=Release
       -DBUILD_qtwayland=OFF -DQT_HOST_PATH=/usr -DQT_HOST_PATH_CMAKE_DIR=/usr/lib/x86_64-linux-gnu/qt-android-6.7-host/cmake -GNinja -DFEATURE_qtwebengin
      e_build=OFF -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON
      

      Build command:

      cmake --build debian/build-qtpdf-x86 -t qtwebengine/all
      

      NDK & SDK Structure:

      /usr/lib/android-ndk -> android-sdk/ndk/26.1.10909125
      /usr/lib/android-sdk
      /usr/lib/android-sdk/licenses
      /usr/lib/android-sdk/licenses/android-sdk-license
      /usr/lib/android-sdk/platforms
      /usr/lib/android-sdk/platforms/android-33
      /usr/lib/android-sdk/platforms/android-34
      /usr/lib/android-sdk/platform-tools
      /usr/lib/android-sdk/platform-tools/fastboot
      /usr/lib/android-sdk/platform-tools/lib64
      /usr/lib/android-sdk/platform-tools/make_f2fs_casefold
      /usr/lib/android-sdk/platform-tools/package.xml
      /usr/lib/android-sdk/platform-tools/NOTICE.txt
      /usr/lib/android-sdk/platform-tools/sqlite3
      /usr/lib/android-sdk/platform-tools/source.properties
      /usr/lib/android-sdk/platform-tools/adb
      /usr/lib/android-sdk/platform-tools/hprof-conv
      /usr/lib/android-sdk/platform-tools/etc1tool
      /usr/lib/android-sdk/platform-tools/make_f2fs
      /usr/lib/android-sdk/platform-tools/mke2fs.conf
      /usr/lib/android-sdk/platform-tools/mke2fs
      /usr/lib/android-sdk/ndk
      /usr/lib/android-sdk/ndk/25.1.8937393
      /usr/lib/android-sdk/ndk/26.1.10909125
      /usr/lib/android-sdk/build-tools
      /usr/lib/android-sdk/build-tools/34.0.0
      

      Attachments

        Issue Links

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

          Activity

            People

              michal Michal Klocek
              ban F S
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes