package.mnono: fix install with parallel builds
PATCH 1/1 package.mnono: fix install with parallel builds
Due to a race in the 'install' utility, installing the same file twice in parallel often results in one of the install calls to fail.
Ensure proper ordering of conflicting rules.
Fixes:
http://autobuild.buildroot.org/results/c32/c3288c5d1fb94474f14a4a889e76135878d403bc/ http://autobuild.buildroot.org/results/f70/f708e89f613ec0b42cdf49ccbef39b02f4a271fb/ http://autobuild.buildroot.org/results/3cb/3cb99e5c5672cbaa2a86020129a05dfde47cdb8f/ ...
--- package/mono/0003-fix-parallel-install.patch | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/mono/0003-fix-parallel-install.patch
package/mono/0003-fix-parallel-install.patch new file +40 -0
@@ -0,0 +1,40 @@ +mcs: fix installation with parallel make + +In mcs/ the install of xbuild_12 and xbuild_14 will end-up installing +the same files: + ${NETFRAMEWORK_DIR}/v2.0/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v3.0/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v3.5/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.0/Profile/Client/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.0/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.5.1/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.5/RedistList/FrameworkList.xml + +This is because there is no atomicity when installing each file, and +xbuild_12 and xbuild_14 may well run in parallel, each trying to install +each of those files; but the 'install' utility will first check if the +target file exists or not, and behaves differently if it does than if it +does not, thus leading to build failures like so: + http://autobuild.buildroot.org/results/c32/c3288c5d1fb94474f14a4a889e76135878d403bc/build-end.log + +So, ensure ordering of the install of xbuild_12 and xbuild_14 (the +ordering is completely arbitrary, either way gives the same installed +files). + +Signed-off-by: "Yann E. MORIN" <[email protected]> +Cc: Angelo Compagnucci <[email protected]> + +diff -durN host-mono-4.0.0.orig/mcs/Makefile host-mono-4.0.0/mcs/Makefile +--- host-mono-4.0.0.orig/mcs/Makefile 2015-04-09 16:55:53.000000000 +0200 ++++ host-mono-4.0.0/mcs/Makefile 2015-05-16 17:25:44.475542483 +0200 +@@ -43,6 +43,10 @@ + profile-do--%: + $(MAKE) PROFILE=$(subst --, ,$*) + ++# xbuild_12 and xbuild_14 will try to install the same files, so they need ++# to be ordered ++profile-do--xbuild_14--install: profile-do--xbuild_12--install ++ + # We don't want to run the tests in parallel. We want behaviour like -k. + profiles-do--run-test: + ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret
Signature · 1 line
1.9.1
PATCH 1/1 package.mnono: fix install with parallel builds
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Due to a race in the 'install' utility, installing the same file twice in parallel often results in one of the install calls to fail.
Ensure proper ordering of conflicting rules.
Committed with the typo in $SUBJECT fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package.mnono: fix install with parallel builds
Dear Yann E. MORIN
2015-05-16 23:29 GMT+02:00 Peter Korsgaard <[email protected]>:
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Due to a race in the 'install' utility, installing the same file twice in parallel often results in one of the install calls to fail.
Ensure proper ordering of conflicting rules.
Committed with the typo in $SUBJECT fixed, thanks.
A big thank you for fixing this nasty bug, I really haven't no time to investigate deeply. A really and appreciated big thank you!
Sincerely, Angelo
Quoted 7 lines
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo