Skip to content

libc wrong ELF class

When building my project with a ghc downloaded and managed via ghcup, I get an error that the libc has the wrong ELF class:

...
Starting     hlint-3.3.6 (lib)
Building     hlint-3.3.6 (lib)

Failed to build hlint-3.3.6.
Build log (
/home/user/.cabal/logs/ghc-8.8.4/hlint-3.3.6-666d6194de653da55a70dbe1dd1487acdaaad3f53feb0a8aa55032fddfdeac9f.log
):
Configuring library for hlint-3.3.6..
Preprocessing library for hlint-3.3.6..
Building library for hlint-3.3.6..
[ 1 of 60] Compiling EmbedData        ( src/EmbedData.hs, dist/build/EmbedData.o )
<command line>: /lib/libc.so.6: wrong ELF class: ELFCLASS32
cabal: Failed to build hlint-3.3.6 (which is required by test:l4re-model-test
from l4re-model-0.1.0.0 and exe:l4re-model from l4re-model-0.1.0.0). See the
build log above for details.

When I built with the system ghc, it works as expected. I guess the ghcup-ghc looks for the 64-bit libc (which is in Fedora in /lib64/).

How can I solve this?

System:

  • Fedora 35 (up-to-date)
  • ghcup v0.1.17.4
  • ghc 8.8.4 (installed & managed via ghcup)
  • cabal 3.6.2.0 (installed & managed via ghcup but the problem already occured before I did this)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information