Skip to content

Symbol type mismatch when building with llvm

Summary

I wanted to play with LLVM backend on OpenBSD amd64. A lot of tests produce prodigious extra output which doesn't occur with the default backend:

Symbol type mismatch.
Symbol __llvm_retpoline_r11 was defined by /home/greg/s/ghc/_build/stage1/lib/x86_64-openbsd-ghc-9.9.20240211/base-4.19.0.0-inplace/libHSbase-4.19.0.0-inplace.a to be a data symbol.
      yet was defined by /home/greg/s/ghc/_build/stage1/lib/x86_64-openbsd-ghc-9.9.20240211/ghc-prim-0.10.0-inplace/libHSghc-prim-0.10.0-inplace.a to be a code symbol.

Steps to reproduce

I built GHC with:

TEST=T5313 hadrian/build '*.*.ghc.link.opts+=-L/usr/local/lib' \
	      --docs=none \
	      --flavour=release+llvm+no_profiled_libs+split_sections \
              -j test

After that when the tests run e.g. GHC.load GHC.LoadAllTargets they generate this debugBelch above.

Expected behavior

Since the output doesn't seem to be otherwise harmful, it'd appear that suppressing the message entirely is a reasonable alternative?

Environment

Optional:

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