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!




Reply via email to