Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#33939 closed defect (fixed)

Apple-gcc42 does not build on PPC Tiger because libSystem is only 2-way fat ppc/ppc64

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: apple-gcc42

Description

That's true! /usr/lib/libc.dylib is a sym-link to libSystem.dylib which is a sym-link to libSystem.B.dylib

-r-xr-xr-x  1 root wheel  4398204 22. Okt 2009  libSystem.B.dylib
-r-xr-xr-x  1 root wheel 20275625 20. Sep 2007  libSystem.B_debug.dylib
-r-xr-xr-x  1 root wheel 20125562 20. Sep 2007  libSystem.B_profile.dylib
lrwxr-xr-x  1 root wheel       17 29. Nov 2009  libSystem.dylib -> libSystem.B.dylib
lrwxr-xr-x  1 root wheel       23 29. Nov 2009  libSystem_debug.dylib -> libSystem.B_debug.dylib
lrwxr-xr-x  1 root wheel       25 29. Nov 2009  libSystem_profile.dylib -> libSystem.B_profile.dylib
lrwxr-xr-x  1 root wheel       15 29. Nov 2009  libc.dylib -> libSystem.dylib

and that is

Fat header in: /usr/lib/libSystem.B.dylib
fat_magic 0xcafebabe
nfat_arch 2
architecture ppc
    cputype CPU_TYPE_POWERPC
    cpusubtype CPU_SUBTYPE_POWERPC_ALL
    offset 4096
    size 2221800
    align 2^12 (4096)
architecture ppc64
    cputype CPU_TYPE_POWERPC64
    cpusubtype CPU_SUBTYPE_POWERPC_ALL
    offset 2228224
    size 2169980
    align 2^12 (4096)

Xcodebuild returns

Component versions: DevToolsCore-798.0; DevToolsSupport-794.0

and Xcode is version 2.5. So this failure happens:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/objroot/obj-powerpc-i686/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/objroot/obj-powerpc-i686/./gcc/ -B/opt/local/i686-apple-darwin8/bin/ -B/opt/local/i686-apple-darwin8/lib/ -isystem /opt/local/i686-apple-darwin8/include -isystem /opt/local/i686-apple-darwin8/sys-include  -O2  -O2 -g -O2  -std=gnu89  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -dynamiclib -nodefaultlibs -install_name /usr/lib/libgcc_s`if test . = ppc64 ; then echo _. ; fi`.1.dylib -single_module -o ./libgcc_s.1.dylib.tmp -Wl,-exported_symbols_list,libgcc/./libgcc.map -compatibility_version 1 -current_version 1.0  libgcc/./_get_pc_thunk_ax_s.o libgcc/./_get_pc_thunk_dx_s.o libgcc/./_get_pc_thunk_cx_s.o libgcc/./_get_pc_thunk_bx_s.o libgcc/./_get_pc_thunk_si_s.o libgcc/./_get_pc_thunk_di_s.o libgcc/./_get_pc_thunk_bp_s.o 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/./_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/./_bswapsi2_s.o libgcc/./_bswapdi2_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixsfti_s.o libgcc/./_fixunssfdi_s.o libgcc/./_fixunssfti_s.o libgcc/./_floatdisf_s.o libgcc/./_floattisf_s.o libgcc/./_floatundisf_s.o libgcc/./_floatuntisf_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixdfti_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_fixunsdfti_s.o libgcc/./_floatdidf_s.o libgcc/./_floattidf_s.o libgcc/./_floatundidf_s.o libgcc/./_floatuntidf_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixxfti_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_fixunsxfti_s.o libgcc/./_floatdixf_s.o libgcc/./_floattixf_s.o libgcc/./_floatundixf_s.o libgcc/./_floatuntixf_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixtfti_s.o libgcc/./_fixunstfdi_s.o libgcc/./_fixunstfti_s.o libgcc/./_floatditf_s.o libgcc/./_floattitf_s.o libgcc/./_floatunditf_s.o libgcc/./_floatuntitf_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-64_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-darwin_s.o libgcc/./unwind-sjlj_s.o libgcc/./unwind-c_s.o -lc
/usr/bin/ld: warning fat file: /usr/lib/libc.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
_getpagesize
_mprotect
_abort
_memcpy
_memset
_pthread_once
_strlen
__keymgr_get_and_lock_processwide_ptr
__keymgr_set_and_unlock_processwide_ptr
__keymgr_unlock_processwide_ptr
_calloc
_free
_getsectdatafromheader
_malloc
collect2: ld returned 1 exit status
make[4]: *** [libgcc_s.dylib] Error 1
make[3]: *** [stmp-multilib] Error 2
make[2]: *** [all-gcc] Error 2
make[1]: *** [all] Error 2
+ exit 1
make: *** [install] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/gcc-5666.3'
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/gcc-5666.3" && /usr/bin/make -w install CC="/usr/bin/gcc-4.0 -std=gnu89" PREFIX="/opt/local" SRCROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/gcc-5666.3" OBJROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/objroot" SYMROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/symroot" DSTROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/destroot" RC_NONARCH_CFLAGS="-pipe -std=gnu89" RC_OS="macos" RC_ARCHS="ppc" TARGETS="i386 ppc" " returned error 2

This happens after line 5895 with

Comparing stages 2 and 3

and 5896 lines following till the end.

Is something newer available for Tiger somewhere? Os is there a chance to build apple-gcc42

Attachments (2)

main.log (7.8 MB) - added by ballapete (Peter "Pete" Dyballa) 12 years ago.
main.log
main.2.log (7.0 MB) - added by ballapete (Peter "Pete" Dyballa) 12 years ago.
New main.log

Change History (14)

Changed 12 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

main.log

comment:1 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from macports-tickets@… to jeremyhu@…
Status: newassigned
Summary: Apple-gcc42, now needed by Ghostscript @9.05, Revision 1, does not build on PPC Tiger, 10.4.11m because fat file: /usr/lib/libc.dylib does not contain i386 archApple-gcc42 does not build on PPC Tiger because libSystem is only 2-way fat ppc/ppc64

Ah, I didn't realize Tiger/ppc didn't contain Intel slices in libSystem.

comment:2 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Can you try this:

Index: Portfile
===================================================================
--- Portfile	(revision 91509)
+++ Portfile	(working copy)
@@ -178,6 +178,10 @@
     }
 }
 
+if {${os.major} == 8 && ${build_arch} == "ppc"} {
+    ldelete build_targets i386
+}
+
 # TODO: arm?
 
 build.args-append \

The resulting apple-gcc42 will not build i386 code, but I suspect that isn't a concern for you. I'll try to figure out a better solution using the 10.4u SDK to build it.

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

Cc: ryandesign@… added; jeremyhu@… removed
Status: assignednew

"platform darwin 8 powerpc {...}" would be simpler...

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

Has duplicate #33936.

comment:5 in reply to:  2 Changed 12 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Can you try this:

It leads to them effect, that

.... TARGETS="i386 ppc" " returned error 2

comment:6 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Ok, well I think this should do it: r91750

Please verify.

comment:7 in reply to:  6 ; Changed 12 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Ok, well I think this should do it: r91750

Please verify.

This is, after a 'port selfupdate', now (presumingly, because the locate data base was not rebuilt since 18 hours) the status of apple-gcc42 related Portfiles:

-rw-r--r--   1 root  wheel  7917  9 Apr 19:00 /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/apple-gcc42/Portfile
-rw-r--r--   1 root  wheel  6358  9 Apr 01:39 /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/apple-gcc42/Portfile
-rw-r--r--   1 root  admin   759  8 Jul  2011 /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/apple-gcc42-devel/Portfile
-rw-r--r--   1 root  wheel   759  8 Jul  2011 /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/apple-gcc42-devel/Portfile

OK, the two devel files are presumingly not meaningful, but which of the two others is the "active" Portfile? And how can I determine it? Last night I simply patched both...

The start looks quite good now:

  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/gcc-5666.3/build_gcc "ppc" "ppc" \

If the failure will still happen, than it will happen in approximately ten hours, when I'll be asleep.

comment:8 in reply to:  7 ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to Peter_Dyballa@…:

The directories "ports" and "base" in "/opt/local/var/macports/sources/rsync.macports.org/release" are no longer used by current versions of MacPorts and can be deleted.

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

Replying to ryandesign@…:

That's assuming you have the following line in your /opt/local/etc/macports/sources.conf file:

rsync://rsync.macports.org/release/tarballs/ports.tar [default]

If you still have the old rsync line there (the one that doesn't reference "tarballs"), you should change it to the new one.

comment:10 in reply to:  6 Changed 12 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Ok, well I think this should do it: r91750

Please verify.

New problems came up, with setting of permissions, as is missing...

I am attaching the new main.log file.

Changed 12 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.2.log added

New main.log

comment:11 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed

Ok, well at least I know it got to destroot =)

r91793 should fix that now.

comment:12 in reply to:  11 Changed 12 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Ok, well at least I know it got to destroot =)

r91793 should fix that now.

Yes, apple-gcc42 finally built! (And upgrading Ghostscript built ld64.)

Note: See TracTickets for help on using tickets.