Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207148 - sys-apps/man-1.6f parallel make fails
Summary: sys-apps/man-1.6f parallel make fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-23 12:29 UTC by Csaba Tóth
Modified: 2010-01-27 02:36 UTC (History)
3 users (show)

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


Attachments
patch for man-1.6f-r3.ebuild (man-1.6f-r3.ebuild.patch,339 bytes, patch)
2009-04-29 17:06 UTC, Csaba Tóth
Details | Diff
buildlog of the error (build.log,17.40 KB, text/plain)
2009-10-15 19:26 UTC, Enno Köster
Details
Patch to src/Makefile.in to force serialization of generation of msg.c and gripedefs.h, to avoid spawning competing instances of makemsg (man-1.6f-parallel-makemsg.patch,480 bytes, patch)
2009-10-16 02:57 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Tóth 2008-01-23 12:29:45 UTC
i ran emerge -e system on new installation and sys-apps/man-1.6f failed to compile with this error message:

./makemsg ../msgs/mess.en gripedefs.h msg.c
x86_64-pc-linux-gnu-gcc -c -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -march=nocona -pipe -msse -msse2 -mfpmath=sse -mmmx -fomit-frame-pointer -I. -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DDO_COMPRESS msg.c
x86_64-pc-linux-gnu-gcc -c -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -march=nocona -pipe -msse -msse2 -mfpmath=sse -mmmx -fomit-frame-pointer -I. -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DDO_COMPRESS man.c
x86_64-pc-linux-gnu-gcc -c -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -march=nocona -pipe -msse -msse2 -mfpmath=sse -mmmx -fomit-frame-pointer -I. -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DDO_COMPRESS manfile.c
msg.c:89:11: warning: missing terminating " character
msg.c:89: error: missing terminating " character
msg.c:89:23: warning: no newline at end of file
msg.c:89: error: expected expression at end of input
make[1]: *** [msg.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/sys-apps/man-1.6f/work/man-1.6f/src'
make: *** [source] Error 2
 *
 * ERROR: sys-apps/man-1.6f failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_compile
 *             environment, line 2105:  Called die
 * The specific snippet of code:
 *       emake || diefunc "$FUNCNAME" "$LINENO" "$?" "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-apps:man-1.6f:20080123-120215.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/man-1.6f/temp/environment'.
 *


my emerge --info:

bash-3.2# emerge --info
Portage 2.1.4 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.19-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r5 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz
Timestamp of tree: Wed, 23 Jan 2008 07:00:02 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 2.1.3
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.7.9-r1, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe -msse -msse2 -mfpmath=sse -mmmx -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe -msse -msse2 -mfpmath=sse -mmmx -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-z,now -Wl,-z,relro"
LINGUAS="hu en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac accounting acl acpi acpi4linux activefilter adns alsa amd64 apache2 apm avahi bash-completion bcmath berkdb bitmap-fonts bzip2 bzlib c++ calendar cap caps cdparanoia cdr cdrom chroot clamac clamav cli cracklib crypt ctype cups curl curlwrappers cyrus dba dbase dbm dbus devfs devfs26 devmap dhcp dio dmx dnd dnsdb dri dv dvb dvd dvdr dvdread encode erandom escreen ethereal evms2 exif expat extensions f2c fastcgi flac fortran freetype fs ftp gd gdbm geoip gif gmp gnutls hal iconv idled image imagemagick imap inifile innodb intl ipv6 isdnlog java javascript jikes jpeg jpeg2k kerberos ldap lesstif libg++ libnotify live lm_sensors logrotate lzo lzw lzw-tiff memlimit mhash midi mime mmap mmx mmx2 mng mp3 mpeg mpeg4 mpm-worker mppe-mppc msdav msession mudflap mysql ncurses nethack network network-cron nls nptl nptlonly ntlm oav objc ogg oggvorbis openal opengl openmp openssh pam parse-clocks pcap pcntl pcre pdf perl pg-vacuumdelay php pic pnp posix postgres pppd pthreads pulseaudio pwdb python readline recode reflection rpc sasl session sftplogging shared sharedmem simplexml skey slang smime sms sndfile snmp sockets spell spl squid sse sse2 ssl startup-notification svg symlink sysvipc tcpd threads transcode truetype truetype-fonts type1 type1-fonts underscores unicode urandom usb userlocales vhosts virus-scan wmf xcomposite xfs xinerama xinetd xml xmlrpc xorg xpm xscreensaver zero-penalty-hit zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse vmmouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu en" USERLAND="GNU" VIDEO_CARDS="nv vmware ncidia vesa radeon radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Reproducible: Always

Steps to Reproduce:
1. emerge -e system
2. 
3.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-23 12:42:06 UTC
Try w/ MAKEOPTS="-j1"
Comment 2 Csaba Tóth 2008-01-23 12:47:31 UTC
Ok, it works.
Sorry about this trivial bug
Comment 3 SpanKY gentoo-dev 2008-01-23 12:59:00 UTC
we need to figure out what went wrong and fix it in the ebuild
Comment 4 John Alberts 2008-03-21 23:01:14 UTC
I had a problem building this using catalyst building a stage3, so I ran across this bug.  I don't think my catalyst failure is related to this, but I wanted to mention that I just emerged man-1.6f without needing MAKEOPTS="-j1".  This is a quad core Xeon.

emerge --info
---------
Portage 2.1.3.9 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.20-vs2.2.0-gentoo x86_64)
=================================================================
System uname: 2.6.20-vs2.2.0-gentoo x86_64 Intel(R) Xeon(TM) CPU 3.40GHz
Timestamp of tree: Fri, 21 Mar 2008 04:30:01 +0000
ccache version 2.3 [enabled]
app-shells/bash:     3.2_p17
dev-lang/python:     2.3.5-r3, 2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.3
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -fomit-frame-pointer -mfpmath=sse -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -fomit-frame-pointer -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb ccache cli cracklib crypt dri extensions fortran gdbm gpm iconv ipv6 isdnlog midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Matthew Gregory Sr. 2009-01-03 22:00:45 UTC
confirmed

(amd64 chroot) livecd etc # emerge --info
Portage 2.1.6.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.19-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.19-gentoo-r5-x86_64-AMD_Athlon-tm-_64_Processor_3500+-with-glibc2.2.5
Timestamp of tree: Sat, 03 Jan 2009 16:45:02 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distcc distlocks fixpackages notitles parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext amd64 mmx mmxext multilib sse sse2" ALSA_CARDS="intel8x0 intel8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="cern_meta imagemap log_forensic proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http substitute version mime mime_magic mem_cache log_config status speling setenvif rewrite include headers filter file_cache ext_filter expires env disk_cache dir deflate dav_lock dav_fs dav cache autoindex authz_user authz_owner authz_host alias actions auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile info logio negotiation unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

./makemsg ../msgs/mess.en gripedefs.h msg.c
make[2]: Leaving directory `/var/tmp/portage/sys-apps/man-1.6f-r2/work/man-1.6f/man/en'
make[1]: Leaving directory `/var/tmp/portage/sys-apps/man-1.6f-r2/work/man-1.6f/man'
x86_64-pc-linux-gnu-gcc -c -Wall -Wstrict-prototypes -Wmissing-prototypes -march=k8 -O2 -pipe -I. -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DNONLS -DDO_COMPRESS msg.c
msg.c:89: error: missing terminating " character
msg.c:89:23: warning: no newline at end of file
msg.c:89: error: expected expression at end of input
make[1]: *** [msg.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/sys-apps/man-1.6f-r2/work/man-1.6f/src'
make: *** [source] Error 2
 * 
 * ERROR: sys-apps/man-1.6f-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2159:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-apps/man-1.6f-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/man-1.6f-r2/temp/environment'.
 * 

>>> Failed to emerge sys-apps/man-1.6f-r2, Log file:

>>>  '/var/tmp/portage/sys-apps/man-1.6f-r2/temp/build.log'

 * Regenerating GNU info directory index...
 * Processed 86 info files.

 * IMPORTANT: 4 config files in '/etc' need updating.
 * See the CONFIGURATION FILES section of the emerge
 * man page to learn how to update config files.
Comment 6 Grzegorz Chwesewicz 2009-02-16 10:16:41 UTC
Same problem with sys-apps/man-1.6f-r3, but only when compiling with "-lzma", with "lzma" enabled it compiles OK, but gives warning:

>>> Completed installing man-1.6f-r3 into /var/tmp/portage/sys-apps/man-1.6f-r3/image/

 * QA Notice: make jobserver unavailable:
 *
 *      make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
 *      make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment


Portage 2.1.6.4 (default/linux/x86/2008.0/server, gcc-4.1.2, glibc-2.6.1-r0, 2.6.20.21-20.chilan i686)
=================================================================
System uname: Linux-2.6.20.21-20.chilan-i686-AMD_Sempron-tm-_Processor_2600+-with-glibc2.0
Timestamp of tree: Mon, 16 Feb 2009 08:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=i686 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ http://gentoo.prz.rzeszow.pl/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo rsync://mirrors.sec.informatik.tu-darmstadt.de/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 berkdb bzip2 cli cracklib crypt dri gdbm iconv isdnlog lzma mailwrapper midi mmx mudflap mysql ncurses nptl nptlonly openmp pam pcre perl pppd python readline reflection session snmp spl ssl sysfs tcpd truetype x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias asis" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Csaba Tóth 2009-04-29 17:06:27 UTC
Created attachment 189872 [details, diff]
patch for man-1.6f-r3.ebuild

this is a small fix for this bug.

I tryed it with a quad processor, but cannot reproduce. But i used the latest gcc, not an older gentoo stage.

This is a small program, quickly compiles, so we can stop parallel compiling without pain.
Comment 8 Kevin Pyle 2009-07-10 17:05:09 UTC
Changing MAKEOPTS at global scope is inappropriate even if the decision is to hide the bug.  If you want to force a serial build, it is better to change src_compile to use emake -j1.

That said, I too cannot reproduce this problem after several attempts with MAKEOPTS=-j, nor can I see how the Makefile rules would permit this to happen.  After deleting src/makemsg, src/msg.c, and src/msg.o, running (cd src && make -n msg.o) gives:

i686-pc-linux-gnu-gcc -o makemsg makemsg.c
./makemsg ../msgs/mess.en gripedefs.h msg.c
i686-pc-linux-gnu-gcc -c -Wall -Wstrict-prototypes -Wmissing-prototypes  -I. -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DNONLS -DDO_COMPRESS msg.c

This would seem to indicate that make correctly wants to build and run makemsg before attempting to compile msg.c.

The line reported in the error messages spans the 4K boundary, so it would appear that the failure mode involves makemsg flushing the first 4K of data, then gcc runs on the generated file before the rest of the data is written.  It is not clear from the reported failures whether makemsg paused, exited cleanly, or crashed before writing the rest of the data.  A pause seems implausible since make should have waited for makemsg to finish.  A clean exit seems unlikely based on examination of the source code.  The only exit path that produces a success return code is to reach the end of main() and return after performing an orderly shutdown.  A crash should have produced a non-zero exit status, which would cause make to report failure there, rather than trying to compile msg.c.  It is possible, though not very likely, that fclose failed to flush the data, in which case the remainder of the file could have been lost when makemsg exited.  This is a bug in makemsg, where it fails to check a return code since the call almost always succeeds.

Since the original reporter can no longer reproduce this, could one of the me-too users post a full build log?  If you can reproduce the failure at will, an strace of makemsg on the failure case would be nice too.
Comment 9 Enno Köster 2009-10-15 19:26:25 UTC
Created attachment 207237 [details]
buildlog of the error
Comment 10 Enno Köster 2009-10-15 19:27:55 UTC
Comment on attachment 207237 [details]
buildlog of the error

> Since the original reporter can no longer reproduce this, could one of the
> me-too users post a full build log?  If you can reproduce the failure at will,
> an strace of makemsg on the failure case would be nice too.

Full build.log attached (sorry for the broken chars, posting from a win-box)

i found this while trying to rebuild the whole system on our new server.
i wanted to do this:
emerge linux-headers glibc binutils-config binutils gcc-config gcc && emerge glibc binutils gcc && emerge system -e && emerge world -e && emerge world -e

strange thing is that the first "emerge -e world" worked fine but the second produced the error described in the first post. then i tried to emerge only this package, which resulted in the same error as expected. then i searched for the problem, found this bug-report and tried the workaround.

result:
MAKEOPTS="-j1" works fine
MAKEOPTS="-j3" produces the problem already mentioned in the first post (missing terminating " character)

after that i made my final "emerge world -e" with -j1, which worked fine.
then out of curiosity i set it to -j3 again and ran "emerge sys-apps/man" twice.
the first time it worked, but the second run produced the error so i think its related to ccache.

if you need more info from me, just tell me, but keep it simple. i just use linux for our home-server and dont know everything yet :)
Comment 11 Kevin Pyle 2009-10-16 02:52:28 UTC
I see the problem now.  The rule to build msg.c is in src/Makefile.in, and reads:

msg.c gripedefs.h: ../msgs/mess.en makemsg

This tells make that there are two targets, and that each target depends on ../msgs/mess.en and on makemsg.  This rule seems correct at first glance, because both targets are generated files and they are both generated by running makemsg as described in the associated rule.  However, Make considers these two targets to be unrelated, and as such can attempt to build them in parallel.  This can be seen by entering the source directory, removing msg.c and gripedefs.h, then running:

$ make -n msg.c gripedefs.h -j

Make responds:
./makemsg ../msgs/mess.en gripedefs.h msg.c
./makemsg ../msgs/mess.en gripedefs.h msg.c

Thus, the following sequence could occur:

Make starts child #1 and child #2.  Make intends that child #1 will build msg.c.  Make intends that child #2 will build gripedefs.h.
Child #1 opens msg.c, writes the full file, and syncs its output.
Child #2 opens msg.c, truncating it, and writes 4K.
Child #1 exits.
Make reacts to the completion of child #1 by declaring msg.c complete, and begins compilation of msg.o, which was blocked waiting for msg.c to be ready.
Compilation of msg.o fails in the manner shown, because msg.c is temporarily malformed.  The compilation child exits with failure.
Child #2 writes the remainder of msg.c, syncs its output, and exits.
The user investigates and finds msg.c to be well formed.

There are variations on this involving the ordering of child #2 truncating the file relative to the start of the compilation child, but the above illustrates the problem.

There are two possible fixes:
One fix would be to create an artificial dependency between msg.c and gripedefs.h, so that Make is prohibited from building them in parallel.  The other fix would be to rewrite the rule so that parallel runs do not overwrite each other's output.  I will attach a patch to implement the former fix.

Enno Köster: the problem is a generic parallelism problem, not related to ccache.  Your build log helped me see the real problem, though.
Comment 12 Kevin Pyle 2009-10-16 02:57:46 UTC
Created attachment 207270 [details, diff]
Patch to src/Makefile.in to force serialization of generation of msg.c and gripedefs.h, to avoid spawning competing instances of makemsg

This patch makes msg.c depend on gripedefs.h, so that Make will not spawn competing instances of makemsg that could truncate each other's output files.  Apply it by adding:

    epatch "${FILESDIR}"/${P}-parallel-makemsg.patch

at the end of the block of epatch statements already present in src_unpack.  With this patch applied, I can build man-1.6f-r3 with MAKEOPTS=-j.
Comment 13 SpanKY gentoo-dev 2010-01-27 02:36:27 UTC
added to man-1.6f-r4, thanks Kevin

http://sources.gentoo.org/sys-apps/man/files/man-1.6f-parallel-build.patch?rev=1.1