Archived
This forum has been archived. Please start a new discussion on GitHub.
'Thread support not enabled' error
Hi,
I get a 'Thread support not enabled' when building OpenSSLPluginI.cpp against OpenSSL 0.97.
This is due to the code:
If I change "defined(THREADS)" to "defined(OPENSSL_THREADS)", which OpenSSL defines in opensslconf.h, then it's fine.
I don't know if this was meant to be referring to OPENSSL_THREADS or some other macro, or if OpenSSL changed the macro name between 0.96 or 0.97, but there it is.
Regards,
Derek.
PS I am not a crackpot.
I get a 'Thread support not enabled' when building OpenSSLPluginI.cpp against OpenSSL 0.97.
c++ -c -I.. -I/usr/local/ssl/include -I../../include -I/home/derekt/e2fsprogs-1.32/lib -g -ftemplate-depth-128 -fPIC -Wall OpenSSLPluginI.cpp OpenSSLPluginI.cpp:45:2: #error "Thread support not enabled"
This is due to the code:
#define OPENSSL_THREAD_DEFINES #include <openssl/opensslconf.h> #if defined(THREADS) #else #error "Thread support not enabled" #endif
If I change "defined(THREADS)" to "defined(OPENSSL_THREADS)", which OpenSSL defines in opensslconf.h, then it's fine.
I don't know if this was meant to be referring to OPENSSL_THREADS or some other macro, or if OpenSSL changed the macro name between 0.96 or 0.97, but there it is.
Regards,
Derek.
PS I am not a crackpot.
0
Comments
-
This is a result of changes made to OpenSSL 0.9.7. It works fine against 0.9.6 as the macro is called just "THREADS" in that version.
You'll have to change it if you decide to support 0.9.7
Regards,
Derek.
"The are too many [preprocessor macros] these days. I suggest removing three of them"
-- Abe Simpson.0 -
OPENSSL_VERSION_NUMBER?
Hi,
Could you use the OPENSSL_VERSION_NUMBER macro defined
in opensslv.h to do what you need?
something like:
#if OPENSSL_VERSION_NUMBER < 0090700fL && defined(THREADS) \
|| OPENSSL_VERSION_NUMBER >= 0090700fL && defined(OPENSSL_THREADS)
I'm not sure what the correct OPENSSL_VERSION_NUMBER is, I don't
have 0.9.7.0 -
The next release will support OpenSSL 0.96x and 0.97x.0
-
Originally posted by mes
The next release will support OpenSSL 0.96x and 0.97x.
<monty_burns> Huzzah! </monty_burns>0 -
Re: OPENSSL_VERSION_NUMBER?Originally posted by rodrigc
Hi,
Could you use the OPENSSL_VERSION_NUMBER macro defined
in opensslv.h to do what you need?
something like:
#if OPENSSL_VERSION_NUMBER < 0090700fL && defined(THREADS) \
|| OPENSSL_VERSION_NUMBER >= 0090700fL && defined(OPENSSL_THREADS)
I'm not sure what the correct OPENSSL_VERSION_NUMBER is, I don't
have 0.9.7.
It'll work, but I'll repeat my paraphrasing of the immortal words of Abraham J. Simpson: "there are too many preprocessor macros these days!" I don't want to see yet more! There's got to be a better way ... once again I leave it to ZeroC to do the actual work
Regards,
Derek.
"I tied an onion to my belt! It was the style at the time ..." - Abe Simpson.0