[Haskell-cafe] OpenSSL.Digest linking error: EVP_mdc2

Ken Takusagawa ken.takusagawa.2 at gmail.com
Mon Jul 7 01:12:46 EDT 2008

I'm using hopenssl 1.0 from hackage.  What am I doing wrong here?

$  cat test-hopenssl.hs
import OpenSSL.Digest

$ ghc --make test-hopenssl.hs  -lcrypto
[1 of 1] Compiling Main             ( test-hopenssl.hs, test-hopenssl.o )
Linking test-hopenssl ...
/tmp/ken/lib/hopenssl-1.0/ghc-6.8.2/libHShopenssl-1.0.a(Digest.o): In
function `s2O8_info':
(.text+0xf3a): undefined reference to `EVP_mdc2'
/tmp/ken/lib/hopenssl-1.0/ghc-6.8.2/libHShopenssl-1.0.a(Digest.o): In
function `s2TQ_info':
(.text+0x1435): undefined reference to `EVP_mdc2'
collect2: ld returned 1 exit status

$ dpkg-query -S /usr/lib/libcrypto.a
libssl-dev: /usr/lib/libcrypto.a

$  dpkg-query -l libssl-dev
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                   Version                Description
ii  libssl-dev             0.9.8g-10.1            SSL development
libraries, header files and documentation

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2

$ uname -a
Linux localhost 2.6.24-1-686 #1 SMP Thu May 8 02:16:39 UTC 2008 i686 GNU/Linux

More information about the Haskell-Cafe mailing list