ncurses-dev update to v6.4_p20240420-r1 breaks a Haskell GHC build
Package Information
- Package name: ncurses-dev
- Package version: v6.4_p20240420-r1
- Alpine version: 3.20.3
- Alpine architecture: x86_64
Summary
An update to ncurses !71841 (merged) made to fix #16434 (closed) causes a Haskell GHC / stack build of https://github.com/anoma/juvix to fail with Error loading shared library -lncursesw
.
Steps to reproduce
The Haskell GHC / stack build is performed in a container based on Alpine 3.20.3.
On a machine with docker installed
docker run --rm -ti glcr.b-data.ch/ghc/ghc-musl:9.8.2 bash
Inside the container:
Install required packages:
apk add cargo clang llvm
Install Juvix:
cd /tmp
mkdir anoma
cd anoma
git clone https://github.com/anoma/juvix.git
cd juvix
make runtime LIBTOOL=llvm-ar
stack install --system-ghc --no-install-ghc --ghc-options='-split-sections' --flag juvix:static
the result is a failure during compilation:
...
Preprocessing executable 'juvix' for juvix-0.6.6..
Building executable 'juvix' for juvix-0.6.6..
[ 1 of 199] Compiling Commands.Extra.Package
[ 2 of 199] Compiling CommonOptions
<no location info>: error:
Error loading shared library -lncursesw: No such file or directory
ncurses-dev
: 6.4_p20231125-r0
The build works with the previous version of If instead we downgrade to ncurses-dev==6.4_p20231125-r0 the issue does not appear and the build is successful (thanks to https://github.com/benz0li for providing these steps):
docker run --rm -ti glcr.b-data.ch/ghc/ghc-musl:9.8.2 bash
Revert ncurses-dev to v6.4_p20231125-r0 from Alpine Linux v3.19:
apk del ncurses-dev pcre2-dev
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.19/main' >> /etc/apk/repositories
apk add ncurses-dev==6.4_p20231125-r0 pcre2-dev
Install required packages:
apk add cargo clang llvm
Install Juvix:
cd /tmp
mkdir anoma
cd anoma
git clone https://github.com/anoma/juvix.git
cd juvix
make runtime LIBTOOL=llvm-ar
stack install --system-ghc --no-install-ghc --ghc-options='-split-sections' --flag juvix:static
Result:
juvix --version
file $(which juvix)
Juvix version 0.6.6-23837ed
Branch: main
Commit: 23837ed745173f99bb0b7461081f5a9392ac2fcc
Date: Tue Oct 29 19:58:00 2024 +0000
/root/.local/bin/juvix: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, BuildID[sha1]=5e0c780ebb965673fcad81c658f465b60e3f366f, stripped
Cross references: