Linux linking issues moving from 1.0.2t to 1.1.1c

Richard Levitte levitte at openssl.org
Mon Oct 7 19:07:53 UTC 2019


The no-dso is silently not valid in 1.1.1c.  That option didn't work
right, so it was unusable in practice anyway.  However, someone
recently fixed that up, unfortunately after the last 1.1.1 release.
The specific patch may be possible to find on github (unless that
branch has been deleted), otherwise you will have to cherry-pick the
appropriate commit.

Github PR: https://github.com/openssl/openssl/pull/9889
Commit ID: 8dcd57461972dceaaf014b71d173d0a8758e7054

Cheers,
Richard

On Mon, 07 Oct 2019 17:19:26 +0200,
Dan Heinz wrote:
> 
> 
> Please bear with me as I am a Windows developer, and not too adept with Linux.  
> 
> Our library has been using the OpenSSL 1.0.2x branch, and we are moving to 1.1.1c.  I have the
> Windows build of our libraries working, and now I’ve moved to Linux.
> 
> Our library is built as a shared library as well as static library and both use the static OpenSSL
> library (we archive the OpenSSL static library with our static library).  
> 
> When I built our shared library I had some linker errors:
> e/Debug32/mylib.so: undefined reference to `dlopen'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_rwlock_rdlock'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_rwlock_init'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_getspecific'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_rwlock_destroy'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `dlclose'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_key_create'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_rwlock_wrlock'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_once'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_atfork'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_setspecific'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `dlerror'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_rwlock_unlock'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `dlsym'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `pthread_key_delete'
> 
> ../../MyLib/Debug32/libMyLib.so: undefined reference to `dladdr'
> 
> And the Configuration line from our build script:
> ./Configure linux-x86_64 --prefix=$install_path/openssl_64 -DPURIFY -DOPENSSL_NO_COMP no-shared
> no-dso no-sse2 no-idea no-mdc2 no-rc5 no-ssl3 no-zlib no-comp no-afalgeng no-pinshared
> 
> As our library does not use multiple threads, I can build the OpenSSL library with the no-threads
> configuration parameter to remove the pthread references.  Is there anything I should be aware of
> when doing so? 
> 
> For the dlopen, dlclose, dlerror,dlsym, and dladdr references, it seems I need to link libld using
> -ldl.  Isn’t the no-dso configuration option supposed to remove the need for this library?  Is
> there a way to do so with 1.1.1c?  While I can link this in our shared library, our static library
> will require anyone using our library to link libld.  I’d like to avoid this if possible, and it
> seems we could with the 1.0.2 branch. 
> 
> Am I missing something here?
> 
> Thanks in advance!
> 
> 
-- 
Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-users mailing list