Created attachment 439352 [details] emerge --info The build of ksh seems to require the old 16-bit Microsoft/IBM make utility. + nmake --base --compile --file=/var/tmp/portage/app-shells/ksh-93.20140625/work/src/cmd/nmake/Makerules.mk sh: line 3: nmake: command not found The ebuild log and emerge --info will be attached.
Created attachment 439354 [details] ebuild log
nmake is a UNIX command that gets built during the ksh build process. The real error is further up; the assembler is segfaulting. iffe: cc -fPIC -march=athlon-mp -mmmx -m3dnow -msse -mfpmath=sse,387 -O2 -pipe -fomit-frame-pointer -fno-stack-protector -Wl,-O1 -Wl,--as-needed -L/var/tmp/portage/app-shells/ksh-93.20140625/work/arch/linux.i386/lib -I/var/tmp/portage/app-shells/ksh-93.20140625/work/arch/linux.i386/include/ast -I/var/tmp/portage/app-shells/ksh-93.20140625/work/arch/linux.i386/include -c ./karn10110.c i686-pc-linux-gnu-gcc: internal compiler error: Segmentation fault (program as) Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. iffe: cc: core dump or fatal interruption -- results inconclusive mamake [lib/libcoshell]: *** exit code 139 making FEATURE/nfsd
check `dmesg` to see it has anything useful otherwise, try building binutils with simpler CFLAGS (like just -O2 -march=native) and see if it ksh works.
(In reply to SpanKY from comment #3) > check `dmesg` to see it has anything useful dmesg shows nothing in the way of disk corruption or anything like that. > otherwise, try building binutils with simpler CFLAGS (like just -O2 > -march=native) and see if it ksh works. I rebuilt binutils with: -march=native -O2 -pipe The build of ksh still crashes with the segfault in as. The ebuild log is effectively identical to the one already uploaded.
It has been 6 months since I reported this. Has there been any progress made on it? I have seen that bug #591080 has identical symptoms, so it seems to confirm this bug. It also seems to be specific to 32-bit systems. Does this help?
(In reply to David W Noon from comment #5) > It has been 6 months since I reported this. Has there been any progress made > on it? > > I have seen that bug #591080 has identical symptoms, so it seems to confirm > this bug. It also seems to be specific to 32-bit systems. Does this help? On the 32 bit part only: I started a thread on gentoo newsgroup that you responded to on this issue some time ago. Since then I've installed another gentoo into a vbox vm... and once again cannot emerge ksh.... with this same problem. (It is also a 32 bit vm) OK, now the good part: I have anther host (vbox vm) running gentoo, only on that install I was unable to get lxde running.... I decided to turn it into a no-x host and unmerged all X stuff. (Not sure if that has any bearing) I did manage to get ksh installed there... I must have installed with no issues since I don't recall having to do anything special. So cutting to the chase: I have one 32 bit install of gentoo in a vbox vm where I cannot install ksh with the problem described in this bug. (Bug 587730). I have another slightly older install of 32 bit gentoo where ksh installed with no problems. Both cases were installing this version: app-shells/ksh-93.20160110 CFLAGS="-O2 -march=i686 -pipe" in both /etc/portage/make.conf I hope there is a clue in there somewhere... but not sure how to go about finding it. If you have ideas you can send me a message at reader@newsguy.com
(In reply to Harry Putnam from comment #6) > (In reply to David W Noon from comment #5) > > It has been 6 months since I reported this. Has there been any progress made > > on it? > > > > I have seen that bug #591080 has identical symptoms, so it seems to confirm > > this bug. It also seems to be specific to 32-bit systems. Does this help? > > On the 32 bit part only: > > I started a thread on gentoo newsgroup that you responded to on this issue > some > time ago. Well, it has been hanging around for some time. > Since then I've installed another gentoo into a vbox vm... and once again > cannot emerge ksh.... with this same problem. (It is also a 32 bit vm) > > OK, now the good part: I have anther host (vbox vm) running gentoo, only on > that install I was unable to get lxde running.... I decided to turn it into > a no-x host and unmerged all X stuff. (Not sure if that has any bearing) > > I did manage to get ksh installed there... I must have installed with no > issues since I don't recall having to do anything special. > > So cutting to the chase: I have one 32 bit install of gentoo in a vbox vm > where I cannot install ksh with the problem described in this bug. (Bug > 587730). > I have another slightly older install of 32 bit gentoo where ksh installed > with no problems. Both cases were installing this version: > app-shells/ksh-93.20160110 > CFLAGS="-O2 -march=i686 -pipe" in both /etc/portage/make.conf > > I hope there is a clue in there somewhere... but not sure how to go about > finding it. If you have ideas you can send me a message at > reader@newsguy.com The real problem is in sys-devel/binutils whereby /usr/bin/as is segfaulting. I have upgraded GCC since I reported this, but the newer C compiler probably generates identical assembler code to the old one and hence the assembly still segfaults. The binutils in question, on my machine, is 2.25.1-r1. I might rebuild this with -march=i486 instead of -march=native and see if that changes anything. The newer version of app-shells/ksh probably does not have much effect, as the Korn shell is very old and it source code does not change very much these days, even in "clean room" builds that differ from the AT&T original Korn shell. I have also installed app-shells/mksh as an alternative Korn shell.
This problem is reproducible trying to rebuild ksh (via emerge -e world) on two similar 32 bit machines, both already have app-shell/ksh installed - was last built successfully 7/21/16. It builds OK on two other 64 bit machines. Same binutils (2.25.1-r1) and gcc (4.9.4) on all machines. CFLAGS="-march=pentium3 -O2" on one of the failing machines, CFLAGS="-march=native -O2" on the other. Bug 591080 is a duplicate.
Builds without problem using binutils-2.26.1. Does not currently build with 2.25.1-r1 (current stable version)
*** Bug 591080 has been marked as a duplicate of this bug. ***
Since the stabilization of sys-apps/binutils-2.26.1, the assembler code for this package now assembles properly.