Lift instance cause GHC build error: unknown symbol with CFFI

Ben Gamari ben at smart-cactus.org
Thu Dec 19 18:08:40 UTC 2024


Minh Le <minhxecole at gmail.com> writes:

> Hi everyone,
> I’m building a floating-point library for Clash that uses FloPoCo.

Very cool; I've not heard of FloPoCo prior to this; that looks like a
nice set of cores.

> The library integrates with the MPFR library via the hmpfr Haskell
> bindings to perform accurate software simulations of floating-point
> operations.
>
> I’ve encountered build errors related to linking the MPFR library:
> Windows:
> unknown symbol 'mpfr_add' in Arithmetic.o.
> Linux:
> symbol lookup error: undefined symbol 'mpfr_custom_get_size_wrap'.
>
> Interestingly, cabal repl works as expected, but cabal build fails.
>
Indeed that is intriguing. Indeed you have the right `extra-libraries`
entries in your Cabal file.

> This suggests a linking issue specific to the build process.
>
I have tried to reproduce this but it would seem that the repository is
missing the FPFloat module.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20241219/15932890/attachment.sig>


More information about the ghc-devs mailing list