Skip to content

Fix bundled curl and BoringSSL archive grouping - #7568

Open
mstoelzle wants to merge 1 commit into
isl-org:mainfrom
mstoelzle:codex/fix-bundled-curl-link-group
Open

mstoelzle wants to merge 1 commit into
isl-org:mainfrom
mstoelzle:codex/fix-bundled-curl-link-group

Conversation

@mstoelzle

Copy link
Copy Markdown

Type

Motivation and Context

On Linux shared-library builds with bundled curl and BoringSSL, the current manual linker markers surround the CMake interface target names. CMake expands those targets after the markers, so the generated link command contains an empty group and leaves libcurl.a, libssl.a, and libcrypto.a ungrouped. GNU ld then leaves strong TLS symbols unresolved in libOpen3D.so, and importing the Python package fails.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test results (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

This applies CMake's LINK_GROUP:RESCAN feature to the concrete build-tree archives used by the bundled curl target. It preserves the target's install-interface entries and leaves system curl/OpenSSL and Apple builds unchanged.

The generated Open3D shared-library link command now contains:

-Wl,--start-group
curl/lib/libcurl.a
boringssl/src/ext_boringssl/lib/libssl.a
boringssl/src/ext_boringssl/lib/libcrypto.a
-Wl,--end-group

The separate MKL archive group remains intact.

Validation on Ubuntu x86-64, Open3D b6c5e1963:

  • Configured with BUILD_SHARED_LIBS=ON, bundled curl, and bundled BoringSSL.
  • Built the complete pip-package target successfully.
  • Imported the generated open3d package successfully (0.20.0+b6c5e1963).
  • Created open3d.core.Device("CPU:0") successfully.
  • nm -D --undefined-only libOpen3D.so.0.20.0 contains no strong OpenSSL/TLS undefined symbols; only BoringSSL's three expected weak memory hooks remain.
  • python util/check_style.py --apply passes.

Copilot AI lite review requested due to automatic review settings September 17, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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 this pull request may close these issues.

Bundled static curl and BoringSSL archive grouping is ineffective in Linux source link

2 participants