make binary-dist fails on OpenBSD when building from "tag: ghc-9.2.2-release"
Summary
I followed the instructions to build master on OpenBSD here
then ran gmake binary-dist
and it failed.
gmake --no-print-directory -f ghc.mk unix-binary-dist-prep
"rm" -rf bindistprep/
"inplace/bin/mkdirhier" bindistprep/ghc-9.2.2
set -e; for i in packages LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile m4 aclocal.m4 config.sub config.guess install-sh llvm-targets llvm-passes ghc.m
k inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$i bindistprep/ghc-9.2.2/; done
echo "HADDOCK_DOCS = YES" >> bindistprep/ghc-9.2.2/bindist.mk
echo "BUILD_SPHINX_HTML = NO" >> bindistprep/ghc-9.2.2/bindist.mk
echo "BUILD_SPHINX_PDF = NO" >> bindistprep/ghc-9.2.2/bindist.mk
echo "BUILD_MAN = NO" >> bindistprep/ghc-9.2.2/bindist.mk
echo "override ghc-cabal_INPLACE = utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" >> bindistprep/ghc-9.2.2/bindist.mk
echo "UseSystemLibFFI = YES" >> bindistprep/ghc-9.2.2/bindist.mk
echo "CrossCompiling = NO" >> bindistprep/ghc-9.2.2/bindist.mk
cd bindistprep/ghc-9.2.2 && autoreconf
aclocal-1.15: warning: couldn't open directory '../m4': No such file or directory
"rm" -f bindistprep/ghc-9.2.2-x86_64-unknown-openbsd.tar
sort bindist-list | uniq > bindist-list.uniq
cd bindistprep && "/usr/local/bin/gtar" hcf - -T ../bindist-list.uniq | /usr/local/bin/xz -c > ../bindistprep/ghc-9.2.2-x86_64-unknown-openbsd.tar.xz
/usr/local/bin/gtar: ghc-9.2.2/rts/dist/build/ffi.h: Cannot stat: No such file or directory
/usr/local/bin/gtar: ghc-9.2.2/rts/dist/build/ffitarget.h: Cannot stat: No such file or directory
/usr/local/bin/gtar: Exiting with failure status due to previous errors
mv bindistprep/*.tar.xz "."
Steps to reproduce
follow Preparing and Building OpenBSD
cabal install
any required dependencies
rerun, ./boot
, ./configure
and gmake
sequence
finally run gmake binary-dist
I did this but I have an OpenBSD environment working for older versions of GHC
export TMP=$HOME/tmp
export TEMP=$HOME/tmp
./boot
./configure \
--with-iconv-libraries=/usr/local/lib \
--with-iconv-includes=/usr/local/include \
--with-gmp-libraries=/usr/local/lib \
--with-gmp-includes=/usr/local/include \
--with-ffi-libraries=/usr/local/lib \
--with-ffi-includes=/usr/local/include \
--with-system-libffi \
--prefix=$HOME/.local/ \
CC=clang
gmake
gmake binary-dist
Expected behavior
gmake binary-dist
to succeed.
Environment
- GHC version used:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.6
Optional:
- Operating System:
OpenBSD
- System Architecture: x86_64
$ uname -a
OpenBSD nuci5.adamsteen.com.au 7.1 GENERIC.MP#403 amd64