Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272328 - dev-libs/icu: emake install fails with race condition
Summary: dev-libs/icu: emake install fails with race condition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Arfrever Frehtes Taifersar Arahesis (RETIRED)
URL: https://ssl.icu-project.org/trac/tick...
Whiteboard:
Keywords:
: 281684 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-02 23:55 UTC by Andrew John Hughes
Modified: 2011-04-27 18:51 UTC (History)
10 users (show)

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


Attachments
build.log for -j5 (build.log,433.08 KB, text/plain)
2009-07-15 04:27 UTC, Andrei Slavoiu
Details
build.log for -j1 (build.log,634.99 KB, text/plain)
2009-07-15 04:35 UTC, Andrei Slavoiu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2009-06-02 23:55:21 UTC
The first line of src_install:

    emake DESTDIR="${D}" install || die "emake install failed"

should be:

    emake -j1 DESTDIR="${D}" install || die "emake install failed"

Otherwise, a race condition can occur with the creation of directories.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-06-03 15:55:23 UTC
Can you reproduce this bug with dev-libs/icu-4.2?
Comment 2 Andrew John Hughes 2009-06-08 21:54:50 UTC
Yes, same race:

uwmsg.c: In function ‘uprint’:
uwmsg.c:73: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
make[3]: Leaving directory `/var/tmp/portage/dev-libs/icu-4.2/work/icu/source/extra/uconv'
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH  MAKEFLAGS= ../../bin/pkgdata -p uconvmsg -O pkgdata.inc -m static -s uconvmsg -d uconvmsg -T uconvmsg uconvmsg/uconvmsg.lst
cd ../.. \
	 && CONFIG_FILES=extra/uconv/uconv.1 CONFIG_HEADERS= /bin/sh ./config.status
icupkg: unable to open input file "uconvmsg/root.res"
make[2]: *** [package-resfiles] Error 4
make[2]: *** Waiting for unfinished jobs....
config.status: creating extra/uconv/uconv.1
mkdir: cannot create directory `uconvmsg': File exists
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-06-21 17:51:29 UTC
(In reply to comment #2)
> icupkg: unable to open input file "uconvmsg/root.res"

icu/source/extra/uconv/uconvmsg/root.res should be created in src_compile().

Please attach whole build logs of building dev-libs/icu-4.2 with and without MAKEOPTS="-j1".
Also please post the output of `emerge --info`.
Comment 4 Andrei Slavoiu 2009-07-15 04:27:38 UTC
Created attachment 197993 [details]
build.log for -j5
Comment 5 Andrei Slavoiu 2009-07-15 04:35:28 UTC
Created attachment 197995 [details]
build.log for -j1
Comment 6 Andrei Slavoiu 2009-07-15 04:37:06 UTC
Portage 2.2_rc33 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r2 x86_64)
=================================================================                                         
System uname: Linux-2.6.30-gentoo-r2-x86_64-AMD_Phenom-tm-_9350e_Quad-Core_Processor-with-gentoo-2.0.1    
Timestamp of tree: Wed, 15 Jul 2009 03:25:01 +0000                                                        
ccache version 2.4 [enabled]                                                                              
app-shells/bash:     4.0_p24                                                                              
dev-java/java-config: 2.1.8-r1                                                                            
dev-lang/python:     2.6.2-r1                                                                             
dev-util/ccache:     2.4-r8                                                                               
dev-util/cmake:      2.6.4                                                                                
sys-apps/baselayout: 2.0.1                                                                                
sys-apps/openrc:     0.4.3-r3                                                                             
sys-apps/sandbox:    2.0                                                                                  
sys-devel/autoconf:  2.13, 2.63-r1                                                                        
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11                               
sys-devel/binutils:  2.19.1-r1                                                                            
sys-devel/gcc-config: 1.4.1                                                                               
sys-devel/libtool:   2.2.6a                                                                               
virtual/os-headers:  2.6.30                                                                               
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                            
CBUILD="x86_64-pc-linux-gnu"                                                                              
CFLAGS="-march=native -ggdb -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/config"  
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"                                       
CXXFLAGS="-march=native -ggdb -O2 -pipe"                                                                                                       
DISTDIR="/usr/portage/distfiles"                                                                                                               
EMERGE_DEFAULT_OPTS="--with-bdeps y"                                                                                                           
FEATURES="buildpkg ccache collision-protect distlocks fixpackages parallel-fetch preserve-libs preserved-rebuild protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox"                                                                              
GENTOO_MIRRORS="http://mirrors.evolva.ro/gentoo http://ftp.roedu.net/pub/mirrors/gentoo.org http://mirrors.xservers.ro/gentoo http://distfiles.gentoo.org"                                                                                                                                    
LANG="ro_RO.UTF-8"                                                                                                                             
LC_ALL="ro_RO.UTF-8"                                                                                                                           
LDFLAGS="-Wl,-O1,--enable-new-dtags,-z,combreloc,--as-needed"                                                                                  
LINGUAS="ro en eo"                                                                                                                             
MAKEOPTS="-j5 -l8"                                                                                                                             
PKGDIR="/usr/portage/packages"                                                                                                                 
PORTAGE_CONFIGROOT="/"                                                                                                                         
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 /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.ro.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds 7zip X a52 aac aalib accessibility acl acpi aesicm agg aiglx akonadi alsa amd64 amr amrnb amrwb apache2 asf aspell audiofile bash-completion berkdb bonjour branding bzip2 caps captury cddb cdinstall cdparanoia cdr cisco clamav consolekit cracklib crypt css cupscurl dba dbus dga djvu dmi doc dpms dri dts dv dvd dvdr dvdread ebook eds emboss encode erandom evo examples exif expat faac faad fam fbcon fbcondecor ffmpeg firefox flac fontconfig fortran ftp gcj gcrypt gd gdbm geoip gif git glib glut gmp gnokii gnutls gpm gps graphviz gsm hal hddtemp hou htmlhandbook iconv icu id3tag idn imagemagick imlib inotify ipv6 isdnlog jadetex java javascript jingle jpeg jpeg2k justify kde kdeenablefinal kdehiddenvisibility kerberos kig-scripting kipi kvm lame lcms ldap libcaca libclamav libgcrypt libnotify libsamplerate libssh2 libwww live lm_sensors lua lzma lzo mad maildir matroska mbrola metric midi mikmod mjpeg mmap mmx mmxext mng mp3 mp4 mplayer mppe-mppc mudflap multilib musepack musicbrainz mysql mythtv ncurses network nls nodrm nowin nptl nptlonly offensive ofx ogg openal openexr opengl openmp pam passwdqc pchpcre pdf perl phonon php physfs plasma plugins png policykit posix povray ppds pppd pth python qt qt3 qt3support qt4 quicktime rdesktop readline reflection reiserfs rss rtc ruby samba sasl schroedinger sdl semantic-desktop session slang sms sockets sou sound sox speex spell spl sqlitesqlite3 srtp sse sse2 ssl startup-notification subversion svg symlink sysfs syslog sysvipc tcpd theora threads thumbnail tidy tiff timidity truetype tunepimp unicode usb vhook videos visualization vnc voice vorbis webkit wifi wmf x264 xattr xcb xcomposite xine xml xml2 xmlrpc xmp xorgxpm xsl xulrunner xv xvid xvmc yahoo zeroconf zip zlib zvbi" ALSA_CARDS="bt87x via82xx" 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 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" LINGUAS="ro en eo" LIRC_DEVICES="kworld" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm armeb i386 x86_64" USERLAND="GNU" VIDEO_CARDS="radeon radeonhd vesa"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2009-08-16 16:37:36 UTC
*** Bug 281684 has been marked as a duplicate of this bug. ***
Comment 8 Tobias Klausmann (RETIRED) gentoo-dev 2009-08-29 15:42:13 UTC
Same problem with the test suite: broken for -jN where N>1
Comment 9 Jouni Rinne 2010-02-07 21:58:13 UTC
Same error with icu-4.2.1: it breaks with anything else than -j1
Comment 10 Andrew John Hughes 2010-03-02 23:44:59 UTC
Still present; just hit it again on ppc.
Comment 11 Enne Eziarc 2010-03-29 20:53:34 UTC
FYI, still happening with icu 4.4. I'm using MAKEOPTS="-j6 -l5" (distcc) and had to change it to -j1 to get this to compile.
Comment 12 Steven R. Loomis 2010-04-20 05:32:26 UTC
Please add upstream URL http://bugs.icu-project.org/trac/ticket/7628
Comment 13 Patrick Lauer gentoo-dev 2010-06-16 19:33:53 UTC
make[1]: Entering directory `/var/tmp/portage/dev-libs/icu-4.4.1/work/icu/source/extra'
make[1]: Making `check' in `uconv'
make[1]: Making `all' in `uconv'
make[2]: Entering directory `/var/tmp/portage/dev-libs/icu-4.4.1/work/icu/source/extra/uconv'
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH  MAKEFLAGS= ../../bin/pkgdata -p uconvmsg -O pkgdata.inc -m static -s uconvmsg -d uconvmsg -T uconvmsg uconvmsg/uconvmsg.lst
make[2]: Entering directory `/var/tmp/portage/dev-libs/icu-4.4.1/work/icu/source/extra/uconv'
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH  MAKEFLAGS= ../../bin/pkgdata -p uconvmsg -O pkgdata.inc -m static -s uconvmsg -d uconvmsg -T uconvmsg uconvmsg/uconvmsg.lst
pkgdata: i686-pc-linux-gnu-gcc -D_REENTRANT  -O2 -march=i686 -pipe -fno-strict-aliasing -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long  -c -I../../common -I../../common -DPIC -fPIC -o uconvmsg/uconvmsg_dat.o uconvmsg/uconvmsg_dat.s
pkgdata: i686-pc-linux-gnu-gcc -D_REENTRANT  -O2 -march=i686 -pipe -fno-strict-aliasing -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long  -c -I../../common -I../../common -DPIC -fPIC -o uconvmsg/uconvmsg_dat.o uconvmsg/uconvmsg_dat.s
pkgdata: i686-pc-linux-gnu-ar r uconvmsg/libuconvmsg.a uconvmsg/uconvmsg_dat.o
pkgdata: i686-pc-linux-gnu-ar r uconvmsg/libuconvmsg.a uconvmsg/uconvmsg_dat.o
pkgdata: i686-pc-linux-gnu-ranlib uconvmsg/libuconvmsg.a
pkgdata: i686-pc-linux-gnu-ranlib uconvmsg/libuconvmsg.a
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -fno-strict-aliasing -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -Wl,-O1  -o ../../bin/uconv uconv.o uwmsg.o -L../../lib -licui18n -L../../lib -licuuc -L../../lib -L../../stubdata -licudata -lpthread -ldl -lm   uconvmsg/libuconvmsg.a
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -fno-strict-aliasing -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -Wl,-O1  -o ../../bin/uconv uconv.o uwmsg.o -L../../lib -licui18n -L../../lib -licuuc -L../../lib -L../../stubdata -licudata -lpthread -ldl -lm   uconvmsg/libuconvmsg.a
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH  ./../../bin/uconv -f ibm-37 ./samples/ibm-37-test.txt
/bin/sh: ./../../bin/uconv: Text file busy
make[2]: *** [check-local] Error 126
make[2]: Leaving directory `/var/tmp/portage/dev-libs/icu-4.4.1/work/icu/source/extra/uconv'
make[1]: *** [check-recursive] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/dev-libs/icu-4.4.1/work/icu/source/extra/uconv'
Comment 14 Patrick Lauer gentoo-dev 2010-06-16 19:50:43 UTC
+  16 Jun 2010; Patrick Lauer <patrick@gentoo.org> icu-4.0.1.ebuild,
+  icu-4.2.1.ebuild, icu-4.4.1.ebuild:
+  Makefiles are parallel-unsafe, so adding -j1 until it is properly fixed.
+  See bug #272328
Comment 15 Arnaud Fleurentdidier Messaoudi 2010-07-15 13:16:09 UTC
Same issue. fixed thanks to your tips by modifying the make.conf file from -j5 to -j1
Thank you
Comment 16 Andrei Slavoiu 2010-08-13 08:37:26 UTC
(In reply to comment #14)
> +  16 Jun 2010; Patrick Lauer <patrick@gentoo.org> icu-4.0.1.ebuild,
> +  icu-4.2.1.ebuild, icu-4.4.1.ebuild:
> +  Makefiles are parallel-unsafe, so adding -j1 until it is properly fixed.
> +  See bug #272328
> 
I still get the error with icu-4.4.1. I had to add emake -j1 to src_compile() also to build it.
Comment 17 Sebastian Mueller 2010-11-08 11:45:00 UTC
have the same problem here with dev-libs/icu-4.4.2 (x86_64)

-j1 works, everything >1 does not work

solved by changing MAKEOPTS to -j1 in make.conf.

The new ebuild should be fixed as mentioned above

Thanks

Comment 18 basti 2011-01-17 23:26:44 UTC
The same failure in stable x86 with -j5, with -j1 there are no errors.
Comment 19 basti 2011-01-17 23:28:02 UTC
(In reply to comment #18)
> The same failure in stable x86 with -j5, with -j1 there are no errors.
> 
Sorry, forgot the version: dev-libs/icu-4.6
Comment 20 Steven R. Loomis 2011-01-17 23:44:03 UTC
Thanks.

In the upstream we've marked it as 'worksforme'. Apparently not for everyone, though. I added a note there…

(In reply to comment #19)
> (In reply to comment #18)
> > The same failure in stable x86 with -j5, with -j1 there are no errors.
> > 
> Sorry, forgot the version: dev-libs/icu-4.6
> 

Comment 21 Steven R. Loomis 2011-01-18 23:52:31 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > The same failure in stable x86 with -j5, with -j1 there are no errors.
> > 
> Sorry, forgot the version: dev-libs/icu-4.6

Basti is there a different build log? With 'MAKEOPTS='-j5'' or -j2 it builds for me on amd x86_64 just running 'emerge icu'.  I just grabbed the latest gentoo. Can you give further steps to reproduce?
Comment 22 basti 2011-01-19 08:58:46 UTC
(In reply to comment #21)
> Basti is there a different build log? With 'MAKEOPTS='-j5'' or -j2 it builds
> for me on amd x86_64 just running 'emerge icu'.  I just grabbed the latest
> gentoo. Can you give further steps to reproduce?
> 

:\ emerge -1 icu now works great for me. The error appeared as I was upgrading from icu-4.4.2 to 4.6. Now I can’t reproduce it at all, so you should forget about it:

root@laptop /home/bas89 :) # emerge -1 =dev-libs/icu-4.4.2

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild     UD] dev-libs/icu-4.4.2 [4.6]

>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-libs/icu-4.4.2
>>> Installing (1 of 1) dev-libs/icu-4.4.2
>>> Jobs: 1 of 1 complete                           Load avg: 3.35, 2.11, 1.36
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
root@laptop /home/bas89 :) # emerge -1 dev-libs/icu      

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild     U ] dev-libs/icu-4.6 [4.4.2]

>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-libs/icu-4.6
>>> Installing (1 of 1) dev-libs/icu-4.6
>>> Jobs: 1 of 1 complete                           Load avg: 2.75, 2.19, 1.51
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
Comment 23 Steven R. Loomis 2011-03-05 18:56:02 UTC
Upstream has been re-opened with a patch and steps to reproduce, just fyi.
Comment 24 N. Andrew Walsh 2011-04-25 23:30:43 UTC
same problem on 4.6.1: compiling with MAKEOPTS="-j5" fails, with -j1 it works fine.
Comment 25 J.Borme 2011-04-27 08:01:07 UTC
I also got this problem with the now-stable icu-4.6.1. I had to pass MAKEOPTS="-j1" to build.
Comment 26 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-04-27 18:51:17 UTC
Fixed in dev-libs/icu-4.6.1.