A plea for help with open62541 (OPC UA) binaries

Dear Julia community,
I am working on a Julia wrapper for the open62541 C library (open62541.org); hoping to bring a working OPC UA ( OPC Unified Architecture - Wikipedia) package to the Julia community and made some good progress for v1.3.9 of open62541. The wrapper package lives here: martinkosch/open62541.jl: A Julia wrapper for the open62541 open source implementation of OPC UA (github.com) and I really hope to be able to register it “soon”.

Now over to my problem. The working version of the wrapper package has been generated from a single (“amalgamated”) file install, i.e., resulting in one header file. Recently, open62541 has received an update to 1.4 and introduced changes that prevent that (for reasons that make sense for the C library; probably less so in a Julia context), see here: [open62541] Add OpenSSL encryption, update Julia compat and increase version number (1.4.0) by thomvet · Pull Request #7889 · JuliaPackaging/Yggdrasil (github.com).

With a lot of help from giordano and members of the open62541 community (thank you), new binaries were built into Yggdrasil - great!

Since the binary package went from one header file to many, I needed to change the Clang.jl generator script that produces the wrapper package as well. I tried and apparently failed; getting segfaults when using certain (very basic - essential!) parts of the package.

Thinking that I maybe have introduced too many changes at once, I decided to build an un-amalgamated binary for v1.3.10 of open62541 ( [open62541] v1.3.10, split off v1.4 by thomvet · Pull Request #8522 · JuliaPackaging/Yggdrasil (github.com)) and try my revised generator with this.

The result is here: Revise generator for open62541 version 1.3.10 by thomvet · Pull Request #22 · martinkosch/open62541.jl (github.com).

The weird part here is that the generated wrapper package works on my Macbook and on the Mac OS CI server, but segfaults on my Windows laptop and on the Ubuntu and Windows CI servers. I have also tested loading the open62541_jll@1.3.9 and run it with the wrapper generated using open62541_jll@1.3.10. Surprisingly, that works on both my OS X and Windows laptops. That maybe indicates that the wrapper generation is actually fine? Does that mean that something (what?) went wrong in building the binary package?

Any tips on how I could start debugging this? It’s quite far out of my expertise and I am really hoping that the community can give me some pointers on where to start.

Also, thanks for your time reading this post :slight_smile:.