Skip to content

Fix parsing of rpaths which include spaces in runInjectRPaths (8.10)

Matthew Pickering requested to merge wip/fix-rpath-8.10 into ghc-8.10

The logic didn't account for the fact that the paths could contain spaces before which led to errors such as the following from install_name_tool.

Stderr ( T14304 ):
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
    Call hs_init_ghc() from your main() function to set these options.
error: /nix/store/a6j5761iy238pbckxq2xrhqr2d5kra4m-cctools-binutils-darwin-949.0.1/bin/install_name_tool: for: dist/build/libHSp-0.1-ghc8.10.6.dylib (for architecture arm64) option "-add_rpath /Users/matt/ghc/bindisttest/install   dir/lib/ghc-8.10.6/ghc-prim-0.6.1" would duplicate path, file already has LC_RPATH for: /Users/matt/ghc/bindisttest/install   dir/lib/ghc-8.10.6/ghc-prim-0.6.1
`install_name_tool' failed in phase `Install Name Tool'. (Exit code: 1)

Fixes #20212 (closed)

Edited by Matthew Pickering

Merge request reports