I'm trying to give HsOpenSSL a whirl on Mac OS X, and it's blowing up in my face.
The latest Hackage version (HsOpenSSL-0.10.3.3) builds and imports, but doing anything with it kills my GHCi (both 7.6.3 and 7.4.2):
ghci> import OpenSSL
ghci> withOpenSSL $ do undefined
$ # Now I'm looking at a shell prompt
I put together an executable and built it with GHC, and voilà, a segfault:
$ ./test
Segmentation fault: 11
I'm using the version of OpenSSL that comes with OS X 10.8:
$ openssl version
OpenSSL 0.9.8r 8 Feb 2011
(I've also now installed the latest version of OpenSSL, v1.0.1e, and built HsOpenSSL against it. Again it builds and imports fine, but segfaults on any call out to OpenSSL.)
This is likely a problem with OpenSSL, or with some idiosyncrasy of using OS X rather than Linux, but my installation does work fine with Python's OpenSSL library. ...
Can anyone replicate this, or give me any debugging tips?
I'm afraid I have another negative report - it works here for me, on OS X. Hypothetically, I might be using a version that I might not be allowed to mention, though, so that could be the difference...
module Main (main) where
import OpenSSL
main :: IO ()
main = withOpenSSL $ do
putStrLn "Hm."
Then I can run it with:
$ ghc Crash.hs
... [it compiles] ...
$ ./Crash
Hm.
And it succeeds. I'm using GHC 7.6.3, HsOpenSSL 0.10.3.3, and OpenSSL 0.9.8y, this last dated 5 Feb 2013.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With