Perl-Toolchain-Gang / ExtUtils-MakeMaker

Perl module to make Makefiles and build modules (what backs Makefile.PL)
https://metacpan.org/release/ExtUtils-MakeMaker
65 stars 77 forks source link

fix rpath issue on MacOS: rpath only accept a single path #448

Open kevinxie4c opened 1 year ago

kevinxie4c commented 1 year ago

On MacOS (at least on MacOS 12 I tested), rpath should be a single path (instead of colon-separated paths). Otherwise, the loader might fail to load the dependencies. Check out this blog. So the arguments passed to g++ should look like this

LD_RUN_PATH="/path/aaa:/path/bbb" g++ -Wl,-rpath,"/path/aaa" -Wl,-rpath,"/path/bbb" ...