Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt: permit usage of system libjpeg/libjpeg-turbo #24644

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrjoel
Copy link
Contributor

@mrjoel mrjoel commented Jul 16, 2024

Summary

Changes to recipe: qt/6.x.x and qt/5.x.x

Motivation

This enables usage, particularly on Linux, of using the system native libjpeg equivalent library, whether the system provides libjpeg or libjpeg-turbo.

Details

Adding system as an allowed value for the with_libjpeg option enables subsequent processing and enabling of the Qt JPEG support, without having to build a specific library within Conan (and presumably vendor it with the application). This approach allows building using the native distribution provided jpeg variant and having it as a system dependency.

The result is not incurring a Conan requires, while still allowing e.g., FEATURE_system_jpeg to be enabled and have Qt configuration report jpeg support.


This enables usage, particularly on Linux, of using the system native
libjpeg equivalent library, whether the system provides libjpeg or
libjpeg-turbo.
@mrjoel
Copy link
Contributor Author

mrjoel commented Jul 16, 2024

For Windows, this leaves the door open for no system package being available. It does the same on Linux as well, if neither -dev{,el} package is installed. I considered adding a block in config_options() disallowing the system option on Windows, but decided not to. If there's a better way to handle this in general I'd certainly be open to it.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 1 (d23bd124d08b1533c8b870a28520c88b68e285b5):

  • qt/6.7.0:
    Didn't run or was cancelled before finishing

  • qt/6.6.2:
    Didn't run or was cancelled before finishing

  • qt/6.7.1:
    Didn't run or was cancelled before finishing

  • qt/6.6.3:
    Didn't run or was cancelled before finishing

  • qt/6.6.0:
    Didn't run or was cancelled before finishing

  • qt/6.6.1:
    Didn't run or was cancelled before finishing

  • qt/6.4.2:
    CI failed to create some packages (All logs)

    Logs for packageID 2894543c06ae0e7997798e731ed28e98f1156a79:
    [settings]
    arch=armv8
    build_type=Release
    compiler=apple-clang
    compiler.libcxx=libc++
    compiler.version=13.0
    os=Macos
    [options]
    qt:shared=False
    
    [...]
    Configuring submodule 'qtwayland'
    Configuring submodule 'qtwebchannel'
    Configuring submodule 'qtwebengine'
    Configuring submodule 'qtwebview'
    
    -- Configuration summary shown below. It has also been written to /Users/jenkins/workspace/prod-v1/bsr/71364/ffcbb/.conan/data/qt/6.4.2/_/_/build/2894543c06ae0e7997798e731ed28e98f1156a79/build/Release/config.summary
    -- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.
    
    Note: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library.
    Note: When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. For example: OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked
    
    WARNING: On OS X, AAT is supported only with -qt-harfbuzz.
    
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'libffi-release-armv8-data.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'autoconf-config.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'ZLIB-release-armv8-data.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'SQLite3ConfigVersion.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'autoconf-config-version.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'FindPostgreSQL.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'FindPNG.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'glib-release-armv8-data.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'PNGConfig.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'module-ODBC-release-armv8-data.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'md4c-config.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'module-SQLite3-release-armv8-data.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'freetype-config-version.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'FindIntl.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'FindIconv.cmake' file.
    qt/6.4.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
    ' in 'm4-config-version.cmake' file.
    qt/6.4.2: ERROR: Package '2894543c06ae0e7997798e731ed28e98f1156a79' build failed
    qt/6.4.2: WARN: Build folder /Users/jenkins/workspace/prod-v1/bsr/71364/ffcbb/.conan/data/qt/6.4.2/_/_/build/2894543c06ae0e7997798e731ed28e98f1156a79/build/Release
    ERROR: qt/6.4.2: Error in build() method, line 786
    	cmake.configure()
    	ConanException: Error 1 while executing cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="/Users/jenkins/workspace/prod-v1/bsr/71364/ffcbb/.conan/data/qt/6.4.2/_/_/build/2894543c06ae0e7997798e731ed28e98f1156a79/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/jenkins/workspace/prod-v1/bsr/71364/ffcbb/.conan/data/qt/6.4.2/_/_/package/2894543c06ae0e7997798e731ed28e98f1156a79" -DQT_USE_VCPKG="OFF" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/jenkins/workspace/prod-v1/bsr/71364/ffcbb/.conan/data/qt/6.4.2/_/_/source/src"
    
  • qt/6.5.3:
    Didn't run or was cancelled before finishing

  • qt/5.15.14:
    Didn't run or was cancelled before finishing

  • qt/6.3.2:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@maksim-petukhov
Copy link
Contributor

You can just use platform_requires for this purpose and leave the recipe as it is. Just add something like this to your profile:

[platform_requires]
libjpeg/9e

@jcar87
Copy link
Contributor

jcar87 commented Jul 24, 2024

Hi @mrjoel - as mentioned above, have you tried the suggested https://docs.conan.io/2.5/reference/config_files/profiles.html#platform-requires ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants