Opened 2 weeks ago

Last modified 2 weeks ago

#71152 new defect

perl5.38 @5.38.2 fails to build, actually 'test', on PPC Leopard, Mac OS X 10.5.8, because of ld not being able handle -rpath?

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.2
Keywords: leopard ppc Cc: mojca@…
Port: perl5.38

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.38/work/perl-5.38.2/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.38/work/perl-5.38.2/cpan/DB_File/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- DB_File.bs ../../lib/auto/DB_File/DB_File.bs 644
/usr/bin/gcc-4.2 -c  -I/opt/local/include/db48 -std=gnu99 -fno-common -DPERL_DARWIN -pipe -Os -arch ppc -fno-strict-aliasing -fstack-protector -I/opt/local/include -D_FORTIFY_SOURCE=2 -Wall -Werror=pointer-arith -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O3   -DVERSION=\"1.858\" -DXS_VERSION=\"1.858\"  "-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.38/work/perl-5.38.2/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.38/work/perl-5.38.2/cpan/DB_File/typemap'  DB_File.xs > DB_File.xsc
mv DB_File.xsc DB_File.c
/usr/bin/gcc-4.2 -c  -I/opt/local/include/db48 -std=gnu99 -fno-common -DPERL_DARWIN -pipe -Os -arch ppc -fno-strict-aliasing -fstack-protector -I/opt/local/include -D_FORTIFY_SOURCE=2 -Wall -Werror=pointer-arith -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O3   -DVERSION=\"1.858\" -DXS_VERSION=\"1.858\"  "-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" env MACOSX_DEPLOYMENT_TARGET=10.3 /usr/bin/gcc-4.2 -Wl,-rpath,"/opt/local/lib/db48" -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -fstack-protector  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.38/work/perl-5.38.2/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.38/work/perl-5.38.2/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.38/work/perl-5.38.2/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 /usr/bin/gcc-4.2 -Wl,-rpath,"/opt/local/lib/db48" -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -fstack-protector  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.38/work/perl-5.38.2/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.38/work/perl-5.38.2'
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.38/work/perl-5.38.2" && /usr/bin/make -w all 
Exit code: 2
Error: Failed to build perl5.38: command execution failed

Attachments (1)

main.log (191.1 KB) - added by ballapete (Peter "Pete" Dyballa) 2 weeks ago.
Main.log from PPC Leopard, Mac OS X 10.5.8

Download all attachments as: .zip

Change History (4)

Changed 2 weeks ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Leopard, Mac OS X 10.5.8

comment:1 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)

As the message says, -rpath works when targeting 10.5 or later.

The bug is that perl is overriding MacPorts' request to target 10.5 and is instead targeting 10.3:

:info:configure What command should be used to create dynamic libraries? [env MACOSX_DEPLOYMENT_TARGET=10.3 /usr/bin/gcc-4.2] 
Version 0, edited 2 weeks ago by ryandesign (Ryan Carsten Schmidt) (next)

comment:2 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)

This happens in hints/darwin.sh only on Mac OS X 10.3 thru 10.5:

[7-9].*)   # OS X 10.3.x - 10.5.x
   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
   case "$ld" in
       *MACOSX_DEPLOYMENT_TARGET*) ;;
       *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
   esac
   ;;

comment:3 Changed 2 weeks ago by ballapete (Peter "Pete" Dyballa)

There is a patch file, /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/lang/perl5/files/5.38/avoid-no-cpp-precomp-PR38913.patch:

  1 --- hints/darwin.sh.orig
  2 +++ hints/darwin.sh
  3 @@ -130,7 +130,7 @@ esac
  4 
  5  # Avoid Apple's cpp precompiler, better for extensions
  6  if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
  7 -    cppflags="${cppflags} -no-cpp-precomp"
  8 +
  9 
 10      # This is necessary because perl's build system doesn't
 11      # apply cppflags to cc compile lines as it should.

So it would need an enhancement?

Note: See TracTickets for help on using tickets.