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

include absolute path to library

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.2
    • Fix Version/s: None
    • Component/s: Image formats
    • Labels:
      None

      Description

      objdump output

      $ toolchain/arm-histbv310-linux/bin/arm-histbv310-linux-objdump -x build-arm-hi3798mv100/qtbase-5.12.2/plugins/imageformats/libqjpeg.so | less
      build-arm-hi3798mv100/qtbase-5.12.2/plugins/imageformats/libqjpeg.so:     file format elf32-littlearm
      build-arm-hi3798mv100/qtbase-5.12.2/plugins/imageformats/libqjpeg.so
      architecture: arm, flags 0x00000150:
      HAS_SYMS, DYNAMIC, D_PAGED
      start address 0x00002ef0
      
      Program Header:
          LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**16
               filesz 0x00007f4c memsz 0x00007f4c flags r-x
          LOAD off    0x00008000 vaddr 0x00018000 paddr 0x00018000 align 2**16
               filesz 0x00000434 memsz 0x00000444 flags rw-
       DYNAMIC off    0x000080d0 vaddr 0x000180d0 paddr 0x000180d0 align 2**2
               filesz 0x00000138 memsz 0x00000138 flags rw-
         STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
               filesz 0x00000000 memsz 0x00000000 flags rw-
      
      Dynamic Section:
        NEEDED               libhi_common.so
        NEEDED               libpthread.so.0
        NEEDED               libQt5Gui.so.5
        NEEDED               libQt5Core.so.5
        NEEDED               /tmp/firmware/staging_board/usr/lib/libjpeg.so
        NEEDED               libstdc++.so.6
        NEEDED               libm.so.6
        NEEDED               libgcc_s.so.1
        NEEDED               libc.so.6
        RUNPATH              $ORIGIN/../../lib
        INIT                 0x000028fc
      ..............

      config.log contained follow lines:

      .............
      > make[1]: Entering directory '/tmp/firmware/build-arm-hi3798mv100/qtbase-5.12.2/config.tests/libjpeg'
      > arm-histbv310-linux-g++ -c -pipe -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -O2 -std=gnu++11 -w -fPIC  -I. -I/tmp/firmware/staging_board/usr/include -I/tmp/firmware/_dependencies/qtbase/mkspecs/devices/linux-arm-hisilicon-hi3798mv100-g++ -o main.o main.cpp
      > arm-histbv310-linux-g++ -lhi_common -lpthread -Wl,-O1 -o libjpeg main.o   -L/tmp/firmware/staging_board/usr/lib /tmp/firmware/staging_board/usr/lib/libjpeg.so   
      > make[1]: Leaving directory '/tmp/firmware/build-arm-hi3798mv100/qtbase-5.12.2/config.tests/libjpeg
      ........

      why linker command contained absolute library path /tmp/firmware/staging_board/usr/lib/libjpeg.so instead -ljpeg ?

      I found workaround

      $ git diff
      diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro
      index 89476e62f5..06bd7f3dbd 100644
      --- a/src/plugins/imageformats/jpeg/jpeg.pro
      +++ b/src/plugins/imageformats/jpeg/jpeg.pro
      @@ -6,7 +6,8 @@ SOURCES += main.cpp qjpeghandler.cpp
       HEADERS += main.h qjpeghandler_p.h
       
       qtConfig(system-jpeg) {
      -    QMAKE_USE += libjpeg
      +#    QMAKE_USE += libjpeg
      +       LIBS += -ljpeg
       } else {
           include($$PWD/../../../3rdparty/libjpeg.pri)
       }

        Attachments

        1. config.log
          81 kB
          Kirill Brilliantov
        2. config.opt.log
          0.7 kB
          Kirill Brilliantov
        3. config.summary
          5 kB
          Kirill Brilliantov
        4. libqjpeg_objdump.log
          24 kB
          Kirill Brilliantov

          Issue Links

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

            Activity

              People

              • Assignee:
                vgt Eirik Aavitsland
                Reporter:
                imb Kirill Brilliantov
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes