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

cudnn: skip libcudnn_cnn_infer.so, instead of removing #96563

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 9 additions & 8 deletions pkgs/development/libraries/science/math/cudnn/generic.nix
Expand Up @@ -32,19 +32,20 @@ stdenv.mkDerivation {
mkdir -p $out
cp -a include $out/include
cp -a lib64 $out/lib64

${lib.optionalString (lib.versionAtLeast version "8") ''
# patchelf fails on libcudnn_cnn_infer due to it being too big.
# I'm hoping it's not needed for most programs.
# (https://github.com/NixOS/patchelf/issues/222)
rm -f $out/lib64/libcudnn_cnn_infer*
''}
'';

# Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found.
# See the explanation in addOpenGLRunpath.
postFixup = ''
addOpenGLRunpath $out/lib/lib*.so
for lib in $out/lib/lib*.so; do
# patchelf fails on libcudnn_cnn_infer due to it being too big.
# Most programs will still get the RPATH since they link to
# other things.
# (https://github.com/NixOS/patchelf/issues/222)
if [ "$(basename $lib)" != libcudnn_cnn_infer.so ]; then
addOpenGLRunpath $lib
fi
done
'';

propagatedBuildInputs = [
Expand Down