Opened 2 years ago
Closed 7 days ago
#71142 closed defect (wontfix)
perl5.36 @5.36.3_1 does not build on PPC Tiger, Mac OS X 10.4.11, because ld gets invoked with -rpath
| Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | mojca (Mojca Miklavec) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.10.2 |
| Keywords: | tiger | Cc: | evanmiller (Evan Miller) |
| Port: | perl5.36 |
Description
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File' /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- DB_File.bs ../../lib/auto/DB_File/DB_File.bs 644 rm -f ../../lib/auto/DB_File/DB_File.bundle 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 \ -L/opt/local/lib/db48 -ldb \ ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make[1]: *** [../../lib/auto/DB_File/DB_File.bundle] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File' Unsuccessful make(cpan/DB_File): code=512 at make_ext.pl line 584. make: *** [lib/auto/DB_File/DB_File.bundle] Error 25 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3" && /usr/bin/make -w all Exit code: 2 Error: Failed to build perl5.36: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/main.log for details.
Attachments (2)
Change History (12)
Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | evanmiller added; mojca@… removed |
|---|---|
| Keywords: | ppc removed |
| Owner: | set to mojca |
| Status: | new → assigned |
-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:
- Add -rpath when compiling XS modules on macOS
This is the upstream commit that implemented that change:
And for MakeMaker 7.65_02 Fri 22 Jul 13:44:57 BST 2022 it says:
- Don't use rpath for macOS <= 10.4
This is the upstream commit for that fix:
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.
comment:2 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
On my old PPC Tiger and Leopard systems I have -rpath in these files:
pete 235 /\ nice find /Volumes/Tiger/opt/local/lib/perl5 /Volumes/Tiger/System/Library/Perl -type f -exec ggrep -n -e -rpath {} /dev/null \;
/Volumes/Tiger/opt/local/lib/perl5/5.34/ExtUtils/Liblist/Kid.pm:72: if ( $thislib =~ s/^(-[LR]|-Wl,-R|-Wl,-rpath,)// ) { # save path flag type
/Volumes/Tiger/opt/local/lib/perl5/5.34/ExtUtils/MM_Unix.pm:1053: qq{-rpath "$self->{LD_RUN_PATH}"} : '';
/Volumes/Tiger/opt/local/lib/perl5/5.34/ExtUtils/MakeMaker.pm:3367: PERL_MM_OPT='CCFLAGS="-Wl,-rpath -Wl,/foo/bar/lib" LIBS="-lwibble -lwobble"'
/Volumes/Tiger/opt/local/lib/perl5/5.34/darwin-thread-multi-2level/Config.pod:8284:as -R F<$archlibexp/C<CORE>> (Solaris) or -Wl,-rpath
/Volumes/Tiger/opt/local/lib/perl5/5.38/ExtUtils/Liblist/Kid.pm:77: if ( $thislib =~ s/^(-[LR]|-Wl,-R|-Wl,-rpath,)// ) { # save path flag type
/Volumes/Tiger/opt/local/lib/perl5/5.38/ExtUtils/MM_Unix.pm:1059: $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"};
/Volumes/Tiger/opt/local/lib/perl5/5.38/ExtUtils/MM_Unix.pm:1062: # both clang and gcc support -Wl,-rpath, but only clang supports
/Volumes/Tiger/opt/local/lib/perl5/5.38/ExtUtils/MM_Unix.pm:1063: # -rpath so by using -Wl,-rpath we avoid having to check for the
/Volumes/Tiger/opt/local/lib/perl5/5.38/ExtUtils/MM_Unix.pm:1065: $ldrun = qq{-Wl,-rpath,"$self->{LD_RUN_PATH}"};
/Volumes/Tiger/opt/local/lib/perl5/5.38/ExtUtils/MakeMaker.pm:3356: PERL_MM_OPT='CCFLAGS="-Wl,-rpath -Wl,/foo/bar/lib" LIBS="-lwibble -lwobble"'
/Volumes/Tiger/opt/local/lib/perl5/5.38/darwin-thread-multi-2level/Config.pod:8478:as -R F<$archlibexp/C<CORE>> (Solaris) or -Wl,-rpath
/Volumes/Tiger/System/Library/Perl/5.8.6/ExtUtils/MM_Unix.pm:1111: qq{-rpath "$self->{LD_RUN_PATH}"} : '';
/Volumes/Tiger/System/Library/Perl/5.8.6/darwin-thread-multi-2level/Config.pod:6769:as -R F<$archlibexp/C<CORE>> (Solaris) or -Wl,-rpath
pete 236 /\ !!:gs:Tiger:Leopard:
/Volumes/Leopard/opt/local/lib/perl5/5.34/ExtUtils/Liblist/Kid.pm:72: if ( $thislib =~ s/^(-[LR]|-Wl,-R|-Wl,-rpath,)// ) { # save path flag type
/Volumes/Leopard/opt/local/lib/perl5/5.34/ExtUtils/MM_Unix.pm:1053: qq{-rpath "$self->{LD_RUN_PATH}"} : '';
/Volumes/Leopard/opt/local/lib/perl5/5.34/ExtUtils/MakeMaker.pm:3367: PERL_MM_OPT='CCFLAGS="-Wl,-rpath -Wl,/foo/bar/lib" LIBS="-lwibble -lwobble"'
/Volumes/Leopard/opt/local/lib/perl5/5.34/darwin-thread-multi-2level/Config.pod:8284:as -R F<$archlibexp/C<CORE>> (Solaris) or -Wl,-rpath
/Volumes/Leopard/System/Library/Perl/5.8.8/ExtUtils/MM_Unix.pm:919: qq{-rpath "$self->{LD_RUN_PATH}"} : '';
/Volumes/Leopard/System/Library/Perl/5.8.8/darwin-thread-multi-2level/Config.pod:6884:as -R F<$archlibexp/C<CORE>> (Solaris) or -Wl,-rpath
In Kid.pm obviously a substitution takes place, in MakeMaker.pm it's part of documentation, and in MM_Unix.pm IRIX is addressed – except for Perl 5.38, installed only on Tiger:
1058 if ( $Is{IRIX} ) {
1059 $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"};
1060 }
1061 elsif ( $^O eq 'darwin' && $Is{AppleRPath} ) {
1062 # both clang and gcc support -Wl,-rpath, but only clang supports
1063 # -rpath so by using -Wl,-rpath we avoid having to check for the
1064 # type of compiler
1065 $ldrun = qq{-Wl,-rpath,"$self->{LD_RUN_PATH}"};
1066 }
Apple's versions are OK.
comment:3 Changed 2 years ago by kencu (Ken)
comment:4 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Here still no progress, same failurs as before:
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File' Running Mkbootstrap for DB_File () chmod 644 "DB_File.bs" /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- DB_File.bs ../../lib/auto/DB_File/DB_File.bs 644 /opt/local/bin/gcc-apple-4.2 -c -I/opt/local/include/db48 -std=gnu99 -fno-common -DPERL_DARWIN -pipe -Os -arch ppc -fno-strict-aliasing -I/opt/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -Wall -Werror=pointer-arith -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O3 -DVERSION=\"1.857\" -DXS_VERSION=\"1.857\" "-I../.." -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c "../../miniperl" "-I../../lib" "../../lib/ExtUtils/xsubpp" -noprototypes -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File/../../lib/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File/typemap' DB_File.xs > DB_File.xsc mv DB_File.xsc DB_File.c /opt/local/bin/gcc-apple-4.2 -c -I/opt/local/include/db48 -std=gnu99 -fno-common -DPERL_DARWIN -pipe -Os -arch ppc -fno-strict-aliasing -I/opt/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -Wall -Werror=pointer-arith -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O3 -DVERSION=\"1.857\" -DXS_VERSION=\"1.857\" "-I../.." -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t DB_File.c rm -f ../../lib/auto/DB_File/DB_File.bundle LD_RUN_PATH="/opt/local/lib/db48" /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 \ -L/opt/local/lib/db48 -ldb \ ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make[1]: *** [../../lib/auto/DB_File/DB_File.bundle] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File' make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File' /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.36/work/perl-5.36.3/cpan/DB_File/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- DB_File.bs ../../lib/auto/DB_File/DB_File.bs 644 rm -f ../../lib/auto/DB_File/DB_File.bundle LD_RUN_PATH="/opt/local/lib/db48" /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 \ -L/opt/local/lib/db48 -ldb \ ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make[1]: *** [../../lib/auto/DB_File/DB_File.bundle] Error 1
Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
| Attachment: | main.2.log added |
|---|
Main.log from PPC Tiger, Mac OS X 10.4.11, after close
comment:5 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I am using the up-to-date Portfile: -rw-r--r-- 1 polkitus x11 16768 15 Nov 23:20 /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/lang/perl5/Portfile. Before it was: 16505 22 Mai 14:38 /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/lang/perl5/Portfile.
comment:7 Changed 2 years ago by kencu (Ken)
as ryan pointed out above, perl 5.36 probably needs a fix like this [6317ad906d418d01b608c47e13c2ea4783764874/macports-ports], that made it into perl 5.38.
comment:8 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I am only trying to find out whether a more modern version of Perl would be usable substitute for Perl 5.34. Testing this one and its modules (I am working with 830 of them) shows problems, some immanent to too long path names to sockets in MacPorts, some due to other problems. If Perl 5.36 fails to build it would my life easier…
Anyway, I can easily share with others what I have prepared yet, Sonoma or Darwin 17 right now.
comment:9 Changed 7 days ago by ballapete (Peter "Pete" Dyballa)
Can be closed, because no Tiger support.
comment:10 Changed 7 days ago by reneeotten (Renee Otten)
| Resolution: | → wontfix |
|---|---|
| Status: | assigned → closed |

Main.log from PPC Tiger, Mac OS X 10.4.11