Building libjpeg-turbo with conan fails on windows

791 views Asked by At

I am trying to build libjpeg-turbo package with conan on Windows:

conan install libjpeg-turbo/1.5.2@bincrafters/stable

But it fails with:

libjpeg-turbo/1.5.2@bincrafters/stable: Not found in local cache, looking in remotes...
libjpeg-turbo/1.5.2@bincrafters/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt
Downloading conanfile.py
Downloading conan_export.tgz
....
ERROR: libjpeg-turbo/1.5.2@bincrafters/stable: Error in configure() method, line 43
    if self.settings.os == "Emscripten":
    ConanException: Invalid setting 'Emscripten' is not a valid 'settings.os' value.
Possible values are ['Android', 'Arduino', 'FreeBSD', 'Linux', 'Macos', 'SunOS', 'Windows', 'WindowsStore', 'iOS', 'tvOS', 'watchOS']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"

The same command on Linux works fine. On both system I have conan in version 1.21.0

I cannot find any clue about this error.

EDIT

Here is full output of libjpeg-turbo in version 2.0.2 installation:

>conan install -r conan-center libjpeg-turbo/2.0.2@
Configuration:
[settings]
arch=x86
arch_build=x86
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=15
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

ERROR: libjpeg-turbo/2.0.2: Error in configure() method, line 49
        if self.settings.os == "Emscripten":
        ConanException: Invalid setting 'Emscripten' is not a valid 'settings.os
' value.
Possible values are ['Android', 'Arduino', 'FreeBSD', 'Linux', 'Macos', 'SunOS',
 'Windows', 'WindowsStore', 'iOS', 'tvOS', 'watchOS']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-sett
ing"
1

There are 1 answers

5
uilianries On BEST ANSWER

The Conan package libjpeg-turbo/1.5.2@bincrafters/stable is obsolete and has been replaced by libjpeg-turbo/2.0.2@. You can obtain that package from Conan Center as well:

conan install -r conan-center libjpeg-turbo/2.0.2@

Now about your error:

ConanException: Invalid setting 'Emscripten' is not a valid 'settings.os' value.

As you can see, your current settings.os is configured as Emscripten which is not supported by that recipe. As the FAQ link indicates, you should customize your current settings, thus you can try:

conan install -r conan-center libjpeg-turbo/2.0.2@ -s os=Windows

Thus, you should:

  • Update your current package to libjpeg-turbo/2.0.2@ (it requires Conan >=1.18)
  • Update your current profile to Windows:

    conan profile update settings.os=Windows default
    

If you really need Emscripten, so open an issue to Conan Center Index requesting such feature.

Regards!