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] build_id() and packaging prebuilt libraries #15437

Closed
1 task done
daltonv opened this issue Jan 10, 2024 · 8 comments · Fixed by #15439
Closed
1 task done

[question] build_id() and packaging prebuilt libraries #15437

daltonv opened this issue Jan 10, 2024 · 8 comments · Fixed by #15439
Assignees
Milestone

Comments

@daltonv
Copy link

daltonv commented Jan 10, 2024

My team packages an SDK for a mcu vendor for conan distribution. The SDK comes as a zip file with the sdk sources and prebuilt libraries for 3 different compilers.

I setup my conan recipe so that my build() method really just downloads the SDK of the right version from a publicly accessible link on the vendor's site. The package() method just copies the right libs based on the settings from the profile being used.

This is all working for me, but I would like to avoid pointlessly redownloading the sdk for each package binary I produce as all variants depend on the same sdk.

I found the build_id() method can do this, but it seems to only work for multiple build types. If I try to set self.info_build.settings.compiler = "Any" in the method I get and error about Any not being a valid selection. ConanException: Invalid setting 'Any' is not a valid 'settings.compiler' value..

Is there some way to set that every compiler uses the same "build"?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded memsharded self-assigned this Jan 10, 2024
@memsharded
Copy link
Member

Hi @daltonv

Thanks for your report. I assume this is 2.0
I have been able to reproduce in 2.0, it seems there is a gap for settings that are not final (that have nested sub-settings), I am checking it.

@daltonv
Copy link
Author

daltonv commented Jan 10, 2024

Yep this 2.0. 2.0.16 to be exact.

@memsharded
Copy link
Member

While I am investigating it in #15439, a quick question: is it possible that you don't want to define the compiler setting in the first place? It seems that this package will have a low variability, and it is likely that it is enough to not define the compiler setting directly? What is the binary variability?

@daltonv
Copy link
Author

daltonv commented Jan 10, 2024

The SDK provides 3 static libs that are really all just variants of the same built source code for 3 different compilers. I really do need each lib to be its own package binary, so the consumer of the package just needs to setup their profile right and they get the right library for the compiler their project is using.

@memsharded
Copy link
Member

Oh, I see. So the variability is indeed over the compiler, got it.
Ok, please track progress of #15439, I hope we can unblock this soon. Thanks for the feedback!

@daltonv
Copy link
Author

daltonv commented Jan 11, 2024

Sounds good. Thanks for looking into it!

@memsharded
Copy link
Member

#15439 has been merged, so this will be available next Conan 2.1 release

@daltonv
Copy link
Author

daltonv commented Jan 15, 2024

Awesome thanks for the quick fix!

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

Successfully merging a pull request may close this issue.

2 participants