Statically compiling Haskell program fails: ld cannot find -lffi. What is the correct package that supplies static ffi?
I'm running Fedora 20 trying to statically compile a very minimal Haskell program. The command I'm using is
ghc -O2 --make -static -optc-static -optl-static Test.hs
It exits with this error however:
Linking Test ...
/usr/bin/ld: cannot find -lffi
/usr/lib64/ghc-7.6.3/libHSrts.a(Linker.o): In function `addDLL':
(.text+0x1a19): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned exit status 1
/usr/bin/ld: cannot find -lffi seems to me to be the failure inducing error (the other message is a warning). Si I want to install the static version of the foreign function interface library, but I can't find it. I can only find ming232-libffi-static and mingw64-libffi-static. Also, libffi, libffi-devel, ghc-libffi, and ghc-libffi-devel are all installed, but are not the static versions that I need.
So my question is: does a statically compiled libffi package exist, if so what is its name, if not does anyone have advice what else to do? Thank you for your time!