[erlang-bugs] R12B-3 crypto driver doesn't build on OpenBSD

Matthew Dempsky matthew.dempsky@REDACTED
Fri Apr 25 21:32:50 CEST 2008


I'm not familiar with what OPENSSL_THREADS is supposed to do, but I
did notice that if I simply comment out that #error line, the driver
compiled fine on OpenBSD, and I was able to crypto:start() and run
crypto:sha(<<"test">>).  It seems like the OpenSSL thread functions
are available, just OPENSSL_THREADS isn't defined.

On Fri, Apr 25, 2008 at 1:56 AM, Sverker Eriksson
<sverker@REDACTED> wrote:
> I've improved the smp performance by letting several threads call the
>  crypto driver in parallel. Your openssl does however not seem to support
>  thread-safeness. I did not think that would ever be the case.
>  This is how I find out if OpenSSL was configured with thread support
>  according to http://www.openssl.org/docs/crypto/threads.html:
>
>  #define OPENSSL_THREAD_DEFINES
>  #include <openssl/opensslconf.h>
>  #ifndef OPENSSL_THREADS
>  #  error No thread support by openssl
>  #endif
>
>
>  I will change crypto_drv.c to fall back on the old behaviour with one
>  thread at a time (using driver lock) in the case when openssl does not
>  support it.
>
>  /Sverker
>
>  >
>  > ------------------------------------------------------------------------
>  >
>  > Subject:
>  > [erlang-bugs] R12B-3 crypto driver doesn't build on OpenBSD
>  > From:
>  > "Matthew Dempsky" <matthew@REDACTED>
>  > Date:
>  > Thu, 24 Apr 2008 16:11:27 -0700
>  > To:
>  > erlang-bugs@REDACTED
>  >
>  > To:
>  > erlang-bugs@REDACTED
>
>
> >
>  >
>  > Trying to build R12B-3 on OpenBSD (4.2-stable or a somewhat dated
>  > 4.3-beta snapshot) dies trying to compile crypto_drv.c.
>  >
>  > gmake[4]: Entering directory `/home/matthew/src/otp_src_R12B-3/lib/crypto/c_src'
>  > /usr/bin/install -c -d ../priv/obj/x86_64-unknown-openbsd4.3
>  > gcc -c -o ../priv/obj/x86_64-unknown-openbsd4.3/crypto_drv.o -g -O2
>  > -I/home/matthew/src/otp_src_R12B-3/erts/x86_64-unknown-openbsd4.3
>  > -fPIC  -I/home/matthew/src/otp_src_R12B-3/erts/emulator/beam
>  > -I/home/matthew/src/otp_src_R12B-3/erts/emulator/sys/unix crypto_drv.c
>  > crypto_drv.c:36:4: #error No thread support by openssl
>  > gmake[4]: *** [../priv/obj/x86_64-unknown-openbsd4.3/crypto_drv.o] Error 1
>  > gmake[4]: Leaving directory `/home/matthew/src/otp_src_R12B-3/lib/crypto/c_src'
>  > gmake[3]: *** [opt] Error 2
>  > gmake[3]: Leaving directory `/home/matthew/src/otp_src_R12B-3/lib/crypto/c_src'
>  > gmake[2]: *** [opt] Error 2
>  > gmake[2]: Leaving directory `/home/matthew/src/otp_src_R12B-3/lib/crypto'
>  > gmake[1]: *** [opt] Error 2
>  > gmake[1]: Leaving directory `/home/matthew/src/otp_src_R12B-3/lib'
>  > gmake: *** [libs] Error 2
>  > _______________________________________________
>  > erlang-bugs mailing list
>  > erlang-bugs@REDACTED
>  > http://www.erlang.org/mailman/listinfo/erlang-bugs
>  >
>  >
>  > ------------------------------------------------------------------------
>
>
> >
>  >
>  >
>  >
>
>  _______________________________________________
>  erlang-bugs mailing list
>  erlang-bugs@REDACTED
>  http://www.erlang.org/mailman/listinfo/erlang-bugs
>



More information about the erlang-bugs mailing list