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

Lack of llvmPackages.libcxxabi for e.g. 23.11 #543

Closed
kczulko opened this issue May 24, 2024 · 1 comment · Fixed by #554
Closed

Lack of llvmPackages.libcxxabi for e.g. 23.11 #543

kczulko opened this issue May 24, 2024 · 1 comment · Fixed by #554

Comments

@kczulko
Copy link
Contributor

kczulko commented May 24, 2024

Describe the bug
Bazel target fails in the following way when run on mac M1:

ERROR: /private/var/tmp/_bazel_pwierucki/d1617fa56bc5f38665e9fa6b517a1d51/external/io_bazel_rules_scala/src/java/io/bazel/rulesscala/scalac/BUILD:16:12: Target '@io_bazel_rules_scala//src/java/io/bazel/rulesscala/scalac:scalac' depends on toolchain '@nixpkgs_config_cc//:cc-compiler-darwin_arm64', which cannot be found: no such package '@nixpkgs_config_cc//': no such package '@nixpkgs_config_cc_info//': 
  Cannot build Nix derivation for package '@nixpkgs_config_cc_info'.
    Command: "/nix/var/nix/profiles/default/bin/nix-build" "-I" "nixpkgs=/private/var/tmp/_bazel_pwierucki/d1617fa56bc5f38665e9fa6b517a1d51/external/nixpkgs/nixpkgs" "/private/var/tmp/_bazel_pwierucki/d1617fa56bc5f38665e9fa6b517a1d51/external/nixpkgs_config_cc_info/external/rules_nixpkgs_cc/cc.nix" "-A" "" "--out-link" "bazel-support/nix-out-link" "--argstr" "ccType" "ccTypeDefault" "--argstr" "ccLang" "c++"
    Return code: 1
    Error output: 
      > error:
      >        … while calling the 'derivationStrict' builtin
      > 
      >          at /derivation-internal.nix:9:12:
      > 
      >             8|
      >             9|   strict = derivationStrict drvAttrs;
      >              |            ^
      >            10|
      > 
      >        … while evaluating derivation 'bazel-clang-wrapper-16.0.6-toolchain'
      >          whose name attribute is located at /private/var/tmp/_bazel_pwierucki/d1617fa56bc5f38665e9fa6b517a1d51/external/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:331:7
      > 
      >        … while evaluating attribute 'buildCommand' of derivation 'bazel-clang-wrapper-16.0.6-toolchain'
      > 
      >          at /private/var/tmp/_bazel_pwierucki/d1617fa56bc5f38665e9fa6b517a1d51/external/nixpkgs/pkgs/build-support/trivial-builders/default.nix:68:16:
      > 
      >            67|         enableParallelBuilding = true;
      >            68|         inherit buildCommand name;
      >              |                ^
      >            69|         passAsFile = [ "buildCommand" ]
      > 
      >        (stack trace truncated; use '--show-trace' to show the full trace)
      > 
      >        error: attribute 'libcxxabi' missing
      > 
      >        at /private/var/tmp/_bazel_pwierucki/d1617fa56bc5f38665e9fa6b517a1d51/external/nixpkgs_config_cc_info/external/rules_nixpkgs_cc/cc.nix:43:19:
      > 
      >            42|         echo "-L${pkgs.llvmPackages.libcxx}/lib" >> $out/nix-support/cc-cflags
      >            43|         echo "-L${pkgs.llvmPackages.libcxxabi}/lib" >> $out/nix-support/cc-cflags
      >              |                   ^
      >            44|         echo "-L${pkgs.libiconv}/lib" >> $out/nix-support/cc-cflags

'
ERROR: Analysis of target '//activity-sec:bin' failed; build aborted: 
INFO: Elapsed time: 0.758s
INFO: 0 processes.
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
    currently loading: @bazel_tools//src/main/protobuf
    Fetching repository @nixpkgs_java_runtime; Building Nix derivation
    Fetching repository @nixpkgs_config_cc; Restarting.
    Fetching repository @rules_proto_grpc_scala_maven; starting
    Fetching https://mirror.bazel.build/bazel_java_tools/releases/java/v12.7/java_tools-v12.7.zip; 1.1 MiB (2.9%)
    Fetching https://mirror.bazel.build/github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz; 599.2 KiB (26.1%)

To Reproduce

Expected behavior
A clear and concise description of what you expected to happen.

Environment

  • OS name + version:
  • Version of the code:

Additional context
Indeed, there's no longer such property for llvmPackages attribute set: https://search.nixos.org/packages?channel=23.11&from=0&size=50&sort=relevance&type=packages&query=llvmPackages.libcxxabi

echo "-L${pkgs.llvmPackages.libcxxabi}/lib" >> $out/nix-support/cc-cflags

@kczulko
Copy link
Contributor Author

kczulko commented May 24, 2024

Can be related with: NixOS/nixpkgs#292043

@avdv avdv linked a pull request Jun 20, 2024 that will close this issue
@mergify mergify bot closed this as completed in #554 Jun 21, 2024
avdv added a commit to tweag/rules_haskell that referenced this issue Jul 8, 2024
We need the fix for issue [rules_nixpkgs#543], see commit [f030ef9].

[rules_nixpkgs#543]: tweag/rules_nixpkgs#543
[f030ef9]: tweag/rules_nixpkgs@f030ef9
avdv added a commit to tweag/rules_haskell that referenced this issue Jul 8, 2024
We need the fix for issue [rules_nixpkgs#543], see commit [f030ef9].

[rules_nixpkgs#543]: tweag/rules_nixpkgs#543
[f030ef9]: tweag/rules_nixpkgs@f030ef9
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 a pull request may close this issue.

1 participant