Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved configure with -system-libjpeg fails

    Installation and Deployment
    2
    8
    875
    Loading More Posts
    • 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
      solarisx last edited by 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

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @solarisx last edited by

        @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 Reply Quote 0
        • S
          solarisx last edited by solarisx

          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 Reply Quote 0
          • S
            solarisx last edited by

            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?

            jsulm 1 Reply Last reply Reply Quote 0
            • jsulm
              jsulm Lifetime Qt Champion @solarisx last edited by

              @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 Reply Quote 0
              • S
                solarisx last edited by

                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 Reply Quote 0
                • S
                  solarisx last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • S
                    solarisx @solarisx last edited by

                    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 Reply Quote 0
                    • First post
                      Last post