Skip to content

[staging] boost: 1.81 -> 1.86#356102

Merged
fabianhjr merged 1 commit intoNixOS:stagingfrom
tobim:pkgs/switch-boost-to-186
Nov 22, 2024
Merged

[staging] boost: 1.81 -> 1.86#356102
fabianhjr merged 1 commit intoNixOS:stagingfrom
tobim:pkgs/switch-boost-to-186

Conversation

@tobim
Copy link
Contributor

@tobim tobim commented Nov 15, 2024

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot requested review from bjornfor and prusnak November 15, 2024 19:18
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Nov 15, 2024
@emilazy emilazy mentioned this pull request Nov 22, 2024
13 tasks
Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

Seems like a good idea; 1.81 has issues with GCC 14. We should probably backport fixes, but it seems indicative.

@tobim
Copy link
Contributor Author

tobim commented Nov 22, 2024

Thanks! I'd say let's just give it a shot and revert if it causes too much breakage downstream.

@fabianhjr fabianhjr merged commit 768e2ec into NixOS:staging Nov 22, 2024
@tobim tobim deleted the pkgs/switch-boost-to-186 branch November 23, 2024 05:39
@trofi
Copy link
Contributor

trofi commented Nov 23, 2024

Bisect says that 3aeb975 boost: 1.81 -> 1.86 broke pkgsi686Linux.boost build on staging as:

$ nix build --no-link -f. -L pkgsi686Linux.boost
...
gcc.compile.c++ bin.v2/libs/stacktrace/build/gcc-14/release/x86_32/threading-multi/visibility-hidden/from_exception.o
libs/stacktrace/build/../src/from_exception.cpp:170:2: error: #error On this platform memory leaks are possible if capturing stacktrace from exceptions is enabled and exceptions are thrown concurrently and libc++ runtime is used. Define `BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK` to suppress this error if the library would not be used with libc++ runtime (for example, it would be only used with GCC runtime). Otherwise, disable the boost_stacktrace_from_exception library build (for example by `./b2 boost.stacktrace.from_exception=off` option).
  170 | #error On this platform memory leaks are possible if capturing stacktrace from \
      |  ^~~~~

    "g++"   -fvisibility-inlines-hidden -fPIC -m32 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -march=i686  -DBOOST_ALL_NO_LIB=1 -DBOOST_COBALT_USE_STD_PMR=1 -DNDEBUG   -I"."  -c -o "bin.v2/libs/stacktrace/build/gcc-14/release/x86_32/threading-multi/visibility-hidden/from_exception.o" "libs/stacktrace/build/../src/from_exception.cpp"

...failed gcc.compile.c++ bin.v2/libs/stacktrace/build/gcc-14/release/x86_32/threading-multi/visibility-hidden/from_exception.o...

@tobim
Copy link
Contributor Author

tobim commented Nov 23, 2024

I looked into this a bit and I expect this to show up for other platforms as well. If you take a look at the code that produces the error: https://github.com/boostorg/stacktrace/blob/boost-1.86.0/src/from_exception.cpp#L162-L185
You will find that none of this should be evaluated if BOOST_STACKTRACE_ALWAYS_STORE_IN_PADDING is set to 0. That value of that is set at https://github.com/boostorg/stacktrace/blob/boost-1.86.0/src/exception_headers.h#L9-L13.

Does stdenv.hostPlatform.useLLVM imply that libcxx is used?
If yes we can set boost.stacktrace.from_exception=off in that case and define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK otherwise.
If not then I don't know.

@trofi
Copy link
Contributor

trofi commented Nov 23, 2024

Yes, at least by default (though stdenv.cc.libcxx != null might be a bit more robust):

# on x86_64-linux:
nix-repl> stdenv.cc.libcxx
null

nix-repl> pkgsLLVM.stdenv.cc.libcxx
«derivation /nix/store/v2n8l6z08s5pj1k2h72b5kv9gdws34y3-libcxx-x86_64-unknown-linux-gnu-18.1.8.drv»

At least building pkgsLLVM.re2c results in libcxx:

$ nix build -f. pkgsLLVM.re2c
$ lddtree result/bin/re2c | fgrep c++
    libc++.so.1 => /nix/store/vv1ml03vyvzk50y9sa53ip0dbg60mvsc-libcxx-x86_64-unknown-linux-gnu-18.1.8/lib/libc++.so.1
    libc++abi.so.1 => /nix/store/vv1ml03vyvzk50y9sa53ip0dbg60mvsc-libcxx-x86_64-unknown-linux-gnu-18.1.8/lib/libc++abi.so.1

@trofi
Copy link
Contributor

trofi commented Dec 23, 2024

innoextract build regressed in master. Proposed the fix as:

@trofi
Copy link
Contributor

trofi commented Dec 24, 2024

wesnoth build regressed in master. Proposed the fix to pin it to older version until there is an upstream support:

@trofi
Copy link
Contributor

trofi commented Apr 27, 2025

bombono regressed as well. Proposed the fix bi pinning as:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants