简体   繁体   English

在 Windows 上使用 conan 构建 libjpeg-turbo 失败

[英]Building libjpeg-turbo with conan fails on windows

I am trying to build libjpeg-turbo package with conan on Windows:我正在尝试在 Windows 上使用 conan 构建libjpeg-turbo包:

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. Linux 上的相同命令工作正常。 On both system I have conan in version 1.21.0在两个系统上我都有 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:以下是 2.0.2 版安装中 libjpeg-turbo 的完整输出:

>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"

The Conan package libjpeg-turbo/1.5.2@bincrafters/stable is obsolete and has been replaced by libjpeg-turbo/2.0.2@.柯南包 libjpeg-turbo/1.5.2@bincrafters/stable 已过时,已被 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. ConanException: 无效设置 'Emscripten' 不是有效的 'settings.os' 值。

As you can see, your current settings.os is configured as Emscripten which is not supported by that recipe.如您所见,您当前的settings.os配置为Emscripten ,该配方不支持。 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)将您当前的包更新为 libjpeg-turbo/2.0.2@(它需要 Conan >=1.18)
  • Update your current profile to Windows:将您当前的配置文件更新到 Windows:

     conan profile update settings.os=Windows default

If you really need Emscripten , so open an issue to Conan Center Index requesting such feature.如果您真的需要Emscripten ,那么请向柯南中心索引提出一个问题,请求此类功能。

Regards!问候!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM