<div dir="ltr">You can start by checking whether you have libgmp and whether it has the referenced symbol, e.g. on my machine, there's a /usr/lib64/libgmp.a, and I get this:<div><br></div><div><div>$ nm /usr/lib64/libgmp.a | grep mpz_powm_sec</div><div>0000000000000000 T __gmpz_powm_sec</div></div><div><br></div><div>I'm not sure what the relationship is between __gmpz_powm_sec and mpz_powm_sec, though it may be just some naming convention.</div><div><br></div><div>Without knowing much about various versions of GHC or libgmp, I think it's possible that newer GHC requires newer libgmp that has this symbol and you have an older libgmp.</div><div><br></div><div>Josh<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 20, 2018 at 3:31 PM, Johannes Waldmann <span dir="ltr"><<a href="mailto:johannes.waldmann@htwk-leipzig.de" target="_blank">johannes.waldmann@htwk-leipzig.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Cafe,<br>
<br>
I am getting this when building ghc-8.4.2 from source,<br>
with ghc-8.2.2:<br>
<br>
ghc-8.4.2/libraries/integer-<wbr>gmp/dist-install/build/<wbr>libHSinteger-gmp-1.0.2.0_p.a(<wbr>wrappers.p_o):wrappers.c:<wbr>function<br>
integer_gmp_powm_sec: error: undefined reference to 'mpz_powm_sec'<br>
collect2: error: ld returned 1 exit status<br>
`gcc' failed in phase `Linker'. (Exit code: 1)<br>
make[1]: *** [iserv/<a href="http://ghc.mk:104" rel="noreferrer" target="_blank">ghc.mk:104</a>: iserv/stage2_p/build/tmp/ghc-<wbr>iserv-prof]<br>
Error 1<br>
<br>
This may be due to some mis-config on my part,<br>
because I'm getting this on one machine only, and it works on others.<br>
<br>
Still, perhaps you have seen this before, and could help me with<br>
an educated guess on what may have caused this.<br>
<br>
It is especially puzzling because this install of ghc-8.2.2<br>
seems to work perfectly fine for all of my projects.<br>
<br>
Thanks - J.W.<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br></div>