Skip to content

libHSdirectory-1.3.7.1-ghc9.5.20220824.so: undefined reference to unixzm2zi7zi2zi2_*

Summary

Build fails on OpenBSD with:

===> Command failed with error code: 1
ld.lld: error: .../x86_64-openbsd-ghc-9.5.20220824/libHSdirectory-1.3.7.1-ghc9.5.20220824.so: undefined reference to unixzm2zi7zi2zi2_SystemziPosixziFiles_setFileMode1_info [--no-allow-shlib-undefined]
ld.lld: error: .../x86_64-openbsd-ghc-9.5.20220824/libHSdirectory-1.3.7.1-ghc9.5.20220824.so: undefined reference to unixzm2zi7zi2zi2_SystemziPosixziFiles_setFileMode1_closure [--no-allow-shlib-undefined]
...
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`clang' failed in phase `Linker'. (Exit code: 1)
Error when running Shake build system:
  at action, called at src/Rules.hs:38:19 in main:Rules
  at need, called at src/Rules.hs:60:5 in main:Rules
* Depends on: _validatebuild/stage1/bin/hpc
  at cmd', called at src/Builder.hs:386:23 in main:Builder
  at cmdArgs, called at src/Builder.hs:539:8 in main:Builder
  at cmdArgs, called at src/Builder.hs:563:18 in main:Builder
  at cmdArgs, called at src/Builder.hs:563:18 in main:Builder
  at error, called at src/Builder.hs:608:13 in main:Builder
* Raised the exception:
Command failed
Build failed.

The problem is bisected to 112e4f9c, the same build works at b929063e.

FYI @TerrorJack

Steps to reproduce

On OpenBSD:

AUTOCONF_VERSION=2.71 AUTOMAKE_VERSION=1.16 \
		config_args='--with-ffi-includes=/usr/local/include 
			--with-ffi-libraries=/usr/local/lib 
			--with-gmp-includes=/usr/local/include 
			--with-gmp-libraries=/usr/local/lib 
			--with-iconv-includes=/usr/local/include 
			--with-iconv-libraries=/usr/local/lib 
			--with-system-libffi ' \
    ./validate --fast "$@"

Expected behavior

Build working GHC.

Environment

  • GHC version used: 9.2.4

Optional:

  • Operating System: OpenBSD
  • System Architecture: amd64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information