Skip to content

Install fails on Windows

When I do sh validate I get

for i in utils/hp2ps/dist/build/tmp/hp2ps.exe driver/ghci/dist/build/tmp/ghci.exe driver/ghci/dist/build/tmp/ghci-6.13.20091007.exe driver/ghc/dist/build/tmp/ghc-6.13.20091007 utils/haddock/dist/build/tmp/haddock.exe utils/hsc2hs/dist-install/build/tmp/hsc2hs.exe utils/ghc-pkg/dist-install/build/tmp/ghc-pkg utils/hpc/dist/build/tmp/hpc.exe utils/runghc/dist/build/tmp/runghc.exe ghc/stage2/build/tmp/ghc-stage2.exe; do \
		/usr/bin/install -c -m 755  $i /c/code/HEAD/inst/bin ;  \
                if test "" = "1"; then \
                   sh mk/fix_install_names.sh /c/code/HEAD/inst/lib /c/code/HEAD/inst/bin/$i ; \
                fi ; \
	done
"cp" /c/code/HEAD/inst/bin/runghc.exe /c/code/HEAD/inst/bin/runhaskell.exe
"rm" -f /c/code/HEAD/inst/bin/ghc.exe
"mv" -f /c/code/HEAD/inst/bin/ghc-stage2.exe /c/code/HEAD/inst/bin/ghc.exe
"cp" -Rp inplace/mingw /c/code/HEAD/inst
c:/code/HEAD/inplace/mingw/bin/gcc.exe -E  -undef -traditional -P -DINSTALLING -DLIB_DIR='"$topdir"' -DINCLUDE_DIR='"$topdir/include"'  -x c -Iincludes libffi/package.conf.in | grep -v '^#pragma GCC' | sed -e 's/""//g' -e 's/:[ 	]*,/: /g' >libffi/package.conf.install
c:/code/HEAD/inplace/mingw/bin/gcc.exe -E  -undef -traditional -P -DINSTALLING -DLIB_DIR='"$topdir"' -DINCLUDE_DIR='"$topdir/include"' -DPAPI_INCLUDE_DIR="" -DPAPI_LIB_DIR="" -DHAVE_LIBMINGWEX -x c -Iincludes rts/package.conf.in | grep -v '^#pragma GCC' | sed -e 's/""//g' -e 's/:[ 	]*,/: /g' >rts/package.conf.install
/usr/bin/install -c -m 755 -d /c/code/HEAD/inst/lib
for i in ; do \
		/usr/bin/install -c -m 755  $i /c/code/HEAD/inst/lib; \
	done
/bin/sh: -c: line 1: syntax error near unexpected token `;'
/bin/sh: -c: line 1: `for i in ; do \'
make[1]: *** [install_libexecs] Error 2
make: *** [install] Error 2

Turns out that INSTALL_LIBEXECS is empty:

sh-2.04$ make show VALUE=INSTALL_LIBEXECS
make -r --no-print-directory -f ghc.mk show
INSTALL_LIBEXECS=""

Simon did a patch on ghc.mk for this

sh-2.04$ darcs what ghc.mk
What's new in "ghc.mk":

hunk ./ghc.mk 756
+ifneq "$(INSTALL_LIBEXECS)" ""
hunk ./ghc.mk 760
+endif

But then something similar happens later:

Registering dph-prim-interface-0.4.0...
Installing library in c:/code/HEAD/inst/lib\dph-prim-seq-0.4.0
Registering dph-prim-seq-0.4.0...
Installing library in c:/code/HEAD/inst/lib\dph-prim-par-0.4.0
Registering dph-prim-par-0.4.0...
Installing library in c:/code/HEAD/inst/lib\dph-seq-0.4.0
Registering dph-seq-0.4.0...
Installing library in c:/code/HEAD/inst/lib\dph-par-0.4.0
Registering dph-par-0.4.0...
/c/code/HEAD/inst/bin/ghc-pkg.exe --global-conf /c/code/HEAD/inst/lib/package.conf.d hide binary && true
"inplace/bin/ghc-cabal.exe" install \
		 /c/code/HEAD/inst/bin/ghc.exe \
	 	 /c/code/HEAD/inst/bin/ghc-pkg.exe \
		 /c/code/HEAD/inst/lib \
		 compiler stage2 \
		 '' '/c/code/HEAD/inst' '/c/code/HEAD/inst/lib' '/c/code/HEAD/inst/doc/html/libraries' \
		 YES
Installing library in c:/code/HEAD/inst/lib\ghc-6.13.20091007
Registering ghc-6.13.20091007...
/usr/bin/install -c -m 755 -d /c/code/HEAD/inst/lib
for i in driver/ghc-usage.txt driver/ghci-usage.txt libffi/libHSffi.a libffi/HSffi.o extra-gcc-opts; do \
		case $i in \
		  *.a) \
		    /usr/bin/install -c -m 644  $i /c/code/HEAD/inst/lib; \
		    : /c/code/HEAD/inst/lib/`basename $i` ;; \
		  *.dll) \
		    /usr/bin/install -c -m 644 -s  $i /c/code/HEAD/inst/lib ;; \
		  *.so) \
		    /usr/bin/install -c -m 755  $i /c/code/HEAD/inst/lib ;; \
		  *.dylib) \
		    /usr/bin/install -c -m 755  $i /c/code/HEAD/inst/lib; \
		    install_name_tool -id /c/code/HEAD/inst/lib/`basename $i` /c/code/HEAD/inst/lib/`basename $i` ;; \
		  *) \
		    /usr/bin/install -c -m 644  $i /c/code/HEAD/inst/lib; \
		esac; \
	done
/usr/bin/install -c -m 755 -d /c/code/HEAD/inst/lib/include
for i in libffi/ffi.h; do \
		/usr/bin/install -c -m 644  $i /c/code/HEAD/inst/lib/include; \
	done
/usr/bin/install -c -m 755 -d /c/code/HEAD/inst/lib
for i in ; do \
		/usr/bin/install -c -m 755  $i /c/code/HEAD/inst/lib; \
	done
/bin/sh: -c: line 1: syntax error near unexpected token `;'
/bin/sh: -c: line 1: `for i in ; do \'
make[1]: *** [install_libexec_scripts] Error 2
make: *** [install] Error 2

I give up. Ian, can you fix this please? I'll discard Simon's patch... it's not even clear to me that INSTALL_LIBEXECS should ever be empty.

Simon

Trac metadata
Trac field Value
Version 6.10.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
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