python icon indicating copy to clipboard operation
python copied to clipboard

autoPatchelfHook versus setting rpath

Open milahu opened this issue 3 years ago • 1 comments

i noticed in https://github.com/on-nix/python/commit/4d9a976ab5648a75db3a10a91619e9e1796abaa3 (shiboken6) that you fix the libstdc++.so.6: cannot open shared object file: No such file or directory error by doing some magic with rpath in

https://github.com/on-nix/python/blob/f93a125551bd469b09409dc189ec16e923540f2c/default.nix#L346

usually in nixpkgs, this is solved with

{
  buildInputs = [
    pkgs.stdenv.cc.cc # libstdc++.so.6: cannot open shared object file: No such file or directory
  ];
  nativeBuildInputs = [ autoPatchelfHook ];

for example in python-modules/jaxlib/bin.nix and some other packages

so ... is your rpath solution intentional? does it have some advantage over autoPatchelfHook? maybe autoPatchelfHook fails in some cases? or did you just copy old nix code? ; )

milahu avatar Apr 05 '22 07:04 milahu

Both are valid approaches, but no special reason exists

kamadorueda avatar Apr 19 '22 18:04 kamadorueda