-
Notifications
You must be signed in to change notification settings - Fork 980
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
[bug] dependency cycle can't be avoided when bootstrapping a compiler #16758
Comments
Hi @smoofra Thanks for your report. I have just tried it and it works, I can do your above steps and it doesn't raise any error. You didn't report the Conan version, so maybe you are using Conan 1? I was trying with Conan 2. |
I'm using conan 2.5.0 |
I just tried it again in a fresh environment and I still get the erorr ubuntu 24.04, python 3.12.3
|
I have added a dockerfile to the example |
well, I found a workaround
It means that the gcc recipe can't be built using But my gcc recipe is already only possible to build inside its own special CI pipeline anyway for reasons so this is no great loss to me |
Sorry, I have limited connectivity now, can't really use docker now, but assigned it to have a look at my return. |
I have been investigating this. At the moment, it is not possible to have a dependency on the same def build_requirements(self):
if cross_building(self):
self.tool_requires("pkg/version") The reason it is this way is because it is very easy to fall in an infinite loop which results in the Conan application hanging forever until it exhausts and fail, which is very bad UX. The It is not possible then to use I'd say that your approach is good enough at the moment. I am not saying that we will not try to expand the bootstrapping capabilities, I will do some experiments to check what might be possible. |
This would be an experimental branch to investigate the possibilities: #16870 |
#16870 was merged, so this will be part of Conan 2.8. Feedback welcome! |
Describe the bug
I'm not sure if this ought to be a bug report or a feature request.
I'm working on a recipe for gcc, and I'm running into a bootstrapping
issue that I don't know how to solve.
My goals are:
Build gcc cross compilers for linux and package them with conan.
The minimum versions of the linux kernel and glibc that are being
targeted by the cross compiler should be specified in the settings.
Build a bootstrap gcc using whatever C compiler is available in path, and
then use that to build the main cross compiler.
I thought I had the whole scheme working.
This command does indeed succeed. It creates a bootstrap gcc, and then uses
the bootstrap gcc to build a final gcc.
But then when I try to use it, it all falls apart.
This dependency cycle would be a problem if I really was trying to build
cc
using
Linux-x86_64
as the build profile. But I don't need to build it. Ibuilt it already using
Linux-bootstrap
as the build profile. Thepackage_id
has not changed. Now I just want to use it. But because there'd be a dependency
cycle if I tried to build it this way, it doesn't even get that far.
What can I do?
Thanks for reading.
How to reproduce it
example code is here https://github.com/smoofra/conan-cc-bootstrap
The text was updated successfully, but these errors were encountered: