emerge sys-fs/lvm2-2.02.45 fails with the message "ln: creating symbolic link `libdevmapper.so.1.02': File exists". The problem is that `ln -s` is executed twice, so the target file already exists the second time. Reproducible: Always Steps to Reproduce: 1. ACCEPT_KEYWORDS=~x86 2. emerge --oneshot lvm2 Actual Results: i686-pc-linux-gnu-gcc -shared -Wl,-soname,libdevmapper.so.1.02 \ -march=athlon-xp -Os -pipe -march=athlon-xp -Os -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 -march=athlon-xp -Os -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 -Wl,-O1 -Wl,--version-script,.export.sym -L../libdm -L../lib -L../daemons/dmeventd datastruct/bitset.o datastruct/hash.o datastruct/list.o libdm-common.o libdm-file.o libdm-deptree.o libdm-string.o libdm-report.o mm/dbg_malloc.o mm/pool.o regex/matcher.o regex/parse_rx.o regex/ttree.o ioctl/libdm-iface.o -lreadline -lrt -ldl -lncurses -o ioctl/libdevmapper.so i686-pc-linux-gnu-gcc -shared -Wl,-soname,libdevmapper.so.1.02 \ -march=athlon-xp -Os -pipe -march=athlon-xp -Os -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 -march=athlon-xp -Os -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 -Wl,-O1 -Wl,--version-script,.export.sym -L../libdm -L../lib -L../daemons/dmeventd datastruct/bitset.o datastruct/hash.o datastruct/list.o libdm-common.o libdm-file.o libdm-deptree.o libdm-string.o libdm-report.o mm/dbg_malloc.o mm/pool.o regex/matcher.o regex/parse_rx.o regex/ttree.o ioctl/libdm-iface.o -lreadline -lrt -ldl -lncurses -o ioctl/libdevmapper.so rm -f libdevmapper.so.1.02 rm -f libdevmapper.so.1.02 ln -s ioctl/libdevmapper.so libdevmapper.so.1.02 ln -s ioctl/libdevmapper.so libdevmapper.so.1.02 ln: creating symbolic link `libdevmapper.so.1.02': File exists rm -f libdevmapper.so make[1]: *** [libdevmapper.so.1.02] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-fs/lvm2-2.02.45/work/LVM2.2.02.45/libdm' make: *** [libdm.device-mapper] Error 2 make: *** Waiting for unfinished jobs.... ln -s ioctl/libdevmapper.so libdevmapper.so make[1]: Leaving directory `/var/tmp/portage/sys-fs/lvm2-2.02.45/work/LVM2.2.02.45/libdm' * * ERROR: sys-fs/lvm2-2.02.45 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2170: Called die * The specific snippet of code: * emake || die "compile problem" * The die message: * compile problem * * 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-fs/lvm2-2.02.45/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/lvm2-2.02.45/temp/environment'. * >>> Failed to emerge sys-fs/lvm2-2.02.45, Log file: >>> '/var/tmp/portage/sys-fs/lvm2-2.02.45/temp/build.log' * Messages for package sys-fs/lvm2-2.02.45: * * ERROR: sys-fs/lvm2-2.02.45 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2170: Called die * The specific snippet of code: * emake || die "compile problem" * The die message: * compile problem * * 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-fs/lvm2-2.02.45/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/lvm2-2.02.45/temp/environment'. * Expected Results: successful merge $ emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.27-gentoo-r8 i686) ================================================================= System uname: Linux-2.6.27-gentoo-r8-i686-AMD_Athlon-tm-_XP_rrsossor-with-glibc2.0 Timestamp of tree: Mon, 04 May 2009 14:45:01 +0000 distcc 3.0 i686-pc-linux-gnu [disabled] app-shells/bash: 4.0_p17-r1 dev-lang/python: 2.5.2-r7 dev-util/cmake: 2.6.2-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r2 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -Os -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=athlon-xp -Os -pipe" DISTDIR="/var/lib/portage/gentoo/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://gentoo.chem.wisc.edu/gentoo/" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/var/lib/portage/gentoo/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="/var/lib/portage/gentoo" PORTDIR_OVERLAY="/var/lib/portage/overlay" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acpi alsa bash-completion berkdb bitmap-fonts boundschecking browserplugin bzip2 caps cli cracklib css cups dbus doc dri dvdnav dvdread emacs ffmpeg flac foomaticdb gtk gtk2 htmlhandbook iconv imlib ipod isdnlog lame lm_sensors midi mmx mmxext mng mozilla moznopango mp4 mplayer mudflap musicbrainz mythtv ncurses nptl nptlonly nsplugin ooo-kde pam pcre pda pdf ppds pppd readline reflection rtc session smp sms spl sse ssl startup-notification sysfs tcpd threads truetype type1-fonts v4l v4l2 win32codecs x264 x86 xcomposite xorg xulrunner xvid xvmc yahoo 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 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="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 190350 [details] ebuild log
Please try again with MAKEOPTS="-j1".
I had this bug as well, but dunno how, at the second try it worked. (maybe i forced -j1 makeopts, can't remember.. :S)
I tried to reproduce this, no luck. juno ~ # MAKEOPTS="-j5" emerge lvm2 than tried it with -j2, still no error happened.
Did you emerge =sys-fs/lvm2-2.02.45 ? This failure doesn't happen with earlier versions.
Yes of course.
*** Bug 268355 has been marked as a duplicate of this bug. ***
I did a cheap workaround for the moment. agk: There's two parallel build problems with 2.02.45 that need nicer fixes in the next release. 1. Bad interaction in include/ because of the $(RM) that runs before the creation of new symlinks. Need to make sure that the find does not get run in parallel with itself. 2. libdm being multiple-built sometimes. For the moment, I just issue the parallel make individually in: include/, libdm/, and then the root of the package.
I have configured MAKEOPTS="-j2" in /etc/make.conf and got the same error while emerging. So I did the following: MAKEOPTS="-j1" emerge sys-fs/lvm2 ... and everything worked fine on my machine. Maybe this is a helpful information for robbat2.