Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187839 - gcc 4.2.0 does not emerge well for Prefix Portage?
Summary: gcc 4.2.0 does not emerge well for Prefix Portage?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Solaris
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-05 19:58 UTC by Rabbe Fogelholm
Modified: 2007-08-16 08:04 UTC (History)
1 user (show)

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


Attachments
build.log from `emerge sed' just after gcc was built (build.log,2.10 KB, text/plain)
2007-08-08 05:54 UTC, Rabbe Fogelholm
Details
config.log from `emerge sed' just after gcc was built (config.log,9.40 KB, text/plain)
2007-08-08 05:55 UTC, Rabbe Fogelholm
Details
toolchain.eclass patch (toolchain.eclass.patch,454 bytes, patch)
2007-08-08 18:00 UTC, Fabian Groffen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rabbe Fogelholm 2007-08-05 19:58:12 UTC
This problem occurred when trying to bootstrap Prefix Portage on Solaris/x86 today (2007-08-05).

The bootstrapping followed the May 7, 2007 version of <http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml>, with small deviations. The exact details can be found in this script: <http://wb748077.bahnhofbredband.se/prefix-gentoo/setup-prefix-2007.08.04.sh>.

Step 1.8-gcc (emerge gcc) terminated with zero exit codes throughout, but the following suspicious message was seen: 

 * Your gcc has a bug with GCC_SPECS.

 * Please re-emerge gcc.

 * http://bugs.gentoo.org/68395


The following step (1.6-catchup) intends to emerge sed. Here things go wrong altogether:

checking for C compiler default output file name... configure: error: C compiler cannot create executables

See `config.log' for more details.



!!! Please attach the following file when seeking support:

!!! /var/tmp/2007-08-04/var/tmp/portage/sys-apps/sed-4.1.5/work/sed-4.1.5/config.log

 * 

 * ERROR: sys-apps/sed-4.1.5 failed.
Comment 1 Fabian Groffen gentoo-dev 2007-08-05 20:25:18 UTC
I've seen the same message today (bootstrapping on OSX here), but the compiler appears to work fine here.  I'm wondering what change made this come up again.

This is the test that is being performed:

$ env GCC_SPECS="" "${EPREFIX}"/usr/bin/gcc -v

which indeed just works for me.  Can you try that on your system?
Comment 2 Rabbe Fogelholm 2007-08-06 19:39:33 UTC
Sure. This is what I get (my EPREFIX is /var/tmp/2007-08-04):

Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: /var/tmp/2007-08-04/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/configure --prefix=/var/tmp/2007-08-04/usr --bindir=/var/tmp/2007-08-04/usr/i386-pc-solaris2.10/gcc-bin/4.2.0 --includedir=/var/tmp/2007-08-04/usr/lib/gcc/i386-pc-solaris2.10/4.2.0/include --libdir=/var/tmp/2007-08-04/usr/lib/gcc/i386-pc-solaris2.10/4.2.0 --datadir=/var/tmp/2007-08-04/usr/share/gcc-data/i386-pc-solaris2.10/4.2.0 --mandir=/var/tmp/2007-08-04/usr/share/gcc-data/i386-pc-solaris2.10/4.2.0/man --infodir=/var/tmp/2007-08-04/usr/share/gcc-data/i386-pc-solaris2.10/4.2.0/info --with-gxx-include-dir=/var/tmp/2007-08-04/usr/lib/gcc/i386-pc-solaris2.10/4.2.0/include/g++-v4 --host=i386-pc-solaris2.10 --build=i386-pc-solaris2.10 --disable-altivec --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --with-local-prefix=/var/tmp/2007-08-04/usr --with-gnu-ld
Thread model: posix
gcc version 4.2.0 (Gentoo 4.2.0 p1.4)



Comment 3 Rabbe Fogelholm 2007-08-07 05:53:28 UTC
I added code to the script to mask gcc-4.2.0. This caused gcc-4.1.2 to be emerged instead. However, the same failure occurs when emerging the next package (sed in my case; the error message being: checking for C compiler default output file name... configure: error: C compiler cannot create executables).

So, it seems that the exact gcc version is not the issue. I include the very last lines of console output from the "emerge gcc" step, just in case that might give some clue...:

Can't open /var/tmp/2007-08-04/var/tmp/2007-08-04//etc/make.conf
 * Switching native-compiler to i386-pc-solaris2.10-4.1.2 ...
 * Your gcc has a bug with GCC_SPECS.
 * Please re-emerge gcc.
 * http://bugs.gentoo.org/68395
                                                                          [ ok ]   
 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *  (bash) # source /var/tmp/2007-08-04/etc/profile
 * or
 *  (tcsh) # source /var/tmp/2007-08-04/etc/csh.login

 * If you have issues with packages unable to locate libstdc++.la,
 * then try running 'fix_libtool_files.sh' on the old gcc versions.

>>> sys-devel/gcc-4.1.2 merged.

>>> No packages selected for removal by clean
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * Messages for package sys-devel/gcc-4.1.2:

 * Can't read /config.sub, skipping..
 * Can't read /config.guess, skipping..
 * eprefixify: /var/tmp/2007-08-04/var/tmp/portage/sys-devel/gcc-4.1.2/temp/awk/fixlafiles.awk-no_gcc_la does not exist
 * eprefixify: /var/tmp/2007-08-04/var/tmp/portage/sys-devel/gcc-4.1.2/temp/awk/fixlafiles.awk does not exist
 * If you have issues with packages unable to locate libstdc++.la,
 * then try running 'fix_libtool_files.sh' on the old gcc versions.
 * GNU info directory index is up-to-date.

(the lines below were generated by `env GCC_SPECS="" "${EPREFIX}"/usr/bin/gcc -v' in the bootstrap script)

Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: /var/tmp/2007-08-04/var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/var/tmp/2007-08-04/usr --bindir=/var/tmp/2007-08-04/usr/i386-pc-solaris2.10/gcc-bin/4.1.2 --includedir=/var/tmp/2007-08-04/usr/lib/gcc/i386-pc-solaris2.10/4.1.2/include --libdir=/var/tmp/2007-08-04/usr/lib/gcc/i386-pc-solaris2.10/4.1.2 --datadir=/var/tmp/2007-08-04/usr/share/gcc-data/i386-pc-solaris2.10/4.1.2 --mandir=/var/tmp/2007-08-04/usr/share/gcc-data/i386-pc-solaris2.10/4.1.2/man --infodir=/var/tmp/2007-08-04/usr/share/gcc-data/i386-pc-solaris2.10/4.1.2/info --with-gxx-include-dir=/var/tmp/2007-08-04/usr/lib/gcc/i386-pc-solaris2.10/4.1.2/include/g++-v4 --host=i386-pc-solaris2.10 --build=i386-pc-solaris2.10 --disable-altivec --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --with-local-prefix=/var/tmp/2007-08-04/usr --with-gnu-ld
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2 p1.0.1)
Comment 4 Fabian Groffen gentoo-dev 2007-08-07 08:27:54 UTC
Can you look in the config.log file of sed to see why it thinks the compiler cannot create binaries?  Maybe that gives me a hint as to what to look for.
Comment 5 Rabbe Fogelholm 2007-08-08 05:54:02 UTC
Created attachment 127237 [details]
build.log from `emerge sed' just after gcc was built
Comment 6 Rabbe Fogelholm 2007-08-08 05:55:06 UTC
Created attachment 127239 [details]
config.log from `emerge sed' just after gcc was built
Comment 7 Fabian Groffen gentoo-dev 2007-08-08 18:00:00 UTC
Created attachment 127311 [details, diff]
toolchain.eclass patch

i386-pc-solaris2.10-gcc  -I/var/tmp/2007-08-04/usr/include -L/var/tmp/2007-08-04/usr/lib -R/var/tmp/2007-08-04/usr/lib -L/var/tmp/2007-08-04/lib -R/var/tmp/2007-08-04/lib conftest.c  >&5
ld: fatal: file elf_i386: open failed: No such file or directory
collect2: ld returned 1 exit status

hmmm.... ok.. scary.  Can you easily test the attached patch to toolchain.eclass?
Comment 8 Rabbe Fogelholm 2007-08-08 21:35:27 UTC
When should the eclass patch be applied? Just after emerging gcc, and before emerging the next package (sed in my case)?
Comment 9 Rabbe Fogelholm 2007-08-09 07:25:03 UTC
I tried executing the patch as described. The result is the same, emerging sed fails.

Working a little by trial-and-error, since the machine is idle anyway, I will now execute the patch *before* emerging gcc instead.
Comment 10 Fabian Groffen gentoo-dev 2007-08-09 08:05:34 UTC
sorry, yeah, it needs to be applied before building gcc.  Even though that is an expensive operation, I'm affraid the patch (I attached the reverse) broke for everything, but on Darwin it fixed something.
Comment 11 Rabbe Fogelholm 2007-08-09 09:50:45 UTC
Good news this time; the patch is applied just after emerging bash and before emerging baselayout-prefix, flex, binutils-config, binutils, gcc-config, ..., gcc, and now the packages just after gcc seem to emerge fine.
Comment 12 Fabian Groffen gentoo-dev 2007-08-09 10:25:37 UTC
thanks!  I reverted the change in svn now.  I'll soon release a new snapshot so this should be solved for a new bootstrap.  Leaving this bug open till that time.
Comment 13 Fabian Groffen gentoo-dev 2007-08-14 06:27:46 UTC
*** Bug 188765 has been marked as a duplicate of this bug. ***
Comment 14 Fabian Groffen gentoo-dev 2007-08-14 20:10:53 UTC
I can't bump the snapshot, as the svn tree is down.  I made a new snapshot though that should work for you:

http://www.gentoo.org/~grobian/distfiles/prefix-overlay-20070806.tar.bz

it's not up-to-date as the svn tree is down, so can't update.
Comment 15 Fabian Groffen gentoo-dev 2007-08-15 07:03:20 UTC
new snapshot made, added to bootstrap-prefix.sh.  This bug should be fixed now.  Sorry for the wait!
Comment 16 Rabbe Fogelholm 2007-08-16 06:42:00 UTC
I can confirm that my bootstrap script (2007-08-04 version at http://wb748077.bahnhofbredband.se/prefix-gentoo/) now works on Solaris/x86.

I have good hope for Solaris/SPARC as well; it is crunching along but has not reached the "emerge gcc" stage yet.
Comment 17 Fabian Groffen gentoo-dev 2007-08-16 08:04:17 UTC
good to hear.  Someone yesterday bootstrapped Solaris/Sparc, with some success, so I hope it works for you too.