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

1.87.0.beta1 has more overlinking than prior Boost versions (to Boost.Container/Boost.Graph) #985

Open
cho-m opened this issue Nov 26, 2024 · 0 comments

Comments

@cho-m
Copy link

cho-m commented Nov 26, 2024

Seen while testing beta at Homebrew/homebrew-core#198115

In Homebrew, we build both Boost.Python and Boost.MPI modules separately from rest of Boost as Homebrew doesn't have standard split packages.

With Boost 1.87.0.beta1, both modules end up building and trying to link to Boost.Container and Boost.Graph (and linkage cascades to dependents via installed CMake files)

However, when built with GNU ld --as-needed or macOS ld -dead_strip_dylibs, the linkage is stripped implying no symbols are used from Boost.Container and Boost.Graph shared libraries.

I wanted to check if this is intentional or a regression from some change (perhaps the various build system refactoring for modular builds).


The build is done via b2.

Roughly (there are other build environment details that are automatically handled in Homebrew), the build steps for Boost.Python on macOS are like:

$ ./bootstrap.sh --prefix=<prefix> --libdir=<lib> --with-libraries=python --with-python=<path/to/python3> --with-python-root=<path/to/python/root>
$ ./b2 \
  --build-dir=build-python3 \
  --stagedir=stage-python3 \
  --libdir=install-python3/lib \
  --prefix=install-python3 \
  python=3.12 \
  -d2 \
  -j4 \
  --layout=system \
  --user-config=user-config.jam \
  install \
  threading=multi \
  link=shared,static \
  cxxflags=-std=c++14 \
  cxxflags=-stdlib=libc++ \
  linkflags=-stdlib=libc++
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

1 participant