Parallel build issue

Bug #1857622 reported by Fabrice Fontaine
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Build randomly fails since December 2017 on buildroot (

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/

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


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:

        ln $(DESTDIR)$(bindir)/program$(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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers