bazel: migrate curl & openssl to dd_cc_packaged & dd_collect_dependencies#49403
Draft
chouquette wants to merge 7 commits intochouquette/bazel/use_dd_collect_dependencies/4from
Draft
Conversation
adc2142 to
a43e57d
Compare
509ee09 to
13e245b
Compare
a43e57d to
aeb3d26
Compare
aeb3d26 to
c546639
Compare
When using foreign_cc_shared_wrapper on the same input but to extract 2 different libraries, we end up with the same label being exported twice which causes some rather obscure build error down the line: ERROR: /home/hugo.beauzee/.cache/bazel/_bazel_hugo.beauzee/95605d1a73395e0c041bb302da387b0e/external/+_repo_rules+curl/BUILD.bazel:222:18: in cc_shared_library rule @@+_repo_rules+curl//:curl: Traceback (most recent call last): File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 654, column 60, in _cc_shared_library_impl File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 251, column 33, in _build_exports_map_from_only_dynamic_deps Error: unsupported binary operation: string + Label
This is useful for dependencies such as openssl which ships 2 libraries from the same configure_make label
This allows us to use the wrapper object as the input for other rules such as rewrite_rpath
When the input comes from a label we can't easily adapt to the expected convention (foo for a label that points at libfoo.so) we need a way to ensure we don't generate a non-sensical symlink filename
Instead, add curl to the leaf dependencies entrypoint
532c884 to
cb43834
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Continue the migration toward installing dependencies with dd_collect_dependencies
This PR mostly handles OpenSSL, using cURL as the entry point that depends on it.
Most of the changes are actually related to our rules_foreign_cc wrapper, so that it integrates nicely with dd_cc_packaged
Motivation
Migrating away from omnibus.
Describe how you validated your changes
Local
bazel test //...and CIAdditional Notes
Based on top of #49386
The rules_pkg change is opened upstream at bazelbuild/rules_pkg#1053