GHC 9.6.3: Linux (x86-64): Alpine (Static, GMP bignum implementation): GHCi: unknown symbol `__gmpn_rshift'
Summary
Executing
ghci
results in
GHCi, version 9.6.3: https://www.haskell.org/ghc/ :? for help
ghc-9.6.3: /usr/local/lib/ghc-9.6.3/lib/x86_64-linux-ghc-9.6.3/ghc-bignum-1.3/HSghc-bignum-1.3.o: unknown symbol `__gmpn_rshift'
ghc-9.6.3: Could not load Object Code /usr/local/lib/ghc-9.6.3/lib/x86_64-linux-ghc-9.6.3/ghc-bignum-1.3/HSghc-bignum-1.3.o.
ghc-9.6.3: unable to load unit `ghc-bignum-1.3'
/tmp/ghc-9.6.3-x86_64-unknown-linux # cat /usr/local/lib/ghc-9.6.3/lib/x86_64-linux-ghc-9.6.3/ghc-bignum-1.3/HSghc-bignum-1.3.
HSghc-bignum-1.3.o HSghc-bignum-1.3.p_o
Steps to reproduce
On a host (Linux/x86_64) running docker:
docker run --rm -ti alpine:3.12
Inside the container:
apk add --no-cache build-base curl
cd /tmp \
&& curl -sSLO https://downloads.haskell.org/~ghc/9.6.3/ghc-9.6.3-x86_64-alpine3_12-linux-static.tar.xz \
&& tar -xJf ghc-9.6.3-x86_64-alpine3_12-linux-static.tar.xz \
&& cd ghc-9.6.3-x86_64-unknown-linux
./configure
make install
ghci
Expected behavior
GHCi starts successfully.
Environment
- GHC version used: 9.6.3
Optional:
- Operating System: Alpine Linux 3.12.12
- System Architecture: x86_64