samba does not build with multitasking enabled (make -j -l3), but builds ok with make -j1 reproducible: always steps to reproduce: 1) use >=4-processsor computer (mine is 4-proc 3GGz Pentium) 2) in /etc/make.conf set MAKE_OPTS="-j -l3", //don't know if -j alone will trigger the bug USE flags +kernel_linux +python +readline -all the rest samba knows about 3) emerge =net-fs/samba-3.0.33 Expected result: successful build Actual result: random failure (looks like bin/ directory not created) on 1st attempt /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file bin/script.so: No such file or directory on 2nd attempt /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file bin/script.so: No such file or directory /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file bin/expand_msdfs.so: No such file or directory
Created attachment 181119 [details] emerge --info, two failed build logs, one successful build log
No progress on this bug? I have the same results. Building plugin bin/script.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file bin/script.so: No such file or directory collect2: ld returned 1 exit status make: *** [bin/script.so] Error 1 This is on a dual-core machine under amd64 with: MAKEOPTS="-j -l3" USE="acl async cups fam oav pam python readline swat syslog winbind" But with MAKEOPTS="-j1" it builds fine.
This is a known issue, samba is not a friend of parallel make, make starts linking before all dependencies are met, just watch bugs: https://bugzilla.samba.org/show_bug.cgi?id=3322 https://bugzilla.samba.org/show_bug.cgi?id=6278 A workaround is to limit the number of jobs, such as MAKEOPTS="-j13 -l3" or MAKEOPTS="-j2 -l3" instead of MAKEOPTS="-j -l3" This way it builds fine using multiple specified jobs
+ 28 Jun 2009; Patrick Lauer <patrick@gentoo.org> samba-3.0.35.ebuild, + samba-3.2.13-r2.ebuild: + Nailing makeopts down to -j1. Samba upstream doesn't care, there are + spurious failures. Fixes #257861 That should fix it.