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

Provide a way to use system-provided dependency instead of building one from source #5188

Closed
hlopko opened this issue May 11, 2018 · 7 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request

Comments

@hlopko
Copy link
Member

hlopko commented May 11, 2018

This is a common feature request but I couldn't find it among issues. This is important for package maintainers, who need to split the "monorepo" style into more unixy style where third_party dependencies are installed on the system separately.

Details on why bundling everything in a single binary can be undesirable:
https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies
https://fedoraproject.org/wiki/Bundled_Libraries

@hlopko hlopko added type: feature request P2 We'll consider working on this in future. (Assignee optional) category: rules > C++ labels May 11, 2018
@hlopko
Copy link
Member Author

hlopko commented May 11, 2018

Comment from the user:

Ideally it would be great if bazel had a way to query pkg-config for the
deps. There is cc_library() for bazel bundled stuff maybe there could be
some kind of pkg-config_library(name="libpcre") and it would then do
CFLAGS+=$(pkg-config --cflags libpcre); LDLIBS+=$(pkg-config --libs libpcre)
and use that in place of recompiling the deps.

@hlopko
Copy link
Member Author

hlopko commented May 11, 2018

Related for package maintainers: #5186

@hlopko hlopko added team-Rules-CPP Issues for C++ rules and removed category: rules > C++ labels Oct 11, 2018
@dslomov dslomov added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. and removed team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged labels Nov 26, 2018
@aiuto
Copy link
Contributor

aiuto commented Oct 7, 2019

This is a fun project. I think there are a few parts to it

  • rules_cc specific, where we identify .h & .so files
  • but it is not just C++. Using Frameworks in ObjectiveC is important for MacOS. Likewise, Windows SDKs are presumed to be on the target system.
  • generic - find this binary on the system to create a toolchain for 'x'. We do something like this for autoconfiguring compilers, but there are lots of tools which people might want to install in their build images that are not needed at runtime (e.g. image format converters, OS specific packaging tools, tools that are not available in source).
  • If we are building packages for distribution, there is usually a need to specify dependencies to be installed on the target OS by the package manager. We might not be able to build many of those from source, but need to install the binary for things like testing the built image.

@Kernald
Copy link
Contributor

Kernald commented Oct 7, 2019

Having spent a big part of my week-end trying to link a C binary to the system-provided ncurses, I would love seing that becoming a thing.

@hlopko hlopko removed their assignment Dec 6, 2019
@aehlig aehlig removed their assignment Feb 1, 2020
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label May 24, 2023
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2023
@aiuto
Copy link
Contributor

aiuto commented Jun 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request
Projects
None yet
Development

No branches or pull requests

6 participants