Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184437 - Compilation of gcc fails during setup of Prefix Portage
Summary: Compilation of gcc fails during setup of Prefix Portage
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: Sparc Solaris
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-06 18:36 UTC by Rabbe Fogelholm
Modified: 2007-11-10 22:41 UTC (History)
0 users

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


Attachments
Log of the "emerge --oneshot --nodeps sys-devel/gcc" step (build.log,7.57 KB, text/plain)
2007-07-06 18:40 UTC, Rabbe Fogelholm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rabbe Fogelholm 2007-07-06 18:36:41 UTC
Compiling gcc fails (end of Code Listing 1.8 of May 7 version of http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml). This used to work before (succesful builds were done around June 20, 2007).

Reproducible: Always

Steps to Reproduce:
1. Run the 2007-06-18 version of the script downloadable from http://wb748077.bahnhofbredband.se/prefix-gentoo/


Actual Results:  
Compilation fails with this message (my EPREFIX is /var/tmp/2007-06-18),

configure: error: can not run /var/tmp/2007-06-18/var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/config.sub

See also attached build log.

Expected Results:  
Compilation should succeed.

The same symptoms are seen on Solaris/x86 and Solaris/SPARC alike.
Comment 1 Rabbe Fogelholm 2007-07-06 18:40:16 UTC
Created attachment 124081 [details]
Log of the "emerge --oneshot --nodeps sys-devel/gcc" step
Comment 2 Rabbe Fogelholm 2007-07-06 19:26:11 UTC
I tried to re-run the setup-prefix script, with "emerge gcc" expanded to "for C in clean fetch unpack compile install qmerge; do ebuild EBUILD_FILE $C; done". The error occurs at the very beginning of the compile step.

The script that "can not run" looks fairly OK: it exists, it is executable, and its first line goes "#! /bin/sh". And /bin/sh is a symlink to ../../sbin/sh, which is presumably the way it should be in Solaris. And /sbin/sh exists and is executable.
Comment 3 Rabbe Fogelholm 2007-07-07 13:26:47 UTC
I think I have found the cause of the problem. The config.sub script is invoked by the configure script. The invocation uses the value of CONFIG_SHELL if set, or /bin/sh otherwise. In the Prefix Portage bootstrap scenario the value of CONFIG_SHELL is $EPREFIX/bin/sh. There is no such file, hence the "can not run" error message.

A workaround seems possible: Create a symlink sh -> bash in the $EPREFIX/bin directory before emerging gcc.
Comment 4 Fabian Groffen gentoo-dev 2007-07-22 21:15:45 UTC
I'm bootstrapping currently and bootstrapping gcc.  I don't get your problem, because I have $EPREFIX/bin/sh.  This is a symlink to bash, installed by the bash ebuild that was emerged in code listing 1.7.

Your script seems to emerge bash before gcc too, given that the conditional will hold, so I don't understand why you don't get that symlink.  Are there any build errors/warnings for bash?
Comment 5 Rabbe Fogelholm 2007-07-23 10:57:52 UTC
I checked my latest saved console output, and indeed, it says at one point during step 1.7:

ln: creating symbolic link `/var/tmp/2007-06-29//bin/sh' to `bash': No such file or directory

So, something goes not entirely right while I emerge bash. I'll see if I can pinpoint it further.
Comment 6 Rabbe Fogelholm 2007-07-23 11:23:00 UTC
Maybe there is something peculiar here after all. It seems that there is an attempt to create the 'sh' symlink before the target file is in place. In contrast, there is a 'rbash' symlink too which is created after 'bash' itself.

Then again, why should this not work for me whereas it works for you? I remain confused. BTW, my EPREFIX is '/var/tmp/2007-06-29'.

>>> Completed installing bash-3.2_p17 into /var/tmp/2007-06-29/var/tmp/portage/app-shells/bash-3.2_p17/image/var/tmp/2007-06-29/^M
^M
ecompressdir: bzip2 -9 var/tmp/2007-06-29//usr/share/man^M
* checking 22 files for package collisions
>>> Merging app-shells/bash-3.2_p17 to /
ln: creating symbolic link `/var/tmp/2007-06-29//bin/sh' to `bash': No such file or directory^M
>>> /var/tmp/2007-06-29/bin/
>>> /var/tmp/2007-06-29/bin/bash
>>> /var/tmp/2007-06-29/bin/rbash -> bash
Comment 7 Fabian Groffen gentoo-dev 2007-07-23 11:27:07 UTC
I don't think it really makes a difference, but I'm bootstrapping at the moment using the latest bootstrap script and snapshot.  You seem to have an older snapshot at least.  Maybe that makes a little difference.  I found some issues during my bootstrap so far, but this should work correctly.
Comment 8 Rabbe Fogelholm 2007-07-23 13:37:11 UTC
I am re-running my script, with an added diagnostic message that is written if there is reason to explicitly create the sh -> bash symlink. I just saw that the message was written, so something weird is still going on over here.

I'll let the script carry on, to see if it stumbles on <http://bugs.gentoo.org/show_bug.cgi?id=184543> like before.
Comment 9 Fabian Groffen gentoo-dev 2007-11-09 15:08:11 UTC
does this problem still persists?
Comment 10 Rabbe Fogelholm 2007-11-10 22:41:23 UTC
Cannot say. I don't have access to Solaris machines anymore. But if I get to use Solaris again (on faster HW hopefully) I'll certainly set up prefix Portage again.