Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #10989 (new defect)

Opened 22 months ago

Last modified 18 months ago

BUG: gcc41 build failure on Mac OS X 10.3.9

Reported by: roland@… Owned by: mww@…
Priority: High Milestone: Port Bugs
Component: ports Version: 1.3.2
Keywords: gcc41 libstc++ nm odnm Panther Cc:
Port:

Description

GCC 4.1 fails to build on Panther (Mac OS X 10.3.9, because of libstdc++ needing a 'nm' command accepting the '-P' (--portability) option. However, Mac OS X 10.3.9 (or perhaps the latest Xcode released for Panther) is shipped with a 'nm' that does not understand this option.

The culprit is libstdc++-v3/scripts/make_exports.pl, which uses NM_FOR_TARGET, whose default value is 'nm'. The odcctools package provides a replacement for nm, /opt/local/bin/odnm, which accepts '-P', and works as expected. I used the following command to solve this build issue:

sed "s/my \$nm = \$ENV{'NM_FOR_TARGET'} || \"nm\";/my \$nm = \"odnm\";/" \
  libstdc++-v3/scripts/make_exports.pl

but I think the following patch should do as well:

--- Portfile.orig	Thu Nov  2 15:08:52 2006
+++ Portfile	Thu Nov  2 15:09:01 2006
@@ -76,6 +76,10 @@
 		--with-ar=${prefix}/bin/odar
 }
 
+platform darwin 7 {
+	configure.env NM_FOR_TARGET=odnm
+}
+
 platform darwin 8 {
 	configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
 }

Thanks in advance,

Roland Levillain

Attachments

gcc41.diff (312 bytes) - added by ansgar@… 22 months ago.
Patch to Portfile
out.gcc41c2 (92.5 kB) - added by julien-mac@… 20 months ago.

Change History

Changed 22 months ago by ansgar@…

Patch to Portfile

Changed 22 months ago by ansgar@…

The configure script accepts the environment variable NM, so I'd propose to use that (see attached patch). I've successfully compiled gcc41 with that change.

Changed 20 months ago by julien-mac@…

i've tested gcc41.diff which correct the above problem, but i still have problems after that. during compilation:

./gcc-4.1.1/gcc/../libcpp/include -I/opt/local/include -I/opt/local/include ../../gcc-4.1.1/gcc/e xplow.c -o explow.o stage1/xgcc -Bstage1/ -B/opt/local/powerpc-apple-darwin7.9.0/bin/ -c -g -O2 -mdynamic-no-pic -fpro file-generate -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic

-Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute -DHAVE_CO

NFIG_H -I. -I. -I../../gcc-4.1.1/gcc -I../../gcc-4.1.1/gcc/. -I../../gcc-4.1.1/gcc/../include -I../. ./gcc-4.1.1/gcc/../libcpp/include -I/opt/local/include -I/opt/local/include ../../gcc-4.1.1/gcc/l oop-iv.c -o loop-iv.o make[2]: *** No rule to make target expmed.c', needed by expmed.o'. Stop. make[1]: *** [stageprofile_build] Error 2 make: *** [profiledbootstrap] Error 2

see attached file

os is 10.3.9 $ uname -a Darwin xxx 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc

Changed 20 months ago by julien-mac@…

Changed 18 months ago by pipping@…

  • milestone set to Port Bugs
Note: See TracTickets for help on using tickets.