Skip to content

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
chouquette/bazel/use_dd_collect_dependencies/5
Draft

bazel: migrate curl & openssl to dd_cc_packaged & dd_collect_dependencies#49403
chouquette wants to merge 7 commits intochouquette/bazel/use_dd_collect_dependencies/4from
chouquette/bazel/use_dd_collect_dependencies/5

Conversation

@chouquette
Copy link
Copy Markdown
Contributor

@chouquette chouquette commented Apr 15, 2026

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 CI

Additional Notes

Based on top of #49386
The rules_pkg change is opened upstream at bazelbuild/rules_pkg#1053

@chouquette chouquette added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation labels Apr 15, 2026
@chouquette chouquette force-pushed the chouquette/bazel/use_dd_collect_dependencies/4 branch from adc2142 to a43e57d Compare April 15, 2026 17:08
@chouquette chouquette force-pushed the chouquette/bazel/use_dd_collect_dependencies/5 branch from 509ee09 to 13e245b Compare April 15, 2026 17:08
@chouquette chouquette force-pushed the chouquette/bazel/use_dd_collect_dependencies/4 branch from a43e57d to aeb3d26 Compare April 16, 2026 07:34
@chouquette chouquette changed the title Chouquette/bazel/use dd collect dependencies/5 bazel: migrate curl & openssl to dd_cc_packaged & dd_collect_dependencies Apr 16, 2026
@chouquette chouquette force-pushed the chouquette/bazel/use_dd_collect_dependencies/4 branch from aeb3d26 to c546639 Compare April 16, 2026 08:34
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
@chouquette chouquette force-pushed the chouquette/bazel/use_dd_collect_dependencies/5 branch from 532c884 to cb43834 Compare April 16, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant