Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#64188 closed defect (fixed)

10.5.8 PPC build error: symbol dyld_stub_binder not found (normally in libSystem.dylib)

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: powerpc, leopard, ppc64 Cc:
Port: g95

Description

	    | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_g95/g95/work/gcc-4.0.4/g95/gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_g95/g95/work/gcc-4.0.4/g95/gcc/ -B/opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/bin/ -B/opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/lib/ -isystem /opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/include -isystem /opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/sys-include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -Wa,-force_cpusubtype_ALL -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I./../intl -I../../gcc/../libcpp/include   -E -xassembler-with-cpp -; \
	} | gawk -f ../../gcc/mkmap-flat.awk -v leading_underscore=1 > libgcc/./tmp-libgcc.map
mv 'libgcc/./tmp-libgcc.map' libgcc/./libgcc.map
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_g95/g95/work/gcc-4.0.4/g95/gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_g95/g95/work/gcc-4.0.4/g95/gcc/ -B/opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/bin/ -B/opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/lib/ -isystem /opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/include -isystem /opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/powerpc-apple-darwin9/sys-include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -Wa,-force_cpusubtype_ALL -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -dynamiclib -nodefaultlibs -Wl,-install_name,/opt/local/lib/g95/powerpc-apple-darwin9/4.0.4/libgcc_s.1.0.dylib -Wl,-flat_namespace -o ./libgcc_s.1.0.dylib.tmp -Wl,-exported_symbols_list,libgcc/./libgcc.map -compatibility_version 1 -current_version 1.0  libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi2_s.o libgcc/./_floatdidf_s.o libgcc/./_floatdisf_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixunssfdi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_clear_cache_s.o libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./darwin-tramp_s.o libgcc/./darwin-ldouble_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-darwin_s.o libgcc/./unwind-sjlj_s.o libgcc/./unwind-c_s.o libgcc/./darwin-fallback_s.o -lc && rm -f ./libgcc_s.dylib && if [ -f ./libgcc_s.1.0.dylib ]; then mv -f ./libgcc_s.1.0.dylib ./libgcc_s.1.0.dylib.backup; else true; fi && mv ./libgcc_s.1.0.dylib.tmp ./libgcc_s.1.0.dylib && ln -s libgcc_s.1.0.dylib ./libgcc_s.dylib
ld: warning: -macosx_version_min not specificed, assuming 10.6
ld: symbol dyld_stub_binder not found (normally in libSystem.dylib).  Needed to perform lazy binding to function ___cmpdi2 for architecture ppc
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libgcc_s.dylib] Error 1
make[1]: *** [libgcc.a] Error 2
make: *** [all-gcc] Error 2
Command failed: export CC="/usr/bin/gcc-4.2";  export CPPFLAGS="-I/opt/local/include";  export CFLAGS="-Os -std=gnu89 -arch ppc";  export CFLAGS_FOR_BUILD="-Os -std=gnu89 -arch ppc";  export CFLAGS_FOR_TARGET="-Os -std=gnu89";  export LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc";  export MAKEINFO=missing; cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_g95/g95/work/gcc-4.0.4/g95;  ../configure --prefix=/opt/local/lib/g95/powerpc-apple-darwin9/4.0.4  --enable-languages=c  --disable-multilib  --with-included-gettext  --with-libiconv=/opt/local  --libdir=/opt/local/lib/g95/powerpc-apple-darwin9/4.0.4  --with-as=/opt/local/bin/as  --with-ld=/opt/local/bin/ld  --with-nm=/opt/local/bin/nm  --build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9;  make
Exit code: 2
Error: Failed to configure g95: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_g95/g95/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port g95 failed
36-9:~ arjuna$ 

Attachments (1)

g95.log (639.7 KB) - added by barracuda156 3 years ago.

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by barracuda156

Attachment: g95.log added

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: leopard added

If you're on 10.5, then "assuming 10.6" seems wrong and likely the source of the problem. Per https://lists.macports.org/pipermail/macports-dev/2016-March/032621.html,

dyld_stub_binder only exists for i386 and x86_64 on OSX. It was added to libSystem in SnowLeopard.

comment:2 in reply to:  1 Changed 3 years ago by barracuda156

Replying to ryandesign:

If you're on 10.5, then "assuming 10.6" seems wrong and likely the source of the problem. Per https://lists.macports.org/pipermail/macports-dev/2016-March/032621.html,

dyld_stub_binder only exists for i386 and x86_64 on OSX. It was added to libSystem in SnowLeopard.

I have attached the log, I tried to build g95 on 10.5.8 PPC. (Though I do have 10.6 PPC, I have been requested not to report 10.6 PPC-specific problems here. So I build problematic ports on 10.5.8 and report when they fail on Leopard.)

comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

-macosx_version_min not specificed is also interesting (not only for the typo of "specified") but because MacPorts already sets MACOSX_DEPLOYMENT_TARGET='10.5' in all phases, which is supposed to be equivalent to the compiler flag -mmacosx-version-min and the linker flag -macosx_version_min.

From closer inspection of the log, I see that MACOSX_DEPLOYMENT_TARGET is actually not getting set here. And this is because the failure is occurring in code run by a pre-configure block. The block of code goes to some lengths to attempt to replicate what MacPorts does in the standard phases, including setting several of the usual environment variables, but it has neglected to set MACOSX_DEPLOYMENT_TARGET.

comment:4 Changed 3 years ago by kencu (Ken)

agreed, the deployment target needs to be properly set (and macosx version min) for the right linker symbols to be chosen for 10.5.

that is likely the fix here.

(Also, this might fix PPC 10.5 but still leave PPC 10.6 broken, as PPC 10.6 is often not the same as a current Intel 10.6, and symbol assumptions based on os version are incorrect there sometimes. This is what I had to tweak in gcc7 for PPC 10.6, and this is a big part of why tickets sgainst 10.6 PPC would eventually frustrate people trying to help you.)

comment:5 in reply to:  4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to kencu:

agreed, the deployment target needs to be properly set

I'm working on it.

(and macosx version min)

Really? Just setting the deployment target is not enough? I thought they were equivalent.

comment:6 Changed 3 years ago by kencu (Ken)

belt and suspenders :>

comment:7 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

In 2d54435f35507bbd16af545376070b0234ba5521/macports-ports (master):

g95: Set MACOSX_DEPLOYMENT_TARGET

See: #64188

Also use system's -W argument instead of running cd manually.

comment:8 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Let us know if that changed anything for you.

comment:9 in reply to:  8 ; Changed 3 years ago by barracuda156

Replying to ryandesign:

Let us know if that changed anything for you.

Thank you, it builds now:

36-85:~ svacchanda$ port -v installed g95
The following ports are currently installed:
  g95 @0.94_1 (active) requested_variants='' platform='darwin 9' archs='ppc64' date='2022-03-19T21:09:04+0800'

We have to fix download website however in portfile, since the old ftp is down. I used @0.94 from here: https://fossies.org/linux/misc/g95_source.tgz/

comment:10 Changed 3 years ago by barracuda156

Keywords: powerpc ppc64 added
Summary: 10.5.8 PPC build error: symbol dyld_stub_binder not found (normally in libSystem.dylib)10.5.8 PPC build error: symbol dyld_stub_binder not found (normally in libSystem.dylib): Fixed

comment:11 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed
Summary: 10.5.8 PPC build error: symbol dyld_stub_binder not found (normally in libSystem.dylib): Fixed10.5.8 PPC build error: symbol dyld_stub_binder not found (normally in libSystem.dylib)

comment:12 in reply to:  9 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to barracuda156:

We have to fix download website however in portfile, since the old ftp is down.

Looks like the domain name has been taken over by someone else and it is delivering a 200 OK response for any URL, including the URL of the old distfile. But it's a different problem than the one this ticket is about. File a new one.

I used @0.94 from here: https://fossies.org/linux/misc/g95_source.tgz/

If you'd like to propose updating the port to a new version please file a new ticket or pull request.

Note: See TracTickets for help on using tickets.