[MacPorts] #71142: perl5.36 @5.36.3_1 does not build on PPC Tiger, Mac OS X 10.4.11, because ld gets invoked with -rpath

MacPorts noreply at macports.org
Wed Oct 23 08:00:52 UTC 2024


#71142: perl5.36 @5.36.3_1 does not build on PPC Tiger, Mac OS X 10.4.11, because
ld gets invoked with -rpath
------------------------+----------------------
  Reporter:  ballapete  |      Owner:  mojca
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.10.2
Resolution:             |   Keywords:  tiger
      Port:  perl5.36   |
------------------------+----------------------
Changes (by ryandesign):

 * owner:  (none) => mojca
 * status:  new => assigned
 * cc: mojca@… (removed)
 * cc: evanmiller (added)
 * keywords:  tiger ppc => tiger


Comment:

 `-rpath` also gets used on my macOS 12 system.

 There's probably no need for `-rpath` to be used here because the
 libraries we install with MacPorts don't use `@rpath`-based install names.

 Fixing it so it doesn't use `-rpath`, at least on systems not supporting
 it, is probably the solution.

 The first place `-rpath` is mentioned in your log is:

 {{{
 :info:build LD_RUN_PATH="/opt/local/lib/db48" env
 MACOSX_DEPLOYMENT_TARGET=10.3 /opt/local/bin/gcc-apple-4.2
 -Wl,-rpath,"/opt/local/lib/db48" -bundle -undefined dynamic_lookup
 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc  version.o
 DB_File.o  -o ../../lib/auto/DB_File/DB_File.bundle  \
 :info:build    -L/opt/local/lib/db48 -ldb   \
 :info:build
 :info:build ld: -rpath can only be used when targeting Mac OS X 10.5 or
 later
 }}}

 I believe this comes from a bundled version of MakeMaker. The MakeMaker
 changelog entry for 7.63_06 Wed  3 Nov 01:24:05 GMT 2021 says:

 https://github.com/Perl-Toolchain-Gang/ExtUtils-
 MakeMaker/blob/30ec33570146ca3f87d0be1db182e62297febf90/Changes#L95-L98

 > * Add -rpath when compiling XS modules on macOS

 This is the upstream commit that implemented that change:

 https://github.com/Perl-Toolchain-Gang/ExtUtils-
 MakeMaker/commit/1960b01c504e60a49c972b1186466539112aa7ff

 And for MakeMaker 7.65_02 Fri 22 Jul 13:44:57 BST 2022 it says:

 https://github.com/Perl-Toolchain-Gang/ExtUtils-
 MakeMaker/blob/30ec33570146ca3f87d0be1db182e62297febf90/Changes#L53-L56

 > * Don't use rpath for macOS <= 10.4

 This is the upstream commit for that fix:

 https://github.com/Perl-Toolchain-Gang/ExtUtils-
 MakeMaker/commit/9b425120d4eb1d32b198ba0c0b2520b917c06c7a

 We backported the fix to the p5-extutils-makemaker port:

 [6317ad906d418d01b608c47e13c2ea4783764874/macports-ports]

 but perhaps not to the versions of MakeMaker bundled with Perl.

 Perl 5.36.3 bundles MakeMaker 7.64 so it does not have this fix.

 The fix appears to base the decision of whether to add `-rpath` on whether
 the running OS version is ≥ 10.5, which is not correct; it should have
 been based on the deployment target. However, it's better than no fix.

-- 
Ticket URL: <https://trac.macports.org/ticket/71142#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list