Skip to content

build broken in libffi/ when `install-sh` is used

If the /usr/bin/install tool is missing or not deemed usable by Autoconf, install-sh is used.

However, GHC's build then fails with

...
===--- building final phase
make --no-print-directory -f ghc.mk phase=final all
rts/ghc.mk:543: rts/dist/build/.depend-v-dyn-l-debug-thr-thr_debug-thr_l-debug_dyn-thr_dyn-thr_debug_dyn-l_dyn-thr_l_dyn.c_asm: No such file or directory
compiler/ghc.mk:661: compiler/stage2/build/.depend-v-dyn.haskell: No such file or directory
make -C libffi/build MAKEFLAGS= install
MAKE x86_64-unknown-linux-gnu : 0 * install
make[3]: Entering directory '/home/hvr/Haskell/GHC/ghc/libffi/build/x86_64-unknown-linux-gnu'
Making install in include
make[4]: Entering directory '/home/hvr/Haskell/GHC/ghc/libffi/build/x86_64-unknown-linux-gnu/include'
make[5]: Entering directory '/home/hvr/Haskell/GHC/ghc/libffi/build/x86_64-unknown-linux-gnu/include'
make[5]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/home/hvr/Haskell/GHC/ghc/libffi/build/inst/lib/libffi-3.1/include'
 ../install-sh -c -m 644 ffi.h ffitarget.h '/home/hvr/Haskell/GHC/ghc/libffi/build/inst/lib/libffi-3.1/include'
/bin/bash: line 11: ../install-sh: No such file or directory
Makefile:361: recipe for target 'install-nodist_includesHEADERS' failed
make[5]: *** [install-nodist_includesHEADERS] Error 127
make[5]: Leaving directory '/home/hvr/Haskell/GHC/ghc/libffi/build/x86_64-unknown-linux-gnu/include'
Makefile:477: recipe for target 'install-am' failed
make[4]: *** [install-am] Error 2
make[4]: Leaving directory '/home/hvr/Haskell/GHC/ghc/libffi/build/x86_64-unknown-linux-gnu/include'
Makefile:1577: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory '/home/hvr/Haskell/GHC/ghc/libffi/build/x86_64-unknown-linux-gnu'
Makefile:3095: recipe for target 'install' failed
make[2]: *** [install] Error 2
libffi/ghc.mk:116: recipe for target 'libffi/stamp.ffi.static-shared.install' failed
make[1]: *** [libffi/stamp.ffi.static-shared.install] Error 2
Makefile:121: recipe for target 'all' failed
make: *** [all] Error 2

This can be easily simulated on Linux by temporarily renaming /usr/bin/install

Trac metadata
Trac field Value
Version 7.10.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information