[omniORB] building with openssl on windows

Michael Teske subscribe at teskor.de
Wed Oct 5 06:19:31 UTC 2022


Hi again,

we finally found out that we should use OPENSSL_API_COMPAT to be openssl 1.0 compatible.
There is one other small problem when building omnihttpCrypto430_rt.dll .
It looks like there is a macro MakeCXXExportSymbolDefinitionFile in win32.mk which takes all symbols from the static lib 
(via DUMPBIN) and generates an export file for the shared lib from it.
Unfortunately this does not work with newer VC compilers (I habe 19.29.30146) as it generates some lambdas in the symbol 
table and the build is trying to export it:

"  Creating library shared/omnihttpCrypto430_rt.lib and object shared/omnihttpCrypto430_rt.exp
omnihttpCrypto430_rt.exp : error LNK2001: unresolved external symbol "public: __cdecl 
<lambda_65e615be2a453ca0576c979606f46740>::operator()(char * const,char const * const,unsigned __int64,char const * 
const,unsigned __int64)const " (??R<lambda_65e615be2a453ca0576c979606f46740>@@QEBA at QEADQEBD_K12@Z)
shared\omnihttpCrypto430_vc16_rt.dll : fatal error LNK1120: 1 unresolved externals"

We found out, they come from the string/sxtring header:

#line 3150 "C:\\Program Files (x86)\\Microsoft Visual 
Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include\\xstring"
  .....
         return _Reallocate_grow_by(
             _Count,
             [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const _Elem* const _Ptr,
                 const size_type _Count) {


And of course the lambda numbers in the the static versions differ from the shared versions. Since nobody needs exported 
lamdas anyway, I fixed it with

$ svn diff mk/
Index: mk/win32.mk
===================================================================
--- mk/win32.mk (revision 717)
+++ mk/win32.mk (working copy)
@@ -273,6 +273,7 @@
  egrep -v 'deleting destructor[^(]+\(unsigned int\)' | \
  egrep -v 'anonymous namespace' | \
+egrep -v 'lambda_' \
  egrep -v 'std@' | \
  cut -d'|' -f2 | \
  cut -d' ' -f2 | $(SORT) -u >> $$defname; \


Greetings,
  Michael


Am 15/07/2022 um 22:58 schrieb Michael Teske via omniORB-list:
> Hi,
> 
> unfortunately we will required to be able to encrypt our CORBA connections. On Linux openssl is compiled into omniORB 
> automatically, but on windows I have to find a lib myself.
> For a starter I tried https://kb.firedaemon.com/support/solutions/articles/4000121705 (OpenSSL 1.1.1q, this seems to be 
> nearest to the version used on rhel8 (1.1.1k) successfully).
> But when I try to build it with
> make export platform=x86_win32_vs_16 PYTHON=$(PYTHON_EXE) OPEN_SSL_ROOT=/cygdrive/c/openssl-1.1/x64, I get some missing 
> symbols, (e.g. DH_new and BN_bin2bn) which I could resolve by adding
> 
> #include <openssl/dh.h>
> #include <openssl/bn.h>
> 
> to sslContext.cc .
> Is this really some difference between windows and linux or OpenSSL 1.1.1q and 1.1.1k, or did I do something wrong?
> 
> 
> Greetings,
>    Michael
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> https://www.omniorb-support.com/mailman/listinfo/omniorb-list




More information about the omniORB-list mailing list