> Hi, > > I'm attempting to build GCC 4.6.3 on a virtual Solaris 10 machine > (installed using sol-10-u10-ga2-x86-dvd.iso), but gmake fails pretty > early on in the compilation. The machine's pretty clean, I've only > installed a few packages from the companion CD, nothing else. OKay, good looking thus far. > > Here's what my build script does: > > cd $HOME > mkdir gccbuild/gcc463/output > cd gccbuild/gcc463 > export GCCBUILDOUTPUT=`pwd`/output * nod * > > gtar -xjf $HOME/downloads/gcc463/gcc-4.6.3.tar.bz2 > gtar -xzf $HOME/downloads/gcc463/gmp-4.2.1.tar.gz > gtar -xjf $HOME/downloads/gcc463/mpfr-2.4.0.tar.bz2 > gtar -xzf $HOME/downloads/gcc463/mpc-0.8.2.tar.gz I always build gmp/mpfr/mpc "in-tree" with no issue at all unless I am on a ppc970 PowerMac or DecAlpha or some other odd beast. On sparc or x86_64 Solaris 10 it will "just work". However you should make some symlinks like so : ln -s ./gmp-4.2.1 ./gmp ln -s ./mpfr-2.4.0 ./mpfr ln -s ./mpc-0.8.2 ./mpc Hey, why are you using those versions ? I had just recently bootstrapped gcc-4.7.0 on Solaris 8 sparc and i386 with no issues and I use : lrwxrwxrwx 1 root other 11 Mar 23 12:28 gmp -> ./gmp-5.0.4/ drwxr-xr-x 14 1001 root 2048 Feb 10 10:23 gmp-5.0.4/ lrwxrwxrwx 1 root other 9 Mar 23 12:29 mpc -> ./mpc-0.9/ drwxr-xr-x 6 1000 1000 512 Feb 21 2011 mpc-0.9/ lrwxrwxrwx 1 root other 12 Mar 23 12:29 mpfr -> ./mpfr-3.1.0/ drwxr-xr-x 9 1000 1000 1024 Oct 3 09:43 mpfr-3.1.0/ See the results here ( until someone updates the successful build page ) : http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg02928.html > cd gmp-4.2.1 > ./configure --prefix=$GCCBUILDOUTPUT --without-gnu-ld --enable-shared > --enable-static > gmake > gmake install > cd .. okay .. whoa. Why build these before doing your bootstrap? Not really required unless you do really want them installed prior to the actual bootstrap. > cd gcc-4.6.3 > mkdir objdir > cd objdir > ../configure --prefix=$GCCBUILDOUTPUT --with-gmp=$GCCBUILDOUTPUT > --with-mpfr=$GCCBUILDOUTPUT --with-mpc=$GCCBUILDOUTPUT --with-gnu-as > --with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld > --enable-shared --enable-languages=c,c++ LDFLAGS="-R > $GCCBUILDOUTPUT/lib:/usr/sfw/lib" > gmake ###FAILURE### > gmake -k check > gmake install OKay, do not use the binutils gas or gld. Just use the ones in the regular /usr/ccs/bin directory. I can get into a long long discussion why but for now take my word for it that you are going down a deep and old rabbit hole there. > When the GCC gmake fails, here's the end of the output: > > config.status: executing default commands > gmake[3]: Entering directory > `/home/grahamb/gccbuild/gcc463/gcc-4.6.3/objdir/libiberty' > if [ x"-fpic" != x ] && [ ! -d pic ]; then \ > mkdir pic; \ > else true; fi > touch stamp-picdir > gmake[3]: *** [stamp-picdir] Segmentation Fault (core dumped) > gmake[3]: *** Deleting file `stamp-picdir' > gmake[3]: Leaving directory > `/home/grahamb/gccbuild/gcc463/gcc-4.6.3/objdir/libiberty' > gmake[2]: *** [all-stage1-libiberty] Error 2 > gmake[2]: Leaving directory `/home/grahamb/gccbuild/gcc463/gcc-4.6.3/objdir' > gmake[1]: *** [stage1-bubble] Error 2 > gmake[1]: Leaving directory `/home/grahamb/gccbuild/gcc463/gcc-4.6.3/objdir' > gmake: *** [all] Error 2 > Segmentation Fault (core dumped) ? nice. Do you have a output core file ? Do you have coreadm setup? Type coreadm as rroot and if you see this : # coreadm global core file pattern: global core file content: default init core file pattern: core init core file content: default global core dumps: disabled per-process core dumps: enabled global setid core dumps: disabled per-process setid core dumps: disabled global core dump logging: disabled You don't have core tracking setup. Here is my coreadm config : # coreadm -e global -e global-setid -e log -e process -e proc-setid \ > -g /var/crash/jupiter/coredump/node_%n-host_%m-zone_%z-time_%t-pid_%p-uid_%u-gid_%g-fid_%f.core \ > -G all # coreadm -e global -e global-setid -e log -e process -e proc-setid \ > -i /var/crash/jupiter/coredump/node_%n-host_%m-zone_%z-time_%t-pid_%p-uid_%u-gid_%g-fid_%f.per-process-core \ > -I all # coreadm global core file pattern: /var/crash/jupiter/coredump/node_%n-host_%m-zone_%z-time_%t-pid_%p-uid_%u-gid_%g-fid_%f.core global core file content: all init core file pattern: /var/crash/jupiter/coredump/node_%n-host_%m-zone_%z-time_%t-pid_%p-uid_%u-gid_%g-fid_%f.per-process-core init core file content: all global core dumps: enabled per-process core dumps: enabled global setid core dumps: enabled per-process setid core dumps: enabled global core dump logging: enabled # So a while back ( before Oracle fixed it ) luxadm would toss a core on a regular basis and I caught all that like so : # luxadm probe Found Enclosure(s): SENA Name:array2 Node WWN:5080020000027f00 Logical Path:/dev/es/ses0 Logical Path:/dev/es/ses1 Segmentation Fault - core dumped Sep 27 00:52:27 jupiter genunix: NOTICE: core_log: luxadm[2575] core dumped: /var/crash/jupiter/coredump/node_jupiter-host_sun4u-zone_global-time_1285548746-pid_2575-uid_0-gid_0-fid_luxadm.core Here is a shell script that will set it up for you : #!/bin/ksh # Only for Solaris 10 mkdir -m 0700 -p /var/crash/`/usr/bin/uname -n`/coredump coreadm -e global -e global-setid -e log -e process -e proc-setid -g /var/crash/`/usr/bin/uname -n`/coredump/node_%n-host_%m-zone_%z-time_%t-pid_%p-uid_%u-gid_%g-fid_%f.core -G all coreadm -e global -e global-setid -e log -e process -e proc-setid -i /var/crash/`/usr/bin/uname -n`/coredump/node_%n-host_%m-zone_%z-time_%t-pid_%p-uid_%u-gid_%g-fid_%f.per-process-core -I all coreadm Now you can boldly go forwards and catch every time a core happens .. which should be NEVER. However if you do get one at least you can then try a dbx or even basic debug on it to see wtf happened. > Has anybody seen this before, and knows how to fix it? Seen before : no fix it : yes > I've actually tried GCC 4.3.6 the same way, with gmp and mpfr (but > without mpc, it's not required), with the same result. > > I have very limited experience with Solaris, so please bear with me! I have loccked in mortal battle with it a few times .. so stay in touch. also, on this list we may get lucky and hear from a man named Rainer. He is a real guru on these matters. Dennis -- -- http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B +-------------------------+-----------------------------------+ | Dennis Clarke | Solaris and Linux and Open Source | | dclarke@xxxxxxxxxxxxx | Respect for open standards. | +-------------------------+-----------------------------------+