Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 395403 - dev-lang/R-2.14.x broken parallel make
Summary: dev-lang/R-2.14.x broken parallel make
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
: 401279 407409 420967 430438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-20 19:50 UTC by Steven Trogdon
Modified: 2013-01-29 18:35 UTC (History)
11 users (show)

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


Attachments
patch allow Recommended packages to build on amd64 (R-2.14.0-lazyload_parallel.patch,982 bytes, patch)
2011-12-20 19:53 UTC, Steven Trogdon
Details | Diff
log of failed build of R-2.14.0 (R-2.14.0.log.bz2,18.81 KB, text/plain)
2011-12-20 19:54 UTC, Steven Trogdon
Details
log of successful build of R-2.14.0 with the attached patch (R-2.14.0.patched.log.bz2,21.72 KB, application/x-bzip)
2011-12-20 19:56 UTC, Steven Trogdon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Trogdon 2011-12-20 19:50:56 UTC
Parallel build of dev-lang/R-2.14.0 is broken on amd64 - most of the time. Occasionally the build will succeed and I've not been able to get the build to fail on x86. The failure seems to be associated with building the "Recommended" package DB provided with R. These packages are lazy loaded and the DB for each package has its own Makefile. From the build log the failure seems to be associated with:

make[4]: Entering directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD'
( cd Lib ; make )
make[4]: Entering directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD'
( cd Lib ; make clean )
make[5]: Entering directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD/Lib'
x86_64-pc-
../Core/cholmod_aat.c -o cholmod_aat.o
x86_64-pc-
../Core/cholmod_add.c -o cholmod_add.o
make[5]: Entering directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD/Lib'
x86_64-pc-
../Core/cholmod_band.c -o cholmod_band.o
make[5]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD/Lib'
make[4]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD'

which results in the failure:

make[5]: *** [../../CHOLMOD.a] Error 1
make[5]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD/Lib'
make[4]: *** [library] Error 2
make[4]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD'
make[3]: *** [sublibraries] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src'
ERROR: compilation failed for package Matrix
* removing /var/tmp/portage/dev-lang/R-2.14.0/work/R-2.14.0/library/Matrix
make[2]: *** [Matrix.ts] Error 1

The log of the failed build will be attached. I've also attached a patch that seems to allow building of these "Recommended" packages in a more "orderly" fashion. The patch may cover up something more subtle but, when applied, R does build. The log of the patched/successful build will also be attached.


Reproducible: Sometimes

Steps to Reproduce:
1.emerge =dev-lang/R-2.14.0
2.
3.



My emerge --info dev-lang/R:


Portage 2.1.10.11 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 2.6.39-gentoo-r3 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_2216-with-gentoo-2.0.3
Timestamp of tree: Mon, 12 Dec 2011 03:45:01 +0000
ccache version 3.1.6 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.5.4-r4, 2.6.6-r2, 2.7.2-r3::sage-on-gentoo, 3.1.4-r3
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.1.2, 4.3.4, 4.4.5, 4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo desktop-effects science sunrise x11 sage-on-gentoo bicatali local-overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA googleearth AdobeFlash-10 AdobeFlash-10.1 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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"
CXXFLAGS="-march=opteron -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles fixpackages multilib-strict news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--delete-after --timeout=500"
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="/var/lib/layman/desktop-effects /var/lib/layman/science /var/lib/layman/sunrise /var/lib/layman/x11 /var/lib/layman/sage-on-gentoo /var/lib/layman/bicatali /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d a52 aac aalib acl acpi alsa amd64 apache2 audiofile bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gphoto2 gpm gstreamer gtk iconv ieee1394 imlib ipv6 java jpeg lcms ldap lesstif libnotify lm_sensors mad midi mmx mng modules motif mozilla mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pango pcre pdf png policykit ppds pppd qt3support qt4 radius readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcl tcpd tiff tk truetype udev unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid 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 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev vesa vga nv" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

=================================================================
                        Package Settings
=================================================================

dev-lang/R-2.14.0 was built with the following:
USE="X bash-completion cairo java jpeg (multilib) nls openmp png readline tk -doc -lapack -minimal -perl -profile -static-libs"
Comment 1 Steven Trogdon 2011-12-20 19:53:03 UTC
Created attachment 296473 [details, diff]
patch allow Recommended packages to build on amd64
Comment 2 Steven Trogdon 2011-12-20 19:54:44 UTC
Created attachment 296477 [details]
log of failed build of R-2.14.0
Comment 3 Steven Trogdon 2011-12-20 19:56:00 UTC
Created attachment 296479 [details]
log of successful build of R-2.14.0 with the attached patch
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-20 20:24:39 UTC
Comment on attachment 296473 [details, diff]
patch allow Recommended packages to build on amd64

If you're going to fix make files, then why don't you fix them properly (by setting proper prerequisites)?
Comment 5 Steven Trogdon 2011-12-20 20:29:42 UTC
I see I missed one important first line when I listed the failure. Here it is again with the missing line:

ar: cholmod_aat.o: No such file or directory
make[5]: *** [../../CHOLMOD.a] Error 1
make[5]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD/Lib'
make[4]: *** [library] Error 2
make[4]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src/CHOLMOD'
make[3]: *** [sublibraries] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-lang/R-2.14.0/temp/RtmpdTJrs4/R.INSTALL6ecfe941/Matrix/src'
ERROR: compilation failed for package Matrix
* removing /var/tmp/portage/dev-lang/R-2.14.0/work/R-2.14.0/library/Matrix
make[2]: *** [Matrix.ts] Error 1
Comment 6 Sébastien Fabbro (RETIRED) gentoo-dev 2012-01-02 20:11:01 UTC
I can confirm, although it only happened once in some 10 builds. It looks like a race condition between the objects and the library archive, but I can not find the problem on the CHOLMOD Makefile of the Matrix tar ball included in the R package.

Could you report upstream [1]?

Thanks.

[1] http://r-forge.r-project.org/projects/matrix/
Comment 8 Steven Trogdon 2012-01-11 00:58:14 UTC
R-2.14.0 is now out of the main tree and has been replace with R-2.14.1. This version of R still occasionally fails to build on 64bit machines with the same race condition. This has also been reported upstream.
Comment 9 Trevor Bowen 2012-01-24 17:52:06 UTC
I also experienced the same race condition, while emerging dev-lang/R-2.14.1 today.  However, by temporarily modifying /etc/make.conf to:

MAKEOPTS="-j1"

I was able to emerge dev-lang/R successfully and workaround the problem.  Afterward, I reverted back to a more efficient value (-j12, in my case, FWIW).
Comment 10 Sébastien Fabbro (RETIRED) gentoo-dev 2012-01-30 15:26:15 UTC
*** Bug 401279 has been marked as a duplicate of this bug. ***
Comment 11 Sébastien Fabbro (RETIRED) gentoo-dev 2012-03-08 16:36:10 UTC
*** Bug 407409 has been marked as a duplicate of this bug. ***
Comment 12 Norman Back 2012-04-02 06:04:52 UTC
This issue still exists with dev-lang/R-2.15.0.
Emerge fails with MAKEOPTS="-j12 --load-average=15.2" but is OK with 
MAKEOPTS="-j1" in /etc/make.conf
Comment 13 Robert Cabrera 2012-04-14 17:45:47 UTC
I too can confirm this issue on my ~amd64 laptop. The build fails with anything other than MAKEOPTS="-j1".
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2012-06-13 14:50:32 UTC
*** Bug 420967 has been marked as a duplicate of this bug. ***
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-08 23:54:38 UTC
*** Bug 430438 has been marked as a duplicate of this bug. ***
Comment 16 Steven Trogdon 2012-09-03 17:34:46 UTC
Upstream has commented:

https://r-forge.r-project.org/tracker/index.php?func=detail&aid=1723&group_id=61&atid=294

They have not seen the failure and before attempting to fix things they need to verify the failure for a version of Matrix >=1.0-9. Presently R-2.15.1, which occasionally presents the failure, comes shipped with Matrix_1.0-6. So one can guess when this will be resolved?
Comment 17 Eric Grüttefien 2012-10-08 10:43:03 UTC
This issue still exists with dev-lang/R-2.15.1
Comment 18 Ben Kohler gentoo-dev 2012-12-07 18:59:37 UTC
Is it time to force -j1 via the ebuild yet? Upstream doesn't seem to be making progress on this, and it's getting in the way of default kde-meta installs (on ~arch only, of course).
Comment 19 Steven Trogdon 2012-12-07 19:29:19 UTC
Every parallel failure I've seen is associated with building the "Recommended" packages. I could be wrong here. But if this is correct it seems to me that disabling the building of those packages in parallel will solve the issue. An attempt was made to do this previously. Of course building the entire package with MAKEOPTS="-j1" will work as well, but may be overkill.
Comment 20 Patrick Lauer gentoo-dev 2013-01-08 07:37:23 UTC
I just hit this failure too. Bug has been open for over a year - please force MAKEOPTS in the ebuild until upstream figures it out properly :)
Comment 21 Sébastien Fabbro (RETIRED) gentoo-dev 2013-01-29 18:35:38 UTC
there was a race condition between a clean target and the build target in the Makevars file of the Matrix recommended package. this was especially true for high number of jobs. since the Matrix package is a tar ball within the R tar ball, I pushed a new R-2.15.2 tar ball on the gentoo mirrors.

for completeness, the fix is the following:

--- src/Makevars	(revision 2863)
+++ src/Makevars	(working copy)
@@ -23,7 +23,7 @@
 ## INSTALL only cleans src/*.o src/*$(SHLIB_EXT) for each arch
 sublibs: subclean sublibraries
 
-sublibraries:
+sublibraries: subclean
 	@for d in $(SUBDIRS); do \
 	  (cd $${d} && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" MkInclude="$(MkInclude)" $(MAKE) library) || exit 1; \



hopefully the issue should be fixed. re-open if not. 


+  29 Jan 2013; Sébastien Fabbro <bicatali@gentoo.org> R-2.15.2-r1.ebuild:
+  Fixed bash completion spaces (bug #417951, thanks Marco Poletti) and parallel
+  build (bug #395403)
+