0

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"
Michał Walenciak
  • 4,257
  • 4
  • 33
  • 61

1 Answers1

1

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!

uilianries
  • 3,363
  • 15
  • 28
  • I ran `conan install -r conan-center libjpeg-turbo/2.0.2@ -s os=Windows` and exactly the same happend. And I do not need Emscripten for this build. – Michał Walenciak Jan 08 '20 at 19:16
  • Could you please provide a link with your log? Actually there is no detail about your profile and settings. It should be similar to https://gist.github.com/uilianries/a170d428d20b1e547f3b2dad07a60a32 – uilianries Jan 09 '20 at 12:06
  • 1
    I see now, you settings file looks outdated. Remove it, Conan will generate a new one. `rm ~/.conan/settings.yml` – uilianries Jan 09 '20 at 21:37
  • It helped. Could you please tell me how did you notice my config was outdated? If I run conan now, configuration it reports looks the same. – Michał Walenciak Jan 09 '20 at 21:47
  • 1
    Emscripten is a new OS supported in settings. When you update your Conan version, it does not replace your current settings.yml, only creates a new version. Thus is was complaining about an absent OS which should be present in your settings.yml. It's not a new "error", actually even I saw similar problem on Linux. – uilianries Jan 09 '20 at 23:49