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

llvmPackages_11.libcxx: symlink cxxabi libs into libcxx #295767

Closed
wants to merge 1 commit into from
Closed

llvmPackages_11.libcxx: symlink cxxabi libs into libcxx #295767

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 14, 2024

fix stdenvBuildTools builds: https://hydra.nixos.org/build/253010316

workaround needed for building stdenvBuildTools which pins llvm11 but stdenv.darwin/default.nix dropped support (PR #292043) for compilers with non-unified libcxx / libcxxabi and thus cxxabi is not added to the extraPackages in cc-wrapper and path left out while linking. adding symlinks to libc++abi in libcxx/lib fixes this.

LLVM11 is slated for removal once unpinned from stdenvBuildTools (PR #295557) (it's only consumer).

the stdenvBuildTools have not been used to update the the bootstrap-tools tarball since 2020,2021.

Description of changes

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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 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.

present a unified libcxx / libcxxabi lib directory similar to LLVM12+
toolchains. This is required to for building darwin stdenvBootstrapTools which pins
LLVM11 causing it to bootstrap a llvm11 stdenv but the bootstrapping
code expects a unified libcxx / libcxxabi. Thus, builds which explicitly
link to -lc++abi break as the libcxxabi is not in the linker search
path. Symlinking libc++abi into libcxx/lib fixes this.
@ghost ghost changed the title llvmPackages_11.libcxx: add cxxabi to propagatedBuildInputs llvmPackages_11.libcxx: symlink cxxabi libs into libcxx Mar 14, 2024
@ghost
Copy link
Author

ghost commented Mar 14, 2024

eh. regardless of adding a symlink or using propagatedBuildInputs the stdenvBuildTools build fails with:

going to spend my effort to just unpin LLVM11 rather than mess around with whatever the issue is here.

error: output '/nix/store/aqn02d28riawi0h7819k6z2shyafkycs-stdenv-darwin' is not allowed to refer to the following paths:
         /nix/store/axrhbnny1x7207hny0887j3rzz7snjid-libcxxabi-11.1.0
error: 1 dependencies of derivation '/nix/store/lirfy39xrraniq5ddvsp9wh65px6c3z3-apple-framework-CoreFoundation-11.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/25vwq5x4ya4j19h3gfsr3d3sd73b3q34-autoreconf-hook.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ffqd3bwbv9fy35igxflfnz7bp2n3djba-libSystem-11.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pqg80pwkkb969gi6f10fjcv5znlsyd81-nuke-references.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yw6inckaz7mfprc7ypdv58zz52f17qb9-pkg-config-wrapper-0.29.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/axghn2d03vjqjgav1sa0vkvn2fcgp3xa-ps-adv_cmds-119.drv' failed to build
error: 1 dependencies of derivation '/nix/store/syy92g6f19l7iggdlvv1hqlsmw5xs1nc-stdenv-bootstrap-tools.drv' failed to build
error: build of '/nix/store/96gnq4vsslfijfd3l24s5v3q828ng3kz-stdenv-bootstrap-tools.drv', '/nix/store/syy92g6f19l7iggdlvv1hqlsmw5xs1nc-stdenv-bootstrap-tools.drv', '/nix/store/vbyji520aw5hbyp2w78g4rvycxqg9mds-test.drv' failed```

@ghost ghost closed this Mar 14, 2024
@ghost ghost deleted the fix-darwin-stdenvBootstrapTools branch March 14, 2024 03:27
@rrbutani rrbutani added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label May 27, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: work-in-progress This PR isn't done 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant