[omniORB] Marshalling issue on Windows with DevLong64

Benjamin Bertrand benjamin.bertrand at maxiv.lu.se
Tue Mar 28 13:17:05 UTC 2023


> On 2023-03-23, 12:09, "Duncan Grisby" <duncan at grisby.org <mailto:duncan at grisby.org>> wrote:
>
>
> On Tue, 2023-03-21 at 12:53 +0000, Benjamin Bertrand via omniORB-list
> wrote:
>
>
> > We found some issue with the omniorb library compiled on conda-forge
> > for Windows (4.2.5) with cpptango.
> > If a client sends a DevLong64 in BigEndian, it is incorrectly
> > converted.
> > It works fine if LittleEndian is used.
>
>
> Presumably the omniORB build has gone wrong, and it thinks it is a big
> endian system, even though it is little endian. That would mean a
> broken omniORB talking to another broken omniORB would work, but for
> the wrong reason, whereas any other ORB, whether big- or little-endian
> would fail.
>
>
> > This issue is specific to the conda-forge build.
> > It was built from a fork using cmake
> > (https://github.com/beenje/omniORB-cmake <https://github.com/beenje/omniORB-cmake>) as the original build
> > system was difficult to make work with conda (
>
>
> I don't know what that does or how it does it, but it has got it wrong,
> and I'm afraid I can't really help with it.
>
>
> When omniORB compiles, it uses a preprocessor define
> _OMNIORB_HOST_BYTE_ORDER_ that must be 1 for little-endian, 0 for big-
> endian. In the normal build, that is either based on autoconf or based
> on defines of which processor is in use. The autoconf version is in
> CORBA_sysdep_auto.h, and the non-autoconf version is in
> CORBA_sysdep_trad.h.
>

Thanks for the answer.
I confirmed that _OMNIORB_HOST_BYTE_ORDER_ is set to 1.
The issue must be somewhere else. As far as I can tell the broken omniORB seems to work fine with another ORB when little endian is used.
Anyway, instead of spending time debugging the cmake build system, I'm trying to use the original one with:
- Visual Studio 2019
- GNU tools from conda-forge instead of Cygwin
- python from conda-forge

I enabled platform = x86_win32_vs_16 and set PYTHON = /c/Users/beenj/mambaforge/envs/omniorb/python

When compiling I get this error:

Z:\Windows\omniORB-4.2.5\bin\x86_win32\omkdepend.exe: warning:  idlpython.cc, line 222: unknown directive == "#warning "Please use an up-to-date version of gcc! (>2.91 recommended)""
"idlpython.cc":27:  (defined(__GLIBC__)        && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 16))        && !(defined(__cplusplus) && __cplusplus >= 201103L)        && !defined(static_assert))
                                                                                                                                                                        ^--- expecting )
making export in src/tool/omniidl/cxx/cccp...
make[4]: Entering directory '/z/Windows/omniORB-4.2.5/src/tool/omniidl/cxx/cccp'
../../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I../../../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Focexp.o cexp.c
cexp.c
cl -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I..\..\..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Focexp.o cexp.c
../../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I../../../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Focccp.o cccp.c
cccp.c
cccp.c(5332): warning C4311: 'type cast': pointer truncation from 'U_CHAR *' to 'int'
cccp.c(5333): warning C4311: 'type cast': pointer truncation from 'U_CHAR *' to 'int'
cl -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I..\..\..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Focccp.o cccp.c
../../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I../../../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foconfig.o config.c
config.c
cl -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I..\..\..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foconfig.o config.c
../../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I../../../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foalloca.o alloca.c
alloca.c
cl -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I..\..\..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foalloca.o alloca.c
../../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I../../../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foindex.o index.c
index.c
cl -c -O2 -MD -GS -GR -Zi -nologo -DHAVE_CONFIG_H -I. -I. -I. -I..\..\..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foindex.o index.c
+ rm -f omnicpp.exe
+ ../../../../../bin/x86_win32/linkwrapper -gnuwin32 -out:omnicpp.exe -nologo -manifest -DEBUG -MACHINE:X64 -PDB:omnicpp.exe.pdb -libpath:../../../../../lib/x86_win32 cexp.o cccp.o config.o alloca.o index.o
link -out:omnicpp.exe -nologo -manifest -DEBUG -MACHINE:X64 -PDB:omnicpp.exe.pdb -libpath:..\..\..\..\..\lib\x86_win32 cexp.o cccp.o config.o alloca.o index.o
+ mt.exe '/outputresource:omnicpp.exe;#1' /manifest omnicpp.exe.manifest
Microsoft (R) Manifest Tool
Copyright (c) Microsoft Corporation.
All rights reserved.

mt.exe : command line error c1010007: Unexpected/Unknown option "C:/Users/beenj/mambaforge/envs/omniorb/Library/manifest".  Use the /? option for help on usage and samples.
dir.mk:55: recipe for target 'omnicpp.exe' failed


C:/Users/beenj/mambaforge/envs/omniorb is the path of the conda environment where the tools are installed, but I don't understand where it's coming from in the manifest tool command.
Any idea how to fix this?

Thanks

Benjamin

PS: the conda environment was created with "conda create -y -n omniorb python openssl zlib cxx-compiler c-compiler posix"



More information about the omniORB-list mailing list