package/ecryptfs-utils: fix parallel build
PATCH v3 1/1 package/ecryptfs-utils: fix parallel build
Build randomly fails since December 2017 on:
make[5]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/ecryptfs-utils-111/src/utils'
/bin/mkdir -p '/home/buildroot/autobuild/instance-2/output-1/target/sbin'
/bin/bash ../../libtool --mode=install /usr/bin/install -c mount.ecryptfs umount.ecryptfs mount.ecryptfs_private '/home/buildroot/autobuild/instance-2/output-1/target/sbin'
libtool: install: /usr/bin/install -c mount.ecryptfs /home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs /usr/bin/install: cannot create regular file '/home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs': File exists Makefile:832: recipe for target 'install-rootsbinPROGRAMS' failed
make[5]: *** [install-rootsbinPROGRAMS] Error 1
Fixes:
- http://autobuild.buildroot.org/results/2063bd18830ef02dca0bed889c43639009bc688e
---
Changes v2 -> v3 (after review of Thomas Petazzoni):
- Update Makefile.in instead of Makefile.am to avoid running autoreconf which depends on AM_GLIB_GNU_GETTEXT
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Fix parallel build issue instead of disabling it
.../0003-fix-parallel-build-issue.patch | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 package/ecryptfs-utils/0003-fix-parallel-build-issue.patch
package/ecryptfs-utils/0003-fix-parallel-build-issue.patch new file +61 -0
@@ -0,0 +1,61 @@ +fix parallel build issue + +Build randomly fails since December 2017 on buildroot +(http://autobuild.buildroot.org/?reason=ecryptfs-utils-111): + +make[5]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/ecryptfs-utils-111/src/utils' + /bin/mkdir -p '/home/buildroot/autobuild/instance-2/output-1/target/sbin' + /bin/bash ../../libtool --mode=install /usr/bin/install -c mount.ecryptfs umount.ecryptfs mount.ecryptfs_private '/home/buildroot/autobuild/instance-2/output-1/target/sbin' +libtool: install: /usr/bin/install -c mount.ecryptfs /home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs +/usr/bin/install: cannot create regular file '/home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs': File exists +Makefile:832: recipe for target 'install-rootsbinPROGRAMS' failed +make[5]: *** [install-rootsbinPROGRAMS] Error 1 + +As spotted by Thomas Petazzoni, build failure happens because of the +following line in src/utils/Makefile.am: + +install-exec-hook: install-rootsbinPROGRAMS + -rm -f "$(DESTDIR)/$(rootsbindir)/umount.ecryptfs_private" + $(LN_S) "mount.ecryptfs_private" "$(DESTDIR)/$(rootsbindir)/umount.ecryptfs_private" + +The install-exec-hook target should not have a dependency on +install-rootsbinPROGRAMS. + +From https://www.gnu.org/software/automake/manual/html_node/Extending.html#Extending: + +""" +In contrast, some rules also have a way to run another rule, called a +hook; hooks are always executed after the main rule?s work is done. The +hook is named after the principal target, with ?-hook? appended. The +targets allowing hooks are install-data, install-exec, uninstall, dist, +and distcheck. + +For instance, here is how to create a hard link to an installed program: + +install-exec-hook: + ln $(DESTDIR)$(bindir)/program$(EXEEXT) \ + $(DESTDIR)$(bindir)/proglink$(EXEEXT) + +""" + +So, they explicitly say that these hooks are run after the main rule +work is done, which means the dependency on install-rootsbinPROGRAMS is +not needed. And the example they use to illustrate is *exactly* the +situation of ecryptfs-utils: creating a link to a program that was +installed. + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://bugs.launchpad.net/ecryptfs/+bug/1857622] + +diff -Nuar ecryptfs-utils-111-orig/src/utils/Makefile.in ecryptfs-utils-111/src/utils/Makefile.in +--- ecryptfs-utils-111-orig/src/utils/Makefile.in 2019-12-26 15:14:16.656146065 +0100 ++++ ecryptfs-utils-111/src/utils/Makefile.in 2019-12-26 17:36:07.108496164 +0100 +@@ -1522,7 +1522,7 @@ + .PRECIOUS: Makefile + + +-install-exec-hook: install-rootsbinPROGRAMS ++install-exec-hook: + -rm -f "$(DESTDIR)/$(rootsbindir)/umount.ecryptfs_private" + $(LN_S) "mount.ecryptfs_private" "$(DESTDIR)/$(rootsbindir)/umount.ecryptfs_private" +
Signature · 1 line
2.24.0
Thomas Petazzoni
AppliedPATCH v3 1/1 package/ecryptfs-utils: fix parallel build
Quoted 10 lines · On Thu, 26 Dec 2019 17:47:48 +0100 Fabrice Fontaine…
Build randomly fails since December 2017 on:
make[5]: Entering directory '
/home/buildroot/autobuild/instance-2/output-1/build/ecryptfs-utils-111/src/utils'
/bin/mkdir-p '/home/buildroot/autobuild/instance-2/output-1/target/sbin'
/bin/bash../../libtool --mode=install/usr/bin/install-c mount.ecryptfs umount.ecryptfs mount.ecryptfs_private '/home/buildroot/autobuild/instance-2/output-1/target/sbin'
libtool: install:/usr/bin/install-c mount.ecryptfs/home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs/usr/bin/install: cannot create regular file '/home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs': File exists Makefile:832: recipe for target 'install-rootsbinPROGRAMS' failed
make[5]: *** [install-rootsbinPROGRAMS] Error 1
Quoted 8 lines
Fixes:
- http://autobuild.buildroot.org/results/2063bd18830ef02dca0bed889c43639009bc688eSigned-off-by Fabrice Fontaine <[email protected]>---
Changes v2 -> v3 (after review of Thomas Petazzoni):
- Update Makefile.in instead of Makefile.am to avoid running autoreconf which depends onAM_GLIB_GNU_GETTEXT
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 1/1 package/ecryptfs-utils: fix parallel build
In reply to Fabrice FontaineQuoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Build randomly fails since December 2017 on:
make[5]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/ecryptfs-utils-111/src/utils'
/bin/mkdir-p '/home/buildroot/autobuild/instance-2/output-1/target/sbin'
/bin/bash../../libtool --mode=install/usr/bin/install-c mount.ecryptfs umount.ecryptfs mount.ecryptfs_private '/home/buildroot/autobuild/instance-2/output-1/target/sbin'
libtool: install:/usr/bin/install-c mount.ecryptfs/home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs/usr/bin/install: cannot create regular file '/home/buildroot/autobuild/instance-2/output-1/target/sbin/mount.ecryptfs': File exists Makefile:832: recipe for target 'install-rootsbinPROGRAMS' failed
make[5]: *** [install-rootsbinPROGRAMS] Error 1
Quoted 8 lines
Fixes:
- http://autobuild.buildroot.org/results/2063bd18830ef02dca0bed889c43639009bc688eSigned-off-by Fabrice Fontaine <[email protected]>---
Changes v2 -> v3 (after review of Thomas Petazzoni):
- Update Makefile.in instead of Makefile.am to avoid running autoreconf which depends onAM_GLIB_GNU_GETTEXT
Committed to 2019.02.x and 2019.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard