From 8db6e714ee534d44719ad6483bd82188e013998a Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 13 Apr 2025 13:57:35 -0400 Subject: [PATCH] libtorch-bin: drop libc++ replacement Darwin now uses the system libc++ by default, so drop the replacement. The nixpkgs libc++ is not ABI-compatible with the system libc++, so this replacement was not guaranteed to work anyway. See: https://discourse.llvm.org/t/apples-libc-now-provides-std-type-descriptor-t-functionality-not-found-in-upstream-libc/73881/3 --- pkgs/development/libraries/science/math/libtorch/bin.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index 5118017b247d..3f0168644a18 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -24,7 +24,6 @@ let device = if cudaSupport then "cuda" else "cpu"; srcs = import ./binary-hashes.nix version; unavailable = throw "libtorch is not available for this platform"; - libcxx-for-libtorch = if stdenv.hostPlatform.isDarwin then libcxx else (lib.getLib stdenv.cc.cc); in stdenv.mkDerivation { inherit version; @@ -87,9 +86,6 @@ stdenv.mkDerivation { for rpath in $(otool -L $f | grep rpath | awk '{print $1}');do install_name_tool -change $rpath $out/lib/$(basename $rpath) $f done - if otool -L $f | grep /usr/lib/libc++ >& /dev/null; then - install_name_tool -change /usr/lib/libc++.1.dylib ${libcxx-for-libtorch.outPath}/lib/libc++.1.0.dylib $f - fi done for f in $out/lib/*.dylib; do otool -L $f