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

[question] How to trigger a rebuild of all packages when updating the cross-compilation sysroot #17320

Open
1 task done
JKniep opened this issue Nov 14, 2024 · 0 comments
Open
1 task done

Comments

@JKniep
Copy link

JKniep commented Nov 14, 2024

What is your question?

We are using a toolchain for cross-compiling as described in https://docs.conan.io/2/examples/cross_build/toolchain_packages.html, with the only notable difference that we have an additional conan package for the cross-compilation sysroot. We use it pretty much the same like the toolchain.

The toolchain and sysroot are referenced in our conan profile for the target as [tool_requires], and the compiler version of the toolchain is given in the settings:

[settings]
arch=armv7
...
compiler.version=7.3

[tool_requires]
arm-toolchain/13.2
arm-sysroot/13.2

When we receive an updated toolchain from our supplier, we update the arm-toolchain version in the profile (in the tool_requires section), and typically, we then also update the compiler.version. In this case, conan will generate a new package id because of the changed settings, and all conan packages will be rebuilt automatically with the new toolchain as soon as we use the new profile. But if we just update the sysroot (e.g. bump arm-sysroot to 14.0 in order to address vulnerabilities of system libs), conan will re-use existing packages that have been built against the older sysroot, which often doesn't work.

Now we could add a custom setting like sysroot.version (similar to the existing sdk_versions e.g. for iOS), and update it every time we update the sysroot. But I feel this not enough, because it may easily be forgotten to update sysroot.version. Would you rather recommend to somehow add a check for sysroot.version (maybe using profile.py?), or is there some way to reflect tool_requires in the package id? I know this is possible for configurations via tools.info.package_id:confs, but I didn't find any equivalent for tool_requires.

I am using conan 2.2.2 on Ubuntu 20.04.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant