I'm trying to build the double-conversion
package from Hackage. It builds OK but ghci can't load it. The complaint is:
Loading package double-conversion-0.2.0.0 ... linking ... <interactive>:
/home/me/.cabal/lib/double-conversion-0.2.0.0/ghc-7.0.4/HSdouble-conversion-0.2.0.0.o:
unknown symbol `_ZNK17double_conversion6Double5valueEv'
The nm
output shows that the symbol is weak:
nm /home/me/.cabal/lib/double-conversion-0.2.0.0/ghc-7.0.4/HSdouble-conversion-0.2.0.0.o \
| grep _ZNK17double_conversion6Double5valueEv
00000000 W _ZNK17double_conversion6Double5valueEv
This is the only weak symbol in the file, and indeed, as far as I can tell, in the entire world of GHC-compiled packages.
The problematic function is apparently a FFI one, written in C++ and defined inline in double-conversion/src/double.h
. It's not the only inline function there, but only this one gets labelled weak.
As a stopgap measure I have moved the function out-of-line, and the package now loads. But there's obviously some problem somewhere in there. Why this function is weak? Why other functions are not? Should ghc complain at weak symbols? Should I file a bug, and if so, who should get it (double-conversion, gcc, ghc, someone else?)
System data: Gentoo Linux, gcc-4.4.5, ghc-7.0.4, cabal-1.10.2.0.
text-format
? Maybe Yesod tries to use double-conversion from Template Haskell? – Mikhail Glushenkovcabal install
. The error message is the same. @Mikhail Glushenkov: I actually can installtext-format
, but notyesod
. The error message is the same. – n. 1.8e9-where's-my-share m.