Ticket #10989 (new defect)
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
Change History
Note: See
TracTickets for help on using
tickets.

