Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87247 - bash-3.0 needs -j1
Summary: bash-3.0 needs -j1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Aron Griffis (RETIRED)
URL:
Whiteboard:
Keywords:
: 87874 89999 94578 96438 98244 98247 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-30 03:40 UTC by Richard Brown (RETIRED)
Modified: 2005-07-07 11:17 UTC (History)
9 users (show)

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


Attachments
hack to remove -j (bash-parallel.patch,364 bytes, patch)
2005-06-08 10:53 UTC, Rafael Ávila de Espíndola
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Brown (RETIRED) gentoo-dev 2005-03-30 03:40:49 UTC
Error below happends when emerging bash-3.0-r9, retried with MAKEOPTS="j2" and it went fine.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
rm -f libhistory.a
ar cr libhistory.a history.o histexpand.o histfile.o histsearch.o shell.o
savestring.o mbutil.o xmalloc.o
ar: mbutil.o: No such file or directory
make[1]: *** [libhistory.a] Error 1
make[1]: Leaving directory `/var/tmp/portage/bash-3.0-r9/work/bash-3.0/lib/readline'
make: *** [lib/readline/libhistory.a] Error 1
rm -f history.o
make: *** Waiting for unfinished jobs....


emerge info

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5, glibc-2.3.4.20041102-r1,
2.6.11-gentoo-r4 i686)
=================================================================
System uname: 2.6.11-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 29 2005, 14:02:06)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.9.4, 1.5, 1.6.3, 1.4_p6, 1.7.9-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/
ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="x86 X a52 acpi alsa apm avi berkdb bitmap-fonts cdr crypt cups dvd dvdr
emboss encode fam foomaticdb fortran freetds gdbm gif gnome gpm gstreamer gtk
gtk2 hal howl imlib javascript jpeg libg++ libwww mad mikmod mmap mmx motif
mozilla mp3 mpeg mssql ncurses nls nptl odbc offensive oggvorbis opengl oss pam
pcmcia pdflib perl pic png python quicktime readline samba sdl spell sqlite sse
ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts xml2 xprint xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Martin von Gagern 2005-04-04 01:09:14 UTC
*** Bug 87874 has been marked as a duplicate of this bug. ***
Comment 2 SpanKY gentoo-dev 2005-04-22 10:02:23 UTC
*** Bug 89999 has been marked as a duplicate of this bug. ***
Comment 3 Chris Smith 2005-05-07 09:22:07 UTC
This is strange....just ran into this problem with trying to upgrade to bash-3.0-r11 from bash-3.0-r10 (no longer in the tree). Oddly enough I was able to downgrade to bash-3.0-r9 but still couldn't upgrade to bash-3.0-r11 until I changed the "-j3".
IOW emerging bash-3.0-r9 worked with "-j3" (not only now but in the past) but bash-3.0-r11 didn't.
Comment 4 Boger 2005-05-19 01:06:31 UTC
Same thing with  bash-3.0-r11 and  MAKEOPTS='-j2', but with histsearch.o.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2005-05-31 01:52:54 UTC
*** Bug 94578 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-05-31 01:54:20 UTC
The summary is misleading - not limited to bash-3.0-r9 and not limited to
MAKEOPTS="-j3"
Comment 7 Rafael Ávila de Espíndola 2005-06-08 10:53:23 UTC
Created attachment 60851 [details, diff]
hack to remove -j
Comment 8 Decade 2005-06-09 02:29:19 UTC
This one truly is odd.

I just emerged bash-3.0-r11 on two slow machines, 586 and Alpha EV5, both with
only remote DISTCC_HOSTS.

The 586 with MAKEOPTS="-j4" emerged with no problem.
The Alpha with MAKEOPTS="-j3" failed with the mbutil.o thing.
The Alpha with MAKEOPTS="-j1" emerged with no problem.
Comment 9 Ajay Sharma 2005-06-10 09:15:26 UTC
for me it was dying with that error on "libhistory.a".  I commented out the
MAKEOPTS="-j3" in my /etc/make.conf and then it build just fine after that.  My
emerge info is below (with the j3 flag back on:

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.11.10 i686)
=================================================================
System uname: 2.6.11.10 i686 AMD Athlon(tm) MP 1600+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Apr 27 2005, 11:10:15)]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-mp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-mp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X aim alsa apache2 apm avi berkdb bitmap-fonts cdparanoia cdr
clamav crypt cups curl divx4linux emboss encode faad fam flac foomaticdb fortran
gd gdbm gif gpm gtk gtk2 imagemagick imlib innodb jpeg libwww mad maildir mmx
mp3 mpeg mysql mysqli ncurses nvidia ogg oggvorbis opengl oss pam pcre perl php
pic png qt quicktime readline real samba sdl slang spell sse sse2 ssl svga tcpd
tidy truetype truetype-fonts type1-fonts vorbis xml2 xosd xv xvid xvmc zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-06-18 02:49:18 UTC
*** Bug 96438 has been marked as a duplicate of this bug. ***
Comment 11 ta2002 2005-06-27 09:33:38 UTC
I ran into this over the weekend. Version 3.0-r11 failed
to compile the first time, but compiled fine the second
(savestring.c did not get compiled "in time" the first
time, thus savestring.o did not exist) with no changes.

I asked a friend (a guru) about this, and he said that
many programs (obviously including bash) simply don't
have the required safeguards to allow parallel jobs.

Obviously, the ebuild needs to remove the -jn makeopt
(where n represents any interger larger than one).
Comment 12 Martin von Gagern 2005-06-27 10:10:37 UTC
Comment 11 describes what is already stated e.g. in /usr/portage/skel.ebuild.
"emake" does parallel build; in cases where this does not work, a simple "emake
-j1" should be used instead. The hack from comment 7 seems to be overkill for
this, since with multiple -j options, the last one overrides all previous.

So probably a simple "emake -j1" should be used in the ebuild for now, and the
problem be reported upstream with the bash developers?
Comment 13 Aron Griffis (RETIRED) gentoo-dev 2005-06-27 11:49:21 UTC
Comment on attachment 60851 [details, diff]
hack to remove -j

ebuild patch incorrect and unnecessary.  We'll use -j1 if the Makefiles can't
be repaired correctly.
Comment 14 Aron Griffis (RETIRED) gentoo-dev 2005-06-27 14:19:42 UTC
When this fails for people, I'd like to see 3 things:

(1) emerge --info
(2) attachment containing *complete* log of failing emerge
(3) attachment that is the Makefile in the directory where the merge failed. 
For example, most of these seem to be failing in the lib/readline directory.  In
those cases, I want the attachment to be
/var/tmp/portage/bash-3.0-r11/work/bash-3.0/lib/readline/Makefile

I've done a lot of testing on various architectures and been unable to reproduce
this so far.  I think it's something environmental (such as, perhaps, incorrect
Makefile generated by rogue autotools or something like that)
Comment 15 Aron Griffis (RETIRED) gentoo-dev 2005-06-27 14:56:33 UTC
Nevermind, I see the problem. libhistory.a and libreadline.a use some objects in
common.  When built in parallel, they end up trampling each other.

http://www.gentoo.org/cgi-bin/viewcvs.cgi/app-shells/bash/files/bash-3.0-parallel.patch?rev=1.1&content-type=text/vnd.viewcvs-markup
http://www.gentoo.org/cgi-bin/viewcvs.cgi/app-shells/bash/bash-3.0-r11.ebuild?r1=1.7&r2=1.8
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2005-07-07 10:11:36 UTC
*** Bug 98244 has been marked as a duplicate of this bug. ***
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2005-07-07 11:17:08 UTC
*** Bug 98247 has been marked as a duplicate of this bug. ***