<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>On Windows, GHC embeds GMP (the C library) directly into the
integer-gmp package. So you mustn't try to link against another
libgmp library to avoid duplicated symbol errors (as the one
you've got).</p>
<p>It may be that you have a dependency of this specific test (or
the test itself) that has the following stanza in its Cabal file:
"extra-libraries: gmp"<br>
</p>
<p>Regards,<br>
Sylvain<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 17/11/2020 13:20, Sumit Raja wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAD4nrSfVYaqj+2d+h9yOyo6YUiE-zmr-t8afnB3fsvdEXzRCPQ@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>Suddenly started getting the following linker error after I
moved code around in my project. It only seems to occur when I
am building one specific cabal test target. When building a
dependent build it build successfully but cabal repl test-xxx
fails. I have no consistent way to repro but I will keep
trying and file a defect..<br>
</div>
<div><br>
</div>
<div>GHCi, version 8.8.4: <a
href="https://www.haskell.org/ghc/" moz-do-not-send="true">https://www.haskell.org/ghc/</a>
:? for help<br>
GHC runtime linker: fatal error: I found a duplicate
definition for symbol<br>
__gmpn_sec_sqr_itch<br>
whilst processing object file<br>
C:\Users\sumit\Apps\ghc-8.8.4\mingw\lib\libgmp.dll.a<br>
The symbol was previously defined in<br>
C:\Users\sumit\Apps\ghc-8.8.4\lib\integer-gmp-1.0.2.0\HSinteger-gmp-1.0.2.0.o<br>
This could be caused by:<br>
* Loading two different object files which export the same
symbol<br>
* Specifying the same object file twice on the GHCi command
line<br>
* An incorrect `package.conf' entry, causing some object to
be<br>
loaded twice.<br>
ghc.exe: panic! (the 'impossible' happened)<br>
(GHC version 8.8.4 for x86_64-unknown-mingw32):<br>
loadArchive
"C:\\Users\\sumit\\Apps\\ghc-8.8.4\\mingw\\lib\\libgmp.dll.a":
failed<br>
<br>
Please report this as a GHC bug: <a
href="https://www.haskell.org/ghc/reportabug"
moz-do-not-send="true">https://www.haskell.org/ghc/reportabug</a><br>
<br>
CallStack (from HasCallStack):<br>
die', called at
.\\Distribution\\Client\\ProjectOrchestration.hs:1041:55 in
main:Distribution.Client.ProjectOrchestration<br>
cabal.exe: repl failed for
mkr-txn-0.1.0.0-inplace-test-mkr-txn.</div>
<div><br>
</div>
<div>Regards</div>
<div>Sumit</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
</body>
</html>