Perl-Toolchain-Gang / ExtUtils-MakeMaker

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

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

Open kevinxie4c opened 9 months ago

kevinxie4c commented 9 months 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" ...