Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#12065 closed defect (fixed)

BUG: gcc42-4.2.0 build fails while executing ar

Reported by: ludwig@… Owned by: mww@…
Priority: High Milestone:
Component: ports Version: 1.4.40
Keywords: gcc42 build failure Cc: pguyot (Paul Guyot), mww@…
Port:

Description

My system is an Intel Core Duo running Mac OS X 10.4.9. Xcode is version 2.4.1, port is 1.442.

My attempts to install the gcc42 port fail when the build system tries to create libgcov.a and libgcc.a. The error message is

rm -f ./libgcc.a
/opt/local/i386-apple-darwin8.9.1/bin/ar  rc ./libgcc.a libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_clear_cache.o libgcc/./_enable_execute_stack.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o libgcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popcountdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o libgcc/./_powisf2.o libgcc/./_powidf2.o libgcc/./_powixf2.o libgcc/./_powitf2.o libgcc/./_mulsc3.o libgcc/./_muldc3.o libgcc/./_mulxc3.o libgcc/./_multc3.o libgcc/./_divsc3.o libgcc/./_divdc3.o libgcc/./_divxc3.o libgcc/./_divtc3.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfsi.o libgcc/./_fixunsxfsi.o libgcc/./_fixsfdi.o libgcc/./_fixsfti.o libgcc/./_fixunssfdi.o libgcc/./_fixunssfti.o libgcc/./_floatdisf.o libgcc/./_floattisf.o libgcc/./_floatundisf.o libgcc/./_floatuntisf.o libgcc/./_fixdfdi.o libgcc/./_fixdfti.o libgcc/./_fixunsdfdi.o libgcc/./_fixunsdfti.o libgcc/./_floatdidf.o libgcc/./_floattidf.o libgcc/./_floatundidf.o libgcc/./_floatuntidf.o libgcc/./_fixxfdi.o libgcc/./_fixxfti.o libgcc/./_fixunsxfdi.o libgcc/./_fixunsxfti.o libgcc/./_floatdixf.o libgcc/./_floattixf.o libgcc/./_floatundixf.o libgcc/./_floatuntixf.o libgcc/./_fixtfdi.o libgcc/./_fixtfti.o libgcc/./_fixunstfdi.o libgcc/./_fixunstfti.o libgcc/./_floatditf.o libgcc/./_floattitf.o libgcc/./_floatunditf.o libgcc/./_floatuntitf.o libgcc/./_eprintf.o libgcc/./__gcc_bcmp.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./darwin-64.o
rm -f ./libgcov.a
/opt/local/i386-apple-darwin8.9.1/bin/ar  rc ./libgcov.a libgcc/./_gcov.o libgcc/./_gcov_merge_add.o libgcc/./_gcov_merge_single.o libgcc/./_gcov_merge_delta.o libgcc/./_gcov_fork.o libgcc/./_gcov_execl.o libgcc/./_gcov_execlp.o libgcc/./_gcov_execle.o libgcc/./_gcov_execv.o libgcc/./_gcov_execvp.o libgcc/./_gcov_execve.o libgcc/./_gcov_interval_profiler.o libgcc/./_gcov_pow2_profiler.o libgcc/./_gcov_one_value_profiler.o
/opt/local/i386-apple-darwin8.9.1/bin/ar: ./libgcov.a: Invalid operation
/opt/local/i386-apple-darwin8.9.1/bin/ar: ./libgcc.a: Invalid operation

Regards

Christoph

Attachments (1)

install_gcc42.log.gz (30.3 KB) - added by ludwig@… 17 years ago.
gzipped log of failed gcc42 build

Download all attachments as: .zip

Change History (6)

Changed 17 years ago by ludwig@…

Attachment: install_gcc42.log.gz added

gzipped log of failed gcc42 build

comment:1 Changed 17 years ago by markd@…

Summary: gcc42 build fails while executing arBUG: gcc42-4.2.0 build fails while executing ar

comment:2 Changed 17 years ago by ludwig@…

Discussing this issue with Boey Maun Suang on macosports-user (http://lists.macosforge.org/pipermail/macports-users/2007-June/003685.html), we found that the gcc42 port somehow conflicts with the binutils port. (Or more precisely, with the ar included in the binutils port.)

After deactivating the binutils port so that gcc42 could no longer pick up /opt/local/i386-apple-darwin8.9.1/bin/ar, the build of gcc42 succeeded.

Regards

Christoph

comment:3 Changed 16 years ago by mww@…

Cc: pguyot@… mww@… added

O.k., I've added a bunch of environment variables to the gcc42 port to avoid picking up binutils;

I suppose this would be necessary for the other gcc ports, too -- on the other hand we could also remove (or change prefix) of the binutils port, especially since it seems to be defunct (or not fully functional) - Paul?

(gcc 4.2 picks up the tools in ${prefix}/${arch}-apple-darwin${version}/bin/, not the one in ${prefix}/bin)

comment:4 Changed 16 years ago by mww@…

Resolution: fixed
Status: newclosed

I've tested it: The addition of

configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
                        AS_FOR_TARGET=/usr/bin/as \
                        LD_FOR_TARGET=/usr/bin/ld \
                        NM_FOR_TARGET=/usr/bin/nm \
                        OBJDUMP_FOR_TARGET=/usr/bin/objdump \
                        RANLIB_FOR_TARGET=/usr/bin/ranlib \
                        STRIP_FOR_TARGET=/usr/bin/strip

functions as a workaround to avoid binutils

comment:5 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.