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

[feature] Add --no-binary-packages option to conan install #7212

Closed
1 task done
rconde01 opened this issue Jun 18, 2020 · 8 comments
Closed
1 task done

[feature] Add --no-binary-packages option to conan install #7212

rconde01 opened this issue Jun 18, 2020 · 8 comments

Comments

@rconde01
Copy link

There may be a better place to put this, but sometimes you want all packages to be built locally. For example on linux, maybe you don't want to wait to get glibc linker errors...just force local building. You can use --build...but then if you need to call it again later, it rebuilds everything not just the new stuff. I could also imagine specifying this on a package by package basis, but the global functionality would be good to have too.

@rconde01
Copy link
Author

I guess you can add --build new_package1 --build new_package2...a bit manual though

@memsharded
Copy link
Member

It is possible that the best approach is to customize settings: https://docs.conan.io/en/latest/extending/custom_settings.html. You will have full control over what is built, and if glibc is the issue, adding glibc to the settings will give you exactly the behavior you want, without needing to manually manage --build.

@jgsogo
Copy link
Contributor

jgsogo commented Jun 19, 2020

Talking with someone last week, for a related issue, we thought about a different approach: adding a flag to a remote so no binaries are downloaded from it. It is like adding a --no-binaries flag at the moment of adding the remote, from that point on, Conan will retrieve the recipes but not the binaries.

No need to modify the global config, package-IDs compute the same values, other remotes are not affected.

@rconde01
Copy link
Author

Here's another use case. I'm finding that some of the packages i'm using don't have pdbs. In any case, IIRC, packaged PDBs can be problematic since the local source paths are different than the build server. So - then, you want to do all builds of Debug/RelWithDebInfo locally so that is not an issue. You check out your repo, and specify --build. But again, this becomes a problem next time you checkout.

Here you could have some fake setting similar to what you specified above. But I think that is a bit hacky, and it feels a bit icky to mess around with global settings for this.

@rconde01
Copy link
Author

Now I realize, I don't think building locally even fixes the pdbs...because the packages aren't including them anyhow. Maybe if you leave your build dirs around it will work. So...I suppose i'll have to create a lot of issues :(

@jgsogo
Copy link
Contributor

jgsogo commented Jun 22, 2020

There are some open issues about how to debug packages, we wrote some docs about it and there you can find the links to the issues too: https://docs.conan.io/en/latest/using_packages/debugging.html

@rconde01
Copy link
Author

So a few people have been discussion this separately here . It's interesting that exists, but if the recipe deletes the pdbs (which is typical on cci), then building locally doesn't help.

@memsharded
Copy link
Member

Automatically copying the PDBs without having to modify recipes can be done with this Conan 2 hook in the Conan extensions repo: https://github.com/conan-io/conan-extensions/blob/main/extensions/hooks/_hook_copy_pdbs_to_package.py

For the other discussion, we have learned since then that the best approaches are:

  • Correctly model the binaries, if necessary use custom settings to represent new binaries
  • Use ConanCenter packages building them from conan-center-index fork (or using the local-recipes-index feature), as recommended in https://docs.conan.io/2/devops/using_conancenter.html

Closing this ticket as not planned

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

3 participants