Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. configure with -system-libjpeg fails
Forum Updated to NodeBB v4.3 + New Features

configure with -system-libjpeg fails

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
8 Posts 2 Posters 1.8k Views 2 Watching
  • 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 Offline
    S Offline
    solarisx
    wrote on last edited by solarisx
    #1

    Hi
    I am trying to configure and build qt with -system-libjpeg(libjpeg-turbo) on windows 10. One of my failing configure cmds is:

    C:\Qt\5.14.1\build_jpgturbo_msvc2017_64>..\Src\configure.bat -prefix ..\install_jpgturbo_msvc2017_64 -v -release -shared -platform win32-msvc -opensource -confirm-license -system-libjpeg -nomake tests -I "C:\_DEV_LIBS\C++\libjpeg-turbo\libjpeg-turbo64\include" -L "C:\_DEV_LIBS\C++\libjpeg-turbo\libjpeg-turbo64\lib"
    

    The configure process ends with error:

    Image formats:
        GIF .................................. yes
        ICO .................................. yes
        JPEG ................................. yes
          Using system libjpeg ............... no
        PNG .................................. yes
          Using system libpng ................ no
    
    ERROR: Feature 'system-jpeg' was enabled, but the pre-condition 'features.jpeg && libs.libjpeg' failed.
    

    I have the latest vcpkg version, pearl and python installed. What else can I do to fix this error?

    Thanks in advance

    jsulmJ 1 Reply Last reply
    0
    • S solarisx

      Hi
      I am trying to configure and build qt with -system-libjpeg(libjpeg-turbo) on windows 10. One of my failing configure cmds is:

      C:\Qt\5.14.1\build_jpgturbo_msvc2017_64>..\Src\configure.bat -prefix ..\install_jpgturbo_msvc2017_64 -v -release -shared -platform win32-msvc -opensource -confirm-license -system-libjpeg -nomake tests -I "C:\_DEV_LIBS\C++\libjpeg-turbo\libjpeg-turbo64\include" -L "C:\_DEV_LIBS\C++\libjpeg-turbo\libjpeg-turbo64\lib"
      

      The configure process ends with error:

      Image formats:
          GIF .................................. yes
          ICO .................................. yes
          JPEG ................................. yes
            Using system libjpeg ............... no
          PNG .................................. yes
            Using system libpng ................ no
      
      ERROR: Feature 'system-jpeg' was enabled, but the pre-condition 'features.jpeg && libs.libjpeg' failed.
      

      I have the latest vcpkg version, pearl and python installed. What else can I do to fix this error?

      Thanks in advance

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @solarisx You should check the configure.log file - it should provide more information about what exactly is the problem.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        solarisx
        wrote on last edited by solarisx
        #3

        Thanks. Seems the libjpeg_turbo header and lib files are not found. I have the paths in the configure cmd. Did I specified them wrong?
        C:\_DEV_LIBS\C++\libjpeg-turbo\libjpeg-turbo64\include\jpeglib.h exist!

        configure.log:

        Command line: -prefix ..\install_jpgturbo_msvc2017_64 -v -release -shared -platform win32-msvc -opensource -confirm-license -system-libjpeg -nomake tests -I C:\_DEV_LIBS\C++\libjpeg-turbo\libjpeg-turbo64\include -L C:\_DEV_LIBS\C++\libjpeg-turbo\libjpeg-turbo64\lib
        ...
        Global lib dirs: [C:\\_DEV_LIBS\\C++\\libjpeg-turbo\\libjpeg-turbo64\\lib] ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\lib\\x64" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\lib\\x64" "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64" "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64" "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\um\\x64"]
        Global inc dirs: [C:\\_DEV_LIBS\\C++\\libjpeg-turbo\\libjpeg-turbo64\\include] ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\include" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\include" "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\shared" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\um" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\winrt" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\cppwinrt"]
        ...
        loaded result for library config.qtbase_gui.libraries.libjpeg
        Trying source 0 (type pkgConfig) of library libjpeg ...
        pkg-config use disabled globally.
          => source produced no result.
        Trying source 1 (type inline) of library libjpeg ...
        jpeglib.h not found in [] and global paths.
          => source produced no result.
        Trying source 2 (type inline) of library libjpeg ...
        jpeglib.h not found in [] and global paths.
          => source produced no result.
        test config.qtbase_gui.libraries.libjpeg FAILED
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          solarisx
          wrote on last edited by
          #4

          in the configure.log are several fatal errors:

          Notice: re-mapping requested qmake spec to unified 'win32-msvc'.
          ...
          > main.c
          > .\main.c(5): fatal error C1189: #error:  __STDC_VERSION__ must be >= 199901L
          > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
          ...
          > main.cpp
          > .\main.cpp(4): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory
          > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
          

          'sys/socket.h' is LINUX. How to specify the the Windows platform?
          I use -platform win32-msvc and run the configure from the Visual Studio 2017 Developer Command Prompt on Windows 10.
          Anything else to do?

          jsulmJ 1 Reply Last reply
          0
          • S solarisx

            in the configure.log are several fatal errors:

            Notice: re-mapping requested qmake spec to unified 'win32-msvc'.
            ...
            > main.c
            > .\main.c(5): fatal error C1189: #error:  __STDC_VERSION__ must be >= 199901L
            > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
            ...
            > main.cpp
            > .\main.cpp(4): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory
            > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
            

            'sys/socket.h' is LINUX. How to specify the the Windows platform?
            I use -platform win32-msvc and run the configure from the Visual Studio 2017 Developer Command Prompt on Windows 10.
            Anything else to do?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @solarisx said in configure with -system-libjpeg fails:

            'sys/socket.h' is LINUX

            I think you can ignore it - just one of many tests.
            More interesting is "fatal error C1189: #error: STDC_VERSION must be >= 199901L" - which test is that?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • S Offline
              S Offline
              solarisx
              wrote on last edited by
              #6
              loaded result for config test config.qtbase.tests.c99
              + cd /d C:\Qt\5.14.1\build_jpgturbo_msvc2017_64\config.tests\c99 && C:\Qt\5.14.1\build_jpgturbo_msvc2017_64\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" C:/Qt/5.14.1/build_jpgturbo_msvc2017_64/config.tests/c99
              + cd /d C:\Qt\5.14.1\build_jpgturbo_msvc2017_64\config.tests\c99 && set MAKEFLAGS=& nmake
              > Microsoft (R) Program Maintenance Utility Version 14.16.27035.0
              > Copyright (C) Microsoft Corporation.  All rights reserved.
              > 	cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -O2 -MD -W0 -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\Qt\5.14.1\Src\qtbase\mkspecs\win32-msvc -Fo @C:\Users\Phili\AppData\Local\Temp\nm2059.tmp
              > main.c
              > .\main.c(5): fatal error C1189: #error:  __STDC_VERSION__ must be >= 199901L
              > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
              > Stop.
              test config.qtbase.tests.c99 FAILED
              
              S 1 Reply Last reply
              0
              • S Offline
                S Offline
                solarisx
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0
                • S solarisx
                  loaded result for config test config.qtbase.tests.c99
                  + cd /d C:\Qt\5.14.1\build_jpgturbo_msvc2017_64\config.tests\c99 && C:\Qt\5.14.1\build_jpgturbo_msvc2017_64\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" C:/Qt/5.14.1/build_jpgturbo_msvc2017_64/config.tests/c99
                  + cd /d C:\Qt\5.14.1\build_jpgturbo_msvc2017_64\config.tests\c99 && set MAKEFLAGS=& nmake
                  > Microsoft (R) Program Maintenance Utility Version 14.16.27035.0
                  > Copyright (C) Microsoft Corporation.  All rights reserved.
                  > 	cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -O2 -MD -W0 -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\Qt\5.14.1\Src\qtbase\mkspecs\win32-msvc -Fo @C:\Users\Phili\AppData\Local\Temp\nm2059.tmp
                  > main.c
                  > .\main.c(5): fatal error C1189: #error:  __STDC_VERSION__ must be >= 199901L
                  > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
                  > Stop.
                  test config.qtbase.tests.c99 FAILED
                  
                  S Offline
                  S Offline
                  solarisx
                  wrote on last edited by
                  #8

                  Ok. Found the problem. Thought using a 64bit command prompt results in a 64bit qt build. Now it works. Using x86 Native Command Prompt for VS 2017 as admin and 32bit libs of jpeg-turbo.

                  @jsulm thank you very much for your time.

                  Greets solarisx

                  1 Reply Last reply
                  0

                  • Login

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