Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350943 - startprefix error Illigal instruction $SHELL -l
Summary: startprefix error Illigal instruction $SHELL -l
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-07 10:49 UTC by Elmar Otter
Modified: 2017-11-13 17:33 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar Otter 2011-01-07 10:49:40 UTC
$EPREFIX/startprefix: line 37: 60903 Illegal instruction     $SHELL -l

Reproducible: Always

Steps to Reproduce:
1. Follow the instructions http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml
2. run $EPREFIX/startprefix


Actual Results:  
deepthought:~ root# /Gentoo/startprefix 
Entering Gentoo Prefix /Gentoo
/Gentoo/startprefix: line 37: 61200 Illegal instruction     $SHELL -l
Leaving Gentoo Prefix with exit status 132
deepthought:~ root# 


Expected Results:  
Startprefix should set me in a shell like the discipton of the script says:
 Fabian Groffen <grobian@gentoo.org> -- 2007-03-10
# Enters the prefix environment by starting a login shell from the
# prefix.  The SHELL environment variable is elevated in order to make
# applications that start login shells to work, such as `screen`.


I have tried to bootstrap Gentoo-prefix in my as normal user first and than as root with the same result.
Comment 1 Fabian Groffen gentoo-dev 2011-01-07 11:19:40 UTC
what is your shell, what is your platform/system
Comment 2 Elmar Otter 2011-01-07 11:23:04 UTC
My shell is bash and my system is MAC OS X Version 10.6.5
Comment 3 Fabian Groffen gentoo-dev 2011-01-11 18:46:45 UTC
does it also happen if you run this as non-root?
Comment 4 Elmar Otter 2011-01-11 19:05:26 UTC
Yes.  I first tried it as normal user in my home directory. 

(In reply to comment #3)
> does it also happen if you run this as non-root?
> 
Comment 5 Elmar Otter 2011-01-11 19:07:23 UTC
(In reply to comment #4)
Yes.  I first tried it as normal user in my home directory. 
> 
> (In reply to comment #3)
> > does it also happen if you run this as non-root?
> > 
> 

Comment 6 Hans de Graaff gentoo-dev Security 2011-03-14 15:58:12 UTC
I'm seeing this too on a fresh prefix install. I'm wondering if it is because I messed up CHOST. I did set it initially to x86_64-apple-darwin10 but then my shell got messed up and I forgot to reset it (or to add it to /etc/make.conf). I'll do emerge -e system now that it's set again to see if that helps.
Comment 7 Fabian Groffen gentoo-dev 2011-03-14 16:05:49 UTC
ok, that's interesting.  Can you be more specific in what way you messed it up?
Comment 8 Hans de Graaff gentoo-dev Security 2011-03-14 16:46:27 UTC
(In reply to comment #7)
> ok, that's interesting.  Can you be more specific in what way you messed it up?

I set CHOST per the instructions in the bootstrap guide (early on in the process). Somewhere (and I don't remember where) during the initial bootstrap my terminal connection got lost due to network issues. I reconnected and picked up where I left of, without setting CHOST again.

Then I also didn't set it in /etc/make.conf and did 'emerge -e system'. B0rkage.

The machine is now doing another 'emerge -e system' with the proper CHOST set, but it's at work and I can't monitor it. More tomorrow. I guess if that fails I'll do rm -rf /prefix and start over.
Comment 9 Hans de Graaff gentoo-dev Security 2011-03-15 12:27:42 UTC
It's not CHOST. I recreated the prefix stuff from scratch today, without any CHOST setting, and I'm getting the same issue. Also, while doing the final 'emerge -e system' the sys-devel/binutils-apple-3.2.3-r2 build hangs at:

i686-apple-darwin10-gcc -DI386 -Di486 -Di586 -Di686  -I.. -I../../include -I. -Wall -mdynamic-no-pic -DNeXT_MOD  -DASLIBEXECDIR="/prefix/usr/lib/binutils/i686-apple-darwin10/3.2.3/" -O2 -pipe -march=nocona -ULTO_SUPPORT -c -MD \
	-dependency-file ./xmalloc.d -o ./xmalloc.o ../xmalloc.c
md -d -u ./Makedep ./xmalloc.d


At this point the terminals become unresponsive, e.g. doing top or ps hangs indefinitely. We had an issue installing Xcode on this machine, so we are going to try re-installing that later today.
Comment 10 Hans de Graaff gentoo-dev Security 2011-03-17 14:59:53 UTC
We've traced this back to incomplete installs of Xcode. We've now installed the package file directly instead of going to the normal installer, and with this the Xcode installation completed successfully instead of hanging at the final steps. Not sure what the actual difference was but our problems (both with bash and with compiling binutils) are gone now.
Comment 11 Fabian Groffen gentoo-dev 2011-03-17 16:54:25 UTC
hmmm, interesting.  I am examining the ability to work on a system without Xcode installed at the moment.  Perhaps using csu would solve the problem as well.
Comment 12 John Gibson 2011-04-26 21:15:01 UTC
I encountered the same problem.  The behavior is a little odd.  Running $EPREFIX/bin/bash works but $EPREFIX/bin/bash --login triggers the illegal instruction.  I was using Xcode 3.2.5 and I had this problem even though my install completed successfully.  After upgrading to Xcode 3.2.6 my next bootstrap was just fine.
Comment 13 Fabian Groffen gentoo-dev 2011-04-27 06:18:08 UTC
I've heard suggestions that bash-4.2 solves this problem, but I don't have hard evidence
Comment 14 John Gibson 2011-04-27 18:11:14 UTC
Sadly I spoke too soon.  Although bash --login works, emerging zsh fails with an illegal instruction when invoking a bash script during make.  If invoke the script from the command line it still fails, but the location of the failure in the script seems to change each time.  If I run make from the command line then it doesn't exhibit the problem at all.  Should I open a new bug for this zsh problem?  Or is this really just a problem with a bad bash on OS X?

Also Fabian's point in about bash 4.2 is correct.  The 4.1 versions that I tried both caused Illegal Instruction errors when invoked with --login.
Comment 15 Fabian Groffen gentoo-dev 2017-11-13 17:33:32 UTC
This was fixed in later bash versions.