Don't use -rpath on macOS. The Portfile only applies this patch when the deployment target is earlier than 10.5 since those earlier systems don't have rpath. Fixes: gmake: *** No rule to make target 'all'. Stop. which is caused by the configuration failing to make a Makefile because: Expat must be installed prior to building XML::Parser and I can't find it in the standard library directories. Install 'expat-devel' (or 'libexpat1-dev') package with your OS package manager. See 'README'. which we can see if we add debugging output to CheckLib is caused by: ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status https://github.com/cpan-authors/XML-Parser/issues/103 https://github.com/mattn/p5-Devel-CheckLib/issues/40 --- inc/Devel/CheckLib.pm.orig 2023-12-28 13:47:02.000000000 -0600 +++ inc/Devel/CheckLib.pm 2024-11-30 02:23:00.000000000 -0600 @@ -295,7 +295,6 @@ $cfile, (!defined $lib ? () : ( (map "-L$_", @$libpaths), - ($^O eq 'darwin' ? (map { "-Wl,-rpath,$_" } @$libpaths) : ()), "-l$lib", )), @$ld,