no more prebuilt dlls for win32/win64?

213 views
Skip to first unread message

Luca Olivetti

unread,
Oct 29, 2021, 9:31:57 AM10/29/21
to open62541
I checked on the github releases page and after v1.2-rc2 there are no
more prebuilt dlls for win32/win64.
I can easily build under linux but it's more difficult for me to build
under win32/win64.
I'm currently using the v1.2-rc2 win32 dll and I'm seeing a heap
corruption (or so it seems), so I wanted to see if it also happens with
1.2.2.

Bye
--
Luca


Luca Olivetti

unread,
Nov 3, 2021, 8:02:11 AM11/3/21
to open62541
I setup a build environment with visual studio 2019.
Using the same options (according to config.h) as the prebuilt dll, my dll is 372kB, the prebuilt (v1.2-rc2) is 2425kB.
Also, the name of the newly compiled lib is "open62541.dll" while the zip file on github contains "libopen62541.dll".

Luca Olivetti

unread,
Nov 4, 2021, 7:38:38 AM11/4/21
to open...@googlegroups.com
El 3/11/21 a les 13:02, Luca Olivetti ha escrit:


In spite of the small size, the dll seems to be functional, *but* I had
a strange problem with my pascal bindings: I use a modified
generate_datatypes.py (generate_datatypes_fpc.py) to keep in sync the
equivalent of types_generated.h with the library.
The problem is that the resulting file is different if I run the tool
under windows (where I compiled the dll) or under linux (where I
generate the bindings), the difference is in the ordering (hence in the
numbering) of several UA_ structures and constants.
I thought the problem was with my modified script but I get the same
with the original one and types_generated.h.

I run it this way:

./generate_datatypes.py --selected-types=schema/datatypes_minimal.txt \

--selected-types=schema/datatypes_method.txt \

--selected-types=schema/datatypes_subscriptions.txt \

--selected-types=schema/datatypes_dataaccess.txt \

--selected-types=schema/datatypes_typedescription.txt \

--type-bsd=schema/Opc.Ua.Types.bsd \

--type-csv=schema/NodeIds.csv \
"${dstdir}/types"


I'm attaching both files (with unix line endings) so you can see the
differences. I'm at the same time puzzled (both machines are using
python 2.7.18) and worried (I cannot generate consistent bindings that
will work on both platforms).

Can anybody help?
> --
> You received this message because you are subscribed to the Google
> Groups "open62541" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to open62541+...@googlegroups.com
> <mailto:open62541+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/open62541/e331aee7-51ff-4740-85b6-c416b83c1efan%40googlegroups.com
> <https://groups.google.com/d/msgid/open62541/e331aee7-51ff-4740-85b6-c416b83c1efan%40googlegroups.com?utm_medium=email&utm_source=footer>.

types_generated.linux.h
types_generated.win.h

Sten Grüner

unread,
Nov 4, 2021, 7:56:37 AM11/4/21
to Luca Olivetti, open...@googlegroups.com
Hi,

is the content and order of types in the txt files also the same?

BR

> Am 04.11.2021 um 12:38 schrieb Luca Olivetti <oliv...@gmail.com>:
>
> El 3/11/21 a les 13:02, Luca Olivetti ha escrit:
> To unsubscribe from this group and stop receiving emails from it, send an email to open62541+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/open62541/cb64949f-2f10-6b15-5d8a-66534cc9af6c%40gmail.com.
> <types_generated.linux.h>
> <types_generated.win.h>

Julius Pfrommer

unread,
Nov 4, 2021, 8:08:54 AM11/4/21
to open62541
In a diff' view the two files are nearly identical.
But the order of two DataType definitions is different.

My best guess is that we use a Python dictionary in the generator script with an unstable order.
Python dicts don't have an "order" per se. If you don't specifically use OrderedDict...

My recommendation is to use the generated header that was also used for the compiled library.
If that is a pain, you're welcome to dig and send us a patch.

Regards, Julius

Luca Olivetti

unread,
Nov 4, 2021, 8:16:55 AM11/4/21
to Sten Grüner, open...@googlegroups.com
El 4/11/21 a les 12:56, Sten Grüner ha escrit:
> Hi,
>
> is the content and order of types in the txt files also the same?

Hello, yes, I triple checked ;-)

Bye
--
Luca

Luca Olivetti

unread,
Nov 4, 2021, 8:23:08 AM11/4/21
to open...@googlegroups.com
El 4/11/21 a les 13:08, Julius Pfrommer ha escrit:
> In a diff' view the two files are nearly identical.
> But the order of two DataType definitions is different.

Yes, that's what causes a mismatch when using the bindings

>
> My best guess is that we use a Python dictionary in the generator script
> with an unstable order.
> Python dicts don't have an "order" per se. If you don't specifically use
> OrderedDict...
>
> My recommendation is to use the generated header that was also used for
> the compiled library.
> If that is a pain, you're welcome to dig and send us a patch.

Yes, it is a pain because having different bindings for windows and
linux is not ideal. I'll look into the generator to see if I'm able to
patch it.
Maybe it was just luck that the bindings worked with the 1.2.0-rc1
version (I used the precompiled dll for win32 and the bindings I
generated under linux worked on both platforms).

Bye
--
Luca

Luca Olivetti

unread,
Nov 4, 2021, 11:50:27 AM11/4/21
to open...@googlegroups.com
El 4/11/21 a les 13:08, Julius Pfrommer ha escrit:

> My best guess is that we use a Python dictionary in the generator script
> with an unstable order.
> Python dicts don't have an "order" per se. If you don't specifically use
> OrderedDict...

Found it

https://github.com/open62541/open62541/pull/4748

Bye
--
Luca
Reply all
Reply to author
Forward
0 new messages