conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
945 stars 1.72k forks source link

[package] qwt/6.2.0 : qwt doesn't support coss compilation #24982

Open Drllap opened 3 weeks ago

Drllap commented 3 weeks ago

Description

When trying to cross-compile qwt I get the following error: Qwt recipe does not support cross-compilation yet Why doesn't it support it and what is needed to support it? I'm willing to work on the changes if someone can guide me.

Package and Environment Details

Conan profile

default profile:

[settings]
arch=x86_64
os=Windows
compiler=Visual Studio
compiler.version=16
build_type=Release

[options]
[build_requires]
[env]

[tool_requires]
cmake/3.30.2
ninja/1.12.1

host profile:

[settings]
os=Windows
os_build=Windows
arch=x86
compiler=Visual Studio
compiler.version=16
build_type=Debug

[options]

[build_requires]

[env]

[tool_requires]

Steps to reproduce

conan1 install qwt/6.2.0@ --profile:host=host --profile:build=default --build missing -r conan-center

Logs

Click to expand log ``` Put your log output here ```
jcar87 commented 3 weeks ago

Hi @Drllap - thanks for opening this issue.

Please be aware that recipes not supporting cross-building is not always an issue that lies in Conan Center - some recipes just simply do not support it. Without knowing the details for qwt specifically, projects that use Qt typically require the executables of the tools (moc, uic, etc) to support the build machine architecture, and the libraries built for the host (or "target") architecture - and Qt (in particular Qt 5) required a specific package configured and built for this purpose - which does not help very much with the segregation of context we apply in Conan/ Conan-Center.

Because your host architecture is x86 and Windows runs those binaries, for this particular case you may have luck simply telling Conan that both host and build architectures are the same, e.g.

conan1 install qwt/6.2.0@  --profile:host=host --profile:build=host --build missing -r conan-center

This means all the tool_requires will be built for and run as x86 binaries - but it is likely to successfully produce the missing package. This is not something that can be generalised to other cross-building cases, but it may work in this instance