Skip to content

Commit

Permalink
rocmPackages_5: pin stdenv to GCC 12
Browse files Browse the repository at this point in the history
Try reverting this on a future ROCm release.

Addresses: #271943
  • Loading branch information
Madouura authored and Adam Joseph committed Dec 5, 2023
1 parent 66e2125 commit 93ebe44
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
9 changes: 7 additions & 2 deletions pkgs/development/rocm-modules/5/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ callPackage
{ gcc12Stdenv # FIXME: Try removing this with a new ROCm release https://github.com/NixOS/nixpkgs/issues/271943
, callPackage
, recurseIntoAttrs
, symlinkJoin
, fetchFromGitHub
Expand Down Expand Up @@ -73,10 +74,11 @@ in rec {
# Broken, too many errors
rdc = callPackage ./rdc {
inherit rocmUpdateScript rocm-smi rocm-runtime;
stdenv = gcc12Stdenv;
# stdenv = llvm.rocmClangStdenv;
};

rocm-docs-core = python3Packages.callPackage ./rocm-docs-core { };
rocm-docs-core = python3Packages.callPackage ./rocm-docs-core { stdenv = gcc12Stdenv; };

## ROCm-Developer-Tools ##
hip-common = callPackage ./hip-common {
Expand Down Expand Up @@ -107,17 +109,20 @@ in rec {
rocprofiler = callPackage ./rocprofiler {
inherit rocmUpdateScript clr rocm-core rocm-thunk rocm-device-libs roctracer rocdbgapi rocm-smi hsa-amd-aqlprofile-bin;
inherit (llvm) clang;
stdenv = gcc12Stdenv;
};

# Needs GCC
roctracer = callPackage ./roctracer {
inherit rocmUpdateScript rocm-device-libs rocm-runtime clr;
stdenv = gcc12Stdenv;
};

# Needs GCC
rocgdb = callPackage ./rocgdb {
inherit rocmUpdateScript;
elfutils = elfutils.override { enableDebuginfod = true; };
stdenv = gcc12Stdenv;
};

rocdbgapi = callPackage ./rocdbgapi {
Expand Down
17 changes: 9 additions & 8 deletions pkgs/development/rocm-modules/5/llvm/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv
{ # stdenv FIXME: Try changing back to this with a new ROCm release https://github.com/NixOS/nixpkgs/issues/271943
gcc12Stdenv
, callPackage
, rocmUpdateScript
, wrapBintoolsWith
Expand All @@ -12,18 +13,18 @@
let
## Stage 1 ##
# Projects
llvm = callPackage ./stage-1/llvm.nix { inherit rocmUpdateScript; };
clang-unwrapped = callPackage ./stage-1/clang-unwrapped.nix { inherit rocmUpdateScript llvm; };
lld = callPackage ./stage-1/lld.nix { inherit rocmUpdateScript llvm; };
llvm = callPackage ./stage-1/llvm.nix { inherit rocmUpdateScript; stdenv = gcc12Stdenv; };
clang-unwrapped = callPackage ./stage-1/clang-unwrapped.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; };
lld = callPackage ./stage-1/lld.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; };

# Runtimes
runtimes = callPackage ./stage-1/runtimes.nix { inherit rocmUpdateScript llvm; };
runtimes = callPackage ./stage-1/runtimes.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; };

## Stage 2 ##
# Helpers
bintools-unwrapped = callPackage ./stage-2/bintools-unwrapped.nix { inherit llvm lld; };
bintools = wrapBintoolsWith { bintools = bintools-unwrapped; };
rStdenv = callPackage ./stage-2/rstdenv.nix { inherit llvm clang-unwrapped lld runtimes bintools; };
rStdenv = callPackage ./stage-2/rstdenv.nix { inherit llvm clang-unwrapped lld runtimes bintools; stdenv = gcc12Stdenv; };
in rec {
inherit
llvm
Expand All @@ -40,8 +41,8 @@ in rec {

## Stage 3 ##
# Helpers
clang = callPackage ./stage-3/clang.nix { inherit llvm lld clang-unwrapped bintools libc libunwind libcxxabi libcxx compiler-rt; };
rocmClangStdenv = overrideCC stdenv clang;
clang = callPackage ./stage-3/clang.nix { inherit llvm lld clang-unwrapped bintools libc libunwind libcxxabi libcxx compiler-rt; stdenv = gcc12Stdenv; };
rocmClangStdenv = overrideCC gcc12Stdenv clang;

# Projects
clang-tools-extra = callPackage ./stage-3/clang-tools-extra.nix { inherit rocmUpdateScript llvm clang-unwrapped; stdenv = rocmClangStdenv; };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{ callPackage
{ stdenv
, callPackage
, rocmUpdateScript
, llvm
}:

callPackage ../base.nix rec {
inherit rocmUpdateScript;
inherit stdenv rocmUpdateScript;
targetName = "clang-unwrapped";
targetDir = "clang";
extraBuildInputs = [ llvm ];
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/rocm-modules/5/llvm/stage-1/lld.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{ callPackage
{ stdenv
, callPackage
, rocmUpdateScript
, llvm
}:

callPackage ../base.nix rec {
inherit rocmUpdateScript;
inherit stdenv rocmUpdateScript;
buildMan = false; # No man pages to build
targetName = "lld";
targetDir = targetName;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/rocm-modules/5/llvm/stage-1/llvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}:

callPackage ../base.nix {
inherit rocmUpdateScript;
inherit stdenv rocmUpdateScript;
requiredSystemFeatures = [ "big-parallel" ];
isBroken = stdenv.isAarch64; # https://github.com/RadeonOpenCompute/ROCm/issues/1831#issuecomment-1278205344
}
3 changes: 2 additions & 1 deletion pkgs/development/rocm-modules/5/llvm/stage-1/runtimes.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ lib
, stdenv
, callPackage
, rocmUpdateScript
, llvm
}:

callPackage ../base.nix rec {
inherit rocmUpdateScript;
inherit stdenv rocmUpdateScript;
buildDocs = false;
buildMan = false;
buildTests = false;
Expand Down

0 comments on commit 93ebe44

Please sign in to comment.