[omniORB] building with openssl on windows

Duncan Grisby duncan at grisby.org
Thu Oct 6 23:22:34 UTC 2022


I'm not sure why you have had so much trouble compiling with OpenSSL. I
have not used the binaries from firedaemon.com, so perhaps there is
something strange about them.

With the binaries of both 1.1.1q and 3.0.5 from 

https://slproweb.com/products/Win32OpenSSL.html

the compile works with no changes at all, and certainly no need to set
any sort of compatibility options.


You are quite right about the linker error with newer VC compiler
versions, though. For various reasons, the only systems I have compiled
the omnihttpCrypto library on are using an older VC compiler, so I
hadn't noticed that it failed on newer compilers.

Your fix to exclude the lambda function from the .def file is the right
thing to do.

Thanks,

Duncan.


On Wed, 2022-10-05 at 08:19 +0200, Michael Teske via omniORB-list
wrote:
> 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\\xs
> tring"
>   .....
>          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 (Op
> > enSSL 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
> 
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> https://www.omniorb-support.com/mailman/listinfo/omniorb-list

-- 
 -- Duncan Grisby --
  -- duncan at grisby.org --
   -- http://www.grisby.org --




More information about the omniORB-list mailing list