[Haskell-cafe] building ghc-8.4.2 from source: undefined reference to 'mpz_powm_sec'

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Fri Apr 20 07:31:57 UTC 2018

Dear Cafe,

I am getting this when building ghc-8.4.2 from source,
with ghc-8.2.2:

integer_gmp_powm_sec: error: undefined reference to 'mpz_powm_sec'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
make[1]: *** [iserv/ghc.mk:104: iserv/stage2_p/build/tmp/ghc-iserv-prof]
Error 1

This may be due to some mis-config on my part,
because I'm getting this on one machine only, and it works on others.

Still, perhaps you have seen this before, and could help me with
an educated guess on what may have caused this.

It is especially puzzling because this install of ghc-8.2.2
seems to work perfectly fine for all of my projects.

Thanks - J.W.

More information about the Haskell-Cafe mailing list