Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416577 - bootstrap: sys-devel/gcc-4.2.4 does not build on Solaris x86
Summary: bootstrap: sys-devel/gcc-4.2.4 does not build on Solaris x86
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Solaris
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-19 00:39 UTC by Richard Freeman
Modified: 2012-08-19 19:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,33.87 KB, text/plain)
2012-05-19 00:39 UTC, Richard Freeman
Details
emerge --info =sys-devel/gcc-4.2.4-r01.4 (einfo.txt,3.43 KB, text/plain)
2012-05-19 00:40 UTC, Richard Freeman
Details
build environment (environment,162.24 KB, text/plain)
2012-05-19 00:40 UTC, Richard Freeman
Details
I /think/ this is the right config.log (config.log,212.70 KB, text/plain)
2012-05-19 00:57 UTC, Richard Freeman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Freeman gentoo-dev 2012-05-19 00:39:23 UTC
Following the bootstrap procedure on Solaris 11 with gcc-4.5.2, the build terminates with the error:

checking if mkdir takes one argument... no
Unsupported CPU used in --with-cpu=, supported values:
generic nocona x86-64 k8 opteron athlon64 athlon-fx
make[2]: *** [configure-stage1-gcc] Error 1
make[2]: Leaving directory `/home/rich/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-
r01.4/work/build'

Other versions of gcc also do not build for various reasons.

Reproducible: Always
Comment 1 Richard Freeman gentoo-dev 2012-05-19 00:39:58 UTC
Created attachment 312231 [details]
build log
Comment 2 Richard Freeman gentoo-dev 2012-05-19 00:40:30 UTC
Created attachment 312233 [details]
emerge --info =sys-devel/gcc-4.2.4-r01.4
Comment 3 Richard Freeman gentoo-dev 2012-05-19 00:40:49 UTC
Created attachment 312235 [details]
build environment
Comment 4 Richard Freeman gentoo-dev 2012-05-19 00:57:06 UTC
Created attachment 312237 [details]
I /think/ this is the right config.log
Comment 5 Richard Freeman gentoo-dev 2012-05-19 01:00:02 UTC
Happy to give you other files out of the build directory on request.  I grabbed what looks like the newest config.log.  It doesn't contain the error output itself, but might be helpful.
Comment 6 Fabian Groffen gentoo-dev 2012-05-19 07:20:36 UTC
Odd, I hit this problem too, and committed this:

http://overlays.gentoo.org/proj/alt/changeset/60494/trunk/prefix-overlay/sys-devel/gcc

What is your bootstrap CHOST?
Comment 7 Richard Freeman gentoo-dev 2012-05-19 10:25:12 UTC
(In reply to comment #6)
> Odd, I hit this problem too, and committed this:
> 
> http://overlays.gentoo.org/proj/alt/changeset/60494/trunk/prefix-overlay/sys-
> devel/gcc
> 
> What is your bootstrap CHOST?

I didn't set CHOST, looking at the environment strings it appears to be set to:

declare -x CHOST="i386-pc-solaris2.11"
declare -x CHOST_default="i386-pc-solaris2.11"
Comment 8 Fabian Groffen gentoo-dev 2012-06-04 18:28:32 UTC
ok, sorry for the delay here.

If you want a 32-bits prefix, you'll have wait until I can extend the hack I did to fix the issue on 64-bits to 32-bits.  If you actually would like a 64-bits prefix, you should be able to bootstrap that one.
Comment 9 Richard Freeman gentoo-dev 2012-06-04 22:36:55 UTC
(In reply to comment #8)
> ok, sorry for the delay here.
> 
> If you want a 32-bits prefix, you'll have wait until I can extend the hack I
> did to fix the issue on 64-bits to 32-bits.  If you actually would like a
> 64-bits prefix, you should be able to bootstrap that one.

Indeed, that works.

Up to you, but you might want to leave this open to track the 32-bit issue.
Comment 10 Fabian Groffen gentoo-dev 2012-06-05 08:17:18 UTC
oh definitely!
Comment 11 Fabian Groffen gentoo-dev 2012-08-11 09:01:16 UTC
same problem on Solaris 10
Comment 12 Fabian Groffen gentoo-dev 2012-08-11 09:22:21 UTC
finally fixed, sorry for the long wait
Comment 13 Michael Mounteney 2012-08-11 22:26:00 UTC
Sorry but it still fails for me in the same way as in the OP.

Unsupported CPU used in --with-cpu=, supported values:
generic nocona x86-64 k8 opteron athlon64 athlon-fx

This is on Oracle Solaris 10 with bootstrap-prefix.sh dated 11 Aug 11:53 UTC.

Installation script is:

set -ev
export EPREFIX="$HOME/.gps"
export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:/usr/bin:/bin:/usr/sfw/bin:/usr/sfw/i386-sun-solaris2.10/bin:/usr/sfw/sparc-sun-solaris2.10/bin"
chmod 755 bootstrap-prefix.sh
for I in make wget sed m4 bison coreutils findutils tar patch grep gawk bash zlib python
do
	./bootstrap-prefix.sh $EPREFIX/tmp "$I"
done
./bootstrap-prefix.sh $EPREFIX tree
./bootstrap-prefix.sh $EPREFIX portage
hash -r
emerge -1q sed
emerge -1Oq bash sys-apps/baselayout-prefix app-arch/xz-utils sys-devel/m4 sys-devel/flex sys-devel/bison sys-devel/binutils-config sys-devel/gcc-config "=sys-devel/gcc-4.2*"
emerge -1q sys-apps/coreutils sys-apps/findutils '<app-arch/tar-1.26-r1' sys-apps/grep sys-devel/patch sys-apps/gawk sys-devel/make sys-libs/zlib
emerge -1Oq sys-apps/file app-admin/eselect
emerge -1q app-misc/pax-utils "<net-misc/wget-1.13.4-r1" virtual/os-headers
env FEATURES="-collision-protect" emerge -1q sys-apps/portage
rm -Rf $EPREFIX/tmp/*
hash -r
emerge --sync -q
emerge -1q "<dev-libs/mpc-0.9"
USE="-git" emerge -u system
echo 'USE="unicode nls"' >> $EPREFIX/etc/portage/make.conf
echo 'CFLAGS="-O2 -pipe"' >> $EPREFIX/etc/portage/make.conf
echo 'CXXFLAGS="${CFLAGS}"' >> $EPREFIX/etc/portage/make.conf
gcc-config 2
emerge -e system
Comment 14 Michael Mounteney 2012-08-11 22:36:04 UTC
Please cancel the above.

I wish there was a withdrawing facility on this bugtracker so that my stupidity was not immutably recorded for all time.
Comment 15 Fabian Groffen gentoo-dev 2012-08-12 07:14:47 UTC
You're correct, 4.2* doesn't bootstrap on x86-solaris due to Sun ld.  We need 4.1* there.

This should work for you (as it did for me yesterday on x86 Solaris 10):

export EPREFIX="$HOME/.gps"
export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:/usr/bin:/bin:/usr/sfw/bin:/usr/sfw/i386-sun-solaris2.10/bin:/usr/sfw/sparc-sun-solaris2.10/bin"

./bootstrap-prefix.sh $EPREFIX/tmp stage1
./bootstrap-prefix.sh $EPREFIX stage2
./bootstrap-prefix.sh $EPREFIX stage3
emerge -e system
cd $EPREFIX/usr/portage/scripts
./bootstrap-prefix.sh $EPREFIX startscript
Comment 16 Michael Mounteney 2012-08-13 07:16:42 UTC
(In reply to comment #15)
> [...]
> This should work for you (as it did for me yesterday on x86 Solaris 10):
> [...]

I was a bit more cautious before replying this time, but it still doesn't work for me.  I copied-and-pasted the script above but stage3 still fails when emerging gcc-4.1.2 with:

[...]
/home/mounty/.gps/usr/i386-pc-solaris2.10/bin/ld: target elf32-i386 not found
collect2: ld returned 1 exit status
Comment 17 Fabian Groffen gentoo-dev 2012-08-13 08:05:10 UTC
I assume you updated your bootstrap-prefix.sh.

Can you check your usr/portage/sys-devel/gcc/gcc-4.1.2.ebuild that it contains:


    if [[ ${CHOST} == *-solaris* ]] ; then
        # fix nasty bootstrap problem: we need 4.1 due to no deps of MPC, GMP,
        # MPFR, but 4.1 doesn't know about *_sol2 ld targets of >=binutils-2.21
        # we likely have that one installed, so if so, we patch it to *_sol2
        if has_version '>=sys-devel/binutils-2.21' ; then
            einfo "Patching specs to target elf_*_sol2 for newer binutils"
            sed -i \
                -e '/TARGET_LD_EMULATION/s/elf_\(x86_64\|i386\)/elf_\1_sol2/g' \
                gcc/config/i386/sol2-10.h || die
        fi
    fi


if not, the snapshot is not new enough
Comment 18 Michael Mounteney 2012-08-19 19:44:51 UTC
That works !  Fantastic;  thanks so very much Fabian.

It is necessary to pkgadd SUNWtexi to make gcc-4.1.2 build but it can be pkgrm'ed afterwards.