Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Libjpeg conflict while building qt
Forum Update on Monday, May 27th 2025

Libjpeg conflict while building qt

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
embedded linuxbuilding qtlibjpegconfigureubuntu 18.04
12 Posts 2 Posters 2.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S SGaist
    5 Oct 2020, 17:59

    Hi,

    I think the easiest would be to remove the development package of the version you do not want to use. It will avoid its detection.

    U Offline
    U Offline
    Ucn_
    wrote on 5 Oct 2020, 18:01 last edited by
    #3

    @SGaist Thanks for replying. Actually I tried to remove, however it seems that libjpeg-turbo8-dev install the rest as dependencies. So when removing it warns about the depencencies and if I remove then install again it will install all.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Oct 2020, 18:04 last edited by
      #4

      Something is not clear what exactly depends on libjpeg-turbo-dev ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      U 1 Reply Last reply 5 Oct 2020, 18:53
      0
      • S SGaist
        5 Oct 2020, 18:04

        Something is not clear what exactly depends on libjpeg-turbo-dev ?

        U Offline
        U Offline
        Ucn_
        wrote on 5 Oct 2020, 18:53 last edited by
        #5

        @SGaist :

        dpkg: libjpeg-turbo8-dev:arm64: dependency problems, but removing anyway as you requested:
         libjpeg8-dev:arm64 depends on libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6).
        
        dpkg: libjpeg8-dev:arm64: dependency problems, but removing anyway as you requested:
         libjpeg-dev:arm64 depends on libjpeg8-dev.
        
        (Reading database ... 142774 files and directories currently installed.)
        Removing libjpeg8-dev:arm64 (8c-2ubuntu8) ...
        dpkg: libjpeg-dev:arm64: dependency problems, but removing anyway as you requested:
         libcupsimage2-dev:arm64 depends on libjpeg-dev.
         libtiff5-dev:arm64 depends on libjpeg-dev.
        
        Removing libjpeg-dev:arm64 (8c-2ubuntu8) ...
        dpkg: libjpeg8:arm64: dependency problems, but removing anyway as you requested:
         vlc-plugin-base:arm64 depends on libjpeg8 (>= 8c).
         liblcms2-utils depends on libjpeg8 (>= 8c).
         libraw16:arm64 depends on libjpeg8 (>= 8c).
         libwmf0.2-7:arm64 depends on libjpeg8 (>= 8c).
         sane-utils depends on libjpeg8 (>= 8c).
         libgs9:arm64 depends on libjpeg8 (>= 8c).
         libsdl-image1.2:arm64 depends on libjpeg8 (>= 8c).
         gstreamer1.0-plugins-good:arm64 depends on libjpeg8 (>= 8c).
         libsane1:arm64 depends on libjpeg8 (>= 8c).
         netpbm depends on libjpeg8 (>= 8c).
         libopencv depends on libjpeg8 (>= 8c).
         libgxps2:arm64 depends on libjpeg8 (>= 8c).
         libqt5gui5:arm64 depends on libjpeg8 (>= 8c).
         libpoppler73:arm64 depends on libjpeg8 (>= 8c).
         eog depends on libjpeg8 (>= 8c).
         libcupsfilters1:arm64 depends on libjpeg8 (>= 8c).
         libmng2:arm64 depends on libjpeg8 (>= 8c).
         libreoffice-core depends on libjpeg8 (>= 8c).
         libtiff5:arm64 depends on libjpeg8 (>= 8c).
         libgd3:arm64 depends on libjpeg8 (>= 8c).
         libgphoto2-6:arm64 depends on libjpeg8 (>= 8c).
         libvncclient1:arm64 depends on libjpeg8 (>= 8c).
         gstreamer1.0-gl:arm64 depends on libjpeg8 (>= 8c).
         libgdk-pixbuf2.0-0:arm64 depends on libjpeg8 (>= 8c).
         libv4lconvert0:arm64 depends on libjpeg8 (>= 8c).
         libfreerdp2-2:arm64 depends on libjpeg8 (>= 8c).
         libwebkit2gtk-4.0-37:arm64 depends on libjpeg8 (>= 8c).
         libqt5webkit5:arm64 depends on libjpeg8 (>= 8c).
         libdjvulibre21:arm64 depends on libjpeg8 (>= 8c).
         libzbar0:arm64 depends on libjpeg8 (>= 8c).
         vino depends on libjpeg8 (>= 8c).
         libmagickcore-6.q16-3:arm64 depends on libjpeg8 (>= 8c).
         libqtgui4:arm64 depends on libjpeg8 (>= 8c).
         xloadimage depends on libjpeg8 (>= 8c).
        
        

        If I try to install only what I need:

        sudo apt-get install libjpeg8 libjpeg8-dev
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        You might want to run 'apt --fix-broken install' to correct these.
        The following packages have unmet dependencies:
         libcupsimage2-dev : Depends: libjpeg-dev
                             Recommends: libcupsfilters-dev (>= 1.0~b1) but it is not going to be installed
         libjpeg8 : Depends: libjpeg-turbo8 (>= 1.1.90+svn722-1ubuntu6) but it is not going to be installed
         libjpeg8-dev : Depends: libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6) but it is not going to be installed
         libtiff5-dev : Depends: libjpeg-dev
         nvidia-l4t-weston : Depends: libjpeg-turbo8 but it is not going to be installed
        E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
        

        And if I install libjpeg-turbo8-dev:

        sudo apt-get install libjpeg-turbo8  libjpeg-turbo8-dev
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        You might want to run 'apt --fix-broken install' to correct these.
        The following packages have unmet dependencies:
         eog : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         gstreamer1.0-gl : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         gstreamer1.0-plugins-good : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libcupsfilters1 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libdjvulibre21 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libfreerdp2-2 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libgd3 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libgdk-pixbuf2.0-0 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libgphoto2-6 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libgs9 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libgxps2 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         liblcms2-utils : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libmagickcore-6.q16-3 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libmng2 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libopencv : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libpoppler73 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libqt5gui5 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libqt5webkit5 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libqtgui4 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libraw16 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libreoffice-core : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libsane1 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libsdl-image1.2 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libtiff5 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libv4lconvert0 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libvncclient1 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libwebkit2gtk-4.0-37 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libwmf0.2-7 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         libzbar0 : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         netpbm : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         sane-utils : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         vino : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         vlc-plugin-base : Depends: libjpeg8 (>= 8c) but it is not going to be installed
         xloadimage : Depends: libjpeg8 (>= 8c) but it is not going to be installed
        E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
        
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 5 Oct 2020, 18:57 last edited by
          #6

          Sorry, it just realized I misread your issue.

          You built Qt successfully but have a problem with your application.

          Are you loading a specific file that triggers this error or does it happen for all jpeg files ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          U 1 Reply Last reply 5 Oct 2020, 19:03
          0
          • S SGaist
            5 Oct 2020, 18:57

            Sorry, it just realized I misread your issue.

            You built Qt successfully but have a problem with your application.

            Are you loading a specific file that triggers this error or does it happen for all jpeg files ?

            U Offline
            U Offline
            Ucn_
            wrote on 5 Oct 2020, 19:03 last edited by
            #7

            @SGaist Just camera and opencv however the same code runs well without problems on a Raspberry Pi with Qt 5.11.3

            U 1 Reply Last reply 5 Oct 2020, 19:07
            0
            • U Ucn_
              5 Oct 2020, 19:03

              @SGaist Just camera and opencv however the same code runs well without problems on a Raspberry Pi with Qt 5.11.3

              U Offline
              U Offline
              Ucn_
              wrote on 5 Oct 2020, 19:07 last edited by
              #8

              @SGaist I believe this libjpeg mismatch:

              ldd myapp
              .....
              libjpeg.so.8 => /usr/lib/aarch64-linux-gnu/libjpeg.so.8 (0x0000007fa6283000)
              .....
              

              and qt configure with -system-libjpeg

              Checking for libjpeg... 
              Trying source 0 (type inline) of library libjpeg ...
                => source failed condition 'config.msvc'.
              Trying source 1 (type inline) of library libjpeg ...
              + cd /home/ath/Documents/SourceCode/qtBuild/config.tests/libjpeg && /home/ath/Documents/SourceCode/qtBuild/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" 'QMAKE_USE += libjpeg' 'QMAKE_LIBS_LIBJPEG = /usr/lib/aarch64-linux-gnu/libjpeg.so' /home/ath/Documents/SourceCode/qtBuild/config.tests/libjpeg
              + cd /home/ath/Documents/SourceCode/qtBuild/config.tests/libjpeg && MAKEFLAGS= /usr/bin/make
              > g++ -c -pipe -O2 -w -fPIC  -I. -I/home/ath/Documents/SourceCode/qt12Source/qtbase/mkspecs/linux-g++ -o main.o main.cpp
              > g++ -Wl,-O1 -fuse-ld=gold -o libjpeg main.o   /usr/lib/aarch64-linux-gnu/libjpeg.so   
               => source accepted.
              test config.qtbase_gui.libraries.libjpeg succeeded
              
              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 5 Oct 2020, 20:13 last edited by
                #9

                libjpeg.so is likely a symbolic link to libjpeg.so.8

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                U 1 Reply Last reply 5 Oct 2020, 20:32
                0
                • S SGaist
                  5 Oct 2020, 20:13

                  libjpeg.so is likely a symbolic link to libjpeg.so.8

                  U Offline
                  U Offline
                  Ucn_
                  wrote on 5 Oct 2020, 20:32 last edited by
                  #10
                  This post is deleted!
                  U 1 Reply Last reply 5 Oct 2020, 20:35
                  0
                  • U Ucn_
                    5 Oct 2020, 20:32

                    This post is deleted!

                    U Offline
                    U Offline
                    Ucn_
                    wrote on 5 Oct 2020, 20:35 last edited by Ucn_ 10 May 2020, 20:36
                    #11

                    This is the one installing

                    sudo apt-get build-dep qt5-default
                    
                    The following NEW packages will be installed:
                    default-libmysqlclient-dev dh-exec firebird-dev firebird3.0-common firebird3.0-common-doc freetds-common freetds-dev libatk-bridge2.0-dev
                      libatk1.0-dev libatspi2.0-dev libcairo-script-interpreter2 libcairo2-dev libct4 libcups2-dev libcupsimage2-dev libdbus-1-dev
                      libdouble-conversion-dev libepoxy-dev libevdev-dev libfbclient2 libfontconfig1-dev libfreetype6-dev libgbm-dev libgdk-pixbuf2.0-dev
                      libgtk-3-dev libib-util libinput-dev libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblzma-dev libmtdev-dev libmysqlclient-dev
                      libodbc1 libpango1.0-dev libpixman-1-dev libpng-dev libpq-dev libpq5 libproxy-dev libpulse-dev libqt5designercomponents5 libqt5sql5-sqlite
                      libsqlite3-dev libssl-dev libsybdb5 libtiff-dev libtiff5-dev libtiffxx5 libtommath1 libudev-dev libwacom-dev libxcb-icccm4-dev
                      libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcomposite-dev
                      libxcursor-dev libxft-dev libxinerama-dev libxkbcommon-dev libxkbcommon-x11-dev libxtst-dev odbcinst odbcinst1debian2 pkg-kde-tools
                      qt5-assistant qttools5-dev-tools unixodbc-dev wayland-protocols x11proto-composite-dev x11proto-record-dev x11proto-xinerama-dev
                    
                    
                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 6 Oct 2020, 18:28 last edited by
                      #12

                      So everything looks correct...

                      How are you loading your image in your application ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      12/12

                      6 Oct 2020, 18:28

                      • Login

                      • Login or register to search.
                      12 out of 12
                      • First post
                        12/12
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved