'make install' fails on Samba 4.10! + install /builddir/build/BUILDROOT/samba-4.10.0-4.fc30.x86_64/usr/lib64/python3.7/site-packages/samba/dcerpc/idmap.cpython-37m-x86_64-linux-gnu.so (from bin/default/source4/librpc/python-idmap.inst.cpython-37m-x86_64-linux-gnu.so) + install /builddir/build/BUILDROOT/samba-4.10.0-4.fc30.x86_64/usr/lib64/python3.7/site-packages/samba/dcerpc/idmap.cpython-37m-x86_64-linux-gnu.so (from bin/default/source4/librpc/python-dcerpc-idmap.inst.cpython-37m-x86_64-linux-gnu.so) Waf: Leaving directory `/builddir/build/BUILD/samba-4.10.0/bin/default' BUILDSTDERR: Build failed BUILDSTDERR: Traceback (most recent call last): BUILDSTDERR: File "/builddir/build/BUILD/samba-4.10.0/third_party/waf/waflib/Build.py", line 1162, in do_install BUILDSTDERR: self.copy_fun(src, tgt) BUILDSTDERR: File "/builddir/build/BUILD/samba-4.10.0/third_party/waf/waflib/Build.py", line 1066, in copy_fun BUILDSTDERR: shutil.copy2(src, tgt) BUILDSTDERR: File "/usr/lib64/python3.7/shutil.py", line 264, in copy2 BUILDSTDERR: copystat(src, dst, follow_symlinks=follow_symlinks) BUILDSTDERR: File "/usr/lib64/python3.7/shutil.py", line 205, in copystat BUILDSTDERR: follow_symlinks=follow) BUILDSTDERR: FileNotFoundError: [Errno 2] No such file or directory BUILDSTDERR: During handling of the above exception, another exception occurred: BUILDSTDERR: Traceback (most recent call last): BUILDSTDERR: File "/builddir/build/BUILD/samba-4.10.0/third_party/waf/waflib/Task.py", line 320, in process BUILDSTDERR: ret = self.run() BUILDSTDERR: File "/builddir/build/BUILD/samba-4.10.0/third_party/waf/waflib/Build.py", line 1101, in run BUILDSTDERR: fun(x.abspath(), y.abspath(), x.path_from(launch_node)) BUILDSTDERR: File "/builddir/build/BUILD/samba-4.10.0/third_party/waf/waflib/Build.py", line 1168, in do_install BUILDSTDERR: raise Errors.WafError('Could not install the file %r' % tgt, e) BUILDSTDERR: waflib.Errors.WafError: Could not install the file '/builddir/build/BUILDROOT/samba-4.10.0-4.fc30.x86_64/usr/lib64/python3.7/site-packages/samba/dcerpc/idmap.cpython-37m-x86_64-linux-gnu.so' BUILDSTDERR: make: *** [Makefile:10: install] Error 1 BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.FBqF0W (%install) BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.FBqF0W (%install) Patch will follow.
Created attachment 14957 [details] patch for 4.10
Created attachment 14958 [details] patch for 4.9
Created attachment 14959 [details] patch for 4.8
Karolin, please apply the patches to the relevant branches. Thanks!
For those interested in the root cause, the bug is due to a combination of factors: - two different waf subsystems defined the same installable target - WAF install method uses shutil.copy2() Python method. This method copies a file and then copies attributes of the file. The copying process is done in Python and may take time - WAF 2.x paralleled execution of install methods On x86_64 in Fedora build system we generally get faster machines with more CPU resources available. It looks like two of these parallel installation jobs overlapped -- while one copied the file, the other one started to override the file. As result, a code that tried to run os.utime() against the destination path appeared in a situation when previously copied file was being overwritten by the parallel job and looked as not-existing one to this job. As result, os.utime() threw FileNotFoundError exception and broke.
(In reply to Alexander Bokovoy from comment #5) Wow! Nice debugging!
So, avoid passing '-j' to make install would also avoid the problem and only produce a warning, correct?
(In reply to Stefan Metzmacher from comment #7) > So, avoid passing '-j' to make install would also avoid the problem and > only produce a warning, correct? Yes, that would be a workaround, at an expense of a slower build. I think a better solution would be to add a WAF check to make sure there are no overlapping output destination targets.
(In reply to Alexander Bokovoy from comment #8) Pushed to autobuild-v4-{10,9,8}-test.
(In reply to Karolin Seeger from comment #9) Pushed to all branches. Closing out bug report. Thanks!