ghostscript: pad headers at link time to prevent install_name_tool failure on Darwin (#263833)

This commit is contained in:
Vincenzo Mantova 2023-11-05 19:46:28 +00:00 committed by GitHub
parent 545696ef57
commit 87d7169f5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,10 @@ stdenv.mkDerivation rec {
doCheck = false;
# don't build/install statically linked bin/gs
buildFlags = [ "so" ];
buildFlags = [ "so" ]
# without -headerpad, the following error occurs on Darwin when compiling with X11 support (as of 10.02.0)
# error: install_name_tool: changing install names or rpaths can't be redone for: [...]libgs.dylib.10 (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
++ lib.optional (x11Support && stdenv.isDarwin) "LDFLAGS=-headerpad_max_install_names";
installTargets = [ "soinstall" ];
postInstall = ''