Opened 18 years ago

Closed 15 years ago

Last modified 8 years ago

#7167 closed enhancement (wontfix)

willing to test gcc42 on Mac OS X 10.3.9, PowerBook G4

Reported by: yaseppochi (Stephen J. Turnbull) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: pmq@…, markd@…, ryandesign (Ryan Carsten Schmidt)
Port: gcc42

Description (last modified by jmpp@…)

If you have anything specific I should look for, please let me know. Here's progress to date

I've uncommented the darwin 7 variant in the Portfile. This gives the following kind of error in the build:

if [ x"" != x ]; then \
  /opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/build/./prev-gcc/xgcc -B/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/build/./prev-gcc/ -B/opt/local/powerpc-apple-darwin7.9.0/bin/ -c -DHAVE_CONFIG_H -g -O2 -I. -I/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/gcc-4.2-20060204/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat  /opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/gcc-4.2-20060204/libiberty/floatformat.c -o pic/floatformat.o; \
else true; fi
/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/build/./prev-gcc/xgcc -B/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/build/./prev-gcc/ -B/opt/local/powerpc-apple-darwin7.9.0/bin/ -c -DHAVE_CONFIG_H -g -O2 -I. -I/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/gcc-4.2-20060204/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat /opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/gcc-4.2-20060204/libiberty/floatformat.c -o floatformat.o
/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/gcc-4.2-20060204/libiberty/floatformat.c: In function 'floatformat_to_double':
/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/gcc-4.2-20060204/libiberty/floatformat.c:345: warning: floating constant exceeds range of 'float'
/var/tmp//ccZfmQrf.s:480:stfiwx instruction is optional for the PowerPC (not allowed without -force_cpusubtype_ALL option)
/var/tmp//ccZfmQrf.s:535:stfiwx instruction is optional for the PowerPC (not allowed without -force_cpusubtype_ALL option)
make[3]: *** [floatformat.o] Error 1
make[2]: *** [all-stage2-libiberty] Error 2
make[1]: *** [stage2-bubble] Error 2
make: *** [bootstrap] Error 2
Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/_Users_steve_Software_Ports_dports_lang_gcc42/work/build" && make bootstrap -j 2 XCFLAGS=-force_cpusubtype_ALL" returned error 2
Command output: no
make[1]: *** [stage2-bubble] Error 2
make: *** [bootstrap] Error 2

Warning: the following items did not execute (for gcc42): com.apple.build
Error: Status 1 encountered during processing.

This error will occur in several places and stages of the build, depending on which of the CFLAGS variables below are used; the above is just the most recent example (which occurred with only XCFLAGS set of the three). The following spec for darwin7 variant led to a successful build:

# hope springs eternal! uncommented by sjt
# untested on darwin 7
platform darwin 7 {
        depends_build   port:odcctools
        patch {
                reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
                        ${workpath}/gcc-${version}/gcc/config/darwin.h
        }
        configure.args-append   --with-as=${prefix}/bin/odas \
                                        --with-ld=${prefix}/bin/odld \
                                        --with-ar=${prefix}/bin/odar
        # added by sjt
        build.args-append       XCFLAGS=-force_cpusubtype_ALL
        configure.env           CFLAGS=-force_cpusubtype_ALL \
                                BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
}

The -force_cpusubtype_ALL may not be omitted from any of the three *CFLAGS variables. Of course it's possible (likely?) that there's a better way to achieve this end, but those are the variables I could find that seemed to be more or less appropriate.

Change History (16)

comment:1 Changed 18 years ago by mww@…

Resolution: fixed
Status: newclosed

cool, thanks! I've just added your patch to the gcc42 port;

comment:2 Changed 18 years ago by yaseppochi (Stephen J. Turnbull)

Resolution: fixed
Status: closedreopened

(In reply to comment #1)

cool, thanks! I've just added your patch to the gcc42 port;

Oops. I'm sorry, but it doesn't actually work from scratch. I'm not sure what I did to get a build, but when I uninstalled and tried again, it died again, in the same way.

I'm in the process of trying again, but it's been 15 hours and I'm still in the middle of libstdc++ (which I guess is probably toward the end but I don't know). I will confirm when I do finish the build, but for now I wanted to let you know that the patch I gave you doesn't actually do the trick.

What I'm currently testing is

# take 2: hope springs eternal! uncommented by sjt
# untested on darwin 7
platform darwin 7 {
        depends_build   port:odcctools
        patch {
                reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
                        ${workpath}/gcc-${version}/gcc/config/darwin.h
        }
        configure.args-append   --with-as=${prefix}/bin/odas \
                                        --with-ld=${prefix}/bin/odld \
                                        --with-ar=${prefix}/bin/odar
        # added by sjt
        build.args-append       XCFLAGS=-force_cpusubtype_ALL \
                                CFLAGS=-force_cpusubtype_ALL \
                                BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
}

I'm not sure which, if any, of the make variables can be omitted; it will take several days to test at this rate. :-)

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 18 years ago by yaseppochi (Stephen J. Turnbull)

Maybe I just should give up.

The build fails trying to execute "libstdc++-v3/scripts/make_exports.pl" because the script hardcode's "nm", and Mac OS X 10.3.9's nm doesn't understand the -P flag. odnm from odcctools does understand -P, so I tried editing the script to use "/opt/local/bin/nm" instead of "nm" in several places, but now I get:

/opt/local/bin/odnm -P .libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/complex_io.o .libs/ctype.o .libs/debug.o .libs/debug_list.o .libs/functexcept.o .libs/globals_locale.o .libs/globals_io.o .libs/ios.o .libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o .libs/list.o .libs/locale.o .libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/stdexcept.o .libs/strstream.o .libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o .libs/fstream-inst.o .libs/ext-inst.o .libs/ios-inst.o .libs/iostream-inst.o .libs/istream-inst.o .libs/istream.o .libs/locale-inst.o .libs/locale-misc-inst.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o .libs/streambuf.o .libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o .libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o .libs/basic_file.o .libs/c++locale.o ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a|/opt/local/bin/odnm: no name list/opt/local/bin/odnm error at ../../../../gcc-4.2-20060218/libstdc++-v3/scripts/make_exports.pl line 130.

from the Perl script (either indirectly by doing "make" or by directly invoking the Perl script). If I cd to the work directory and execute the command line constructed by the script by hand, I get no errors and a long spew of symbols to stdout. Apparently this is Perl damage, but I don't know enough about Perl to make a guess.

comment:4 Changed 18 years ago by yaseppochi (Stephen J. Turnbull)

(In reply to comment #3)

The build fails trying to execute "libstdc++-v3/scripts/make_exports.pl" because the script hardcode's "nm", and Mac OS X 10.3.9's nm doesn't understand the -P flag.

With GCC 4.1, I did the following and successfully built GCC 4.1.

Create a new directory /opt/odbinutils/bin.

Link all of the odcctools $TOOL in /opt/local/bin to /opt/odbinutils/bin/powerpc-apple-darwin7.9.0-$TOOL.

Apply this patch to dports/lang/gcc41/Portfile:

Index: dports/lang/gcc41/Portfile
===================================================================
RCS file: /Volumes/src/cvs/od/proj/darwinports/dports/lang/gcc41/Portfile,v
retrieving revision 1.18
diff -u -r1.18 Portfile
--- dports/lang/gcc41/Portfile  29 May 2006 05:18:49 -0000      1.18
+++ dports/lang/gcc41/Portfile  15 Jun 2006 15:32:15 -0000
@@ -57,6 +57,7 @@
                                --with-gmp=${prefix} \
                                --with-mpfr=${prefix}
 
+build.env      PATH=/opt/local/bin:/opt/odbinutils/bin:/usr/bin:/bin
 build.target   profiledbootstrap
 
 post-destroot {

Unfortunately this procedure doesn't work for GCC 4.2. It finds the desired nm executable, but then fails as described in my previous report. It seems that the "no name list" error is actually a warning and not the fatal error; the problem seems to be that the "close $NM or die;" fails, which the GCC build infrastructure treats as fatal. I hacked the perl script to not die in that case, and the build of libstdc++ continued. However, the build eventually failed (and in the process almost ran me out of disk space, so I've deleted the workspace so I can get work done). Sorry for not providing details, but I can't afford the time or effort to rebuild (it also kills interactive responsiveness) right now. I'll try again later, when I'll also have a patch for the perl script.

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 18 years ago by rhwood@…

blocked: 9524

comment:6 Changed 18 years ago by pmq@…

Cc: pmq@… added

comment:7 Changed 17 years ago by markd@…

Cc: markd@… added

This port has been updated. Please try again.

comment:8 Changed 17 years ago by pipping@…

Milestone: Available Ports

comment:9 Changed 17 years ago by jmpp@…

Description: modified (diff)

comment:10 Changed 17 years ago by jmpp@…

Milestone: Available PortsPort Enhancements

comment:11 Changed 17 years ago by yaseppochi (Stephen J. Turnbull)

I no longer support users of Panther, so I've upgraded to Tiger myself. You can close this as far as I'm concerned.

comment:12 Changed 17 years ago by markd@…

Resolution: fixed
Status: reopenedclosed

Closing.

comment:13 Changed 17 years ago by nox@…

Priority: ExpectedNormal
Version: 1.0

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

Cc: ryandesign@… added
Port: gcc42 added
Resolution: fixed
Status: closedreopened

Replying to markd@…:

resolution set to fixed

Nothing was fixed; reopening so I can set the resolution properly.

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

Resolution: wontfix
Status: reopenedclosed

comment:16 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

Note: See TracTickets for help on using tickets.