haskell-cryptography / HsOpenSSL

OpenSSL binding for Haskell
http://hackage.haskell.org/package/HsOpenSSL
Creative Commons Zero v1.0 Universal
22 stars 33 forks source link

0.11.5 and later fail to build (OpenBSD-current) #58

Closed falsifian closed 3 years ago

falsifian commented 3 years ago

Running cabal install HsOpenSSL-0.11.5 fails with the output shown at the bottom. I'm running OpenBSD-current (amd64), with Cabal version 3.4.0.0. (I think that means I have LibreSSL.)

0.11.4.20, and a few earlier versions I tried, don't have this problem. I tried some later versions (including 0.11.6.2) and they failed with similar undeclared identfier messages.

Resolving dependencies...
Build profile: -w ghc-8.10.3 -O1
In order, the following will be built (use -v for more details):
 - HsOpenSSL-0.11.5 (lib:HsOpenSSL) (requires download & build)
Downloading  HsOpenSSL-0.11.5
Downloaded   HsOpenSSL-0.11.5
Starting     HsOpenSSL-0.11.5 (all, legacy fallback)
Building     HsOpenSSL-0.11.5 (all, legacy fallback)

Failed to build HsOpenSSL-0.11.5.
Build log (
/home/falsifian/.cabal/logs/ghc-8.10.3/HsOpenSSL-0.11.5-c17c1999f37e1cbea884ff39fa680d4b86e6846e90948aad1375f8ab6dc5cb85.log
):
[1 of 1] Compiling Main             ( /tmp/cabal-install.-92741/dist-newstyle/tmp/src-92741/HsOpenSSL-0.11.5/dist/setup/setup.hs, /tmp/cabal-install.-92741/dist-newstyle/tmp/src-92741/HsOpenSSL-0.11.5/dist/setup/Main.o )
Linking /tmp/cabal-install.-92741/dist-newstyle/tmp/src-92741/HsOpenSSL-0.11.5/dist/setup/setup ...
Configuring HsOpenSSL-0.11.5...
Preprocessing library for HsOpenSSL-0.11.5..
compiling dist/build/OpenSSL/Session_hsc_make.c failed (exit code 1)
rsp file was: "dist/build/OpenSSL/hsc2hscall94599-0.rsp"
command was: /usr/bin/cc -c dist/build/OpenSSL/Session_hsc_make.c -o dist/build/OpenSSL/Session_hsc_make.o -Wl,-z,wxneeded -D__GLASGOW_HASKELL__=810 -Dopenbsd_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dopenbsd_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Icbits -Idist/build/cbits -D PTHREAD -DCALLCONV=ccall -Idist/build/autogen -Idist/build/global-autogen -include dist/build/autogen/cabal_macros.h -I/home/falsifian/.cabal/store/ghc-8.10.3/network-3.1.2.1-7831369131162cb203f0febab185c2715b366e56da7a5ee24a80af21de58d7d7/lib//include -I/usr/local/lib/ghc/unix-2.7.2.2/include -I/usr/local/lib/ghc/time-1.9.3/include -I/usr/local/lib/ghc/bytestring-0.10.12.0/include -I/usr/local/include -I/usr/local/lib/ghc/base-4.14.1.0/include -I/usr/local/include -I/usr/local/lib/ghc/integer-gmp-1.0.3.0/include -I/usr/local/lib/ghc/include -I/usr/local/include -I/usr/local/lib/ghc/include/
error: cc: warning: -Wl,-z,wxneeded: 'linker' input unused [-Wunused-command-line-argument]
Session.hsc:491:16: error: use of undeclared identifier 'SSL_ERROR_WANT_ASYNC'
    hsc_const (SSL_ERROR_WANT_ASYNC);
               ^
Session.hsc:491:16: error: use of undeclared identifier 'SSL_ERROR_WANT_ASYNC'
Session.hsc:491:16: error: use of undeclared identifier 'SSL_ERROR_WANT_ASYNC'
Session.hsc:492:16: error: use of undeclared identifier 'SSL_ERROR_WANT_ASYNC_JOB'
    hsc_const (SSL_ERROR_WANT_ASYNC_JOB);
               ^
Session.hsc:492:16: error: use of undeclared identifier 'SSL_ERROR_WANT_ASYNC_JOB'
Session.hsc:492:16: error: use of undeclared identifier 'SSL_ERROR_WANT_ASYNC_JOB'
Session.hsc:495:16: error: use of undeclared identifier 'SSL_ERROR_WANT_CLIENT_HELLO_CB'
    hsc_const (SSL_ERROR_WANT_CLIENT_HELLO_CB);
               ^
Session.hsc:495:16: error: use of undeclared identifier 'SSL_ERROR_WANT_CLIENT_HELLO_CB'
Session.hsc:495:16: error: use of undeclared identifier 'SSL_ERROR_WANT_CLIENT_HELLO_CB'
9 errors generated.

cabal: Failed to build HsOpenSSL-0.11.5. See the build log above for details.
vshabanov commented 3 years ago

Please, test HsOpenSSL-0.11.7. Does it work for you?

falsifian commented 3 years ago

Yes, 0.11.7 works, thanks.

(I built and installed it with cabal install --lib HsOpenSSL-0.11.7 and used it in a simple program.)

vshabanov commented 3 years ago

That's great. I'm closing this issue then.