-
Notifications
You must be signed in to change notification settings - Fork 11
Description
The ITER community would very much like to build a Python wheel of IMAS-Core with the UDA backend enabled. This currently works on Linux, but fails on Windows.
To reproduce
A) I've been building a github actions workflow that uses cibuildwheel (some good ideas borrowed from UDA's GHA workflow). Here is a link to a recent job: https://github.com/Louwrensth/IMAS-Core/actions/runs/17311074087/job/49145201122
But this is a bit of pain to read, here is a link to the logs.
B) You can also run it on a Windows machine yourself too:
# (make sure to install cibuildwheel package in your python env)
$ python -m cibuildwheel --output-dir wheelhouse --config-file pyproject.toml 2>&1 |tee cibw-log.log
I attach the log of this command:
cibw-log.log
e.g.
$ tail cibw-log.log
uda_serialisation.lib(capnp_serialisation.obj) : error LNK2019: unresolved external symbol "void __cdecl capnp::writePackedMessage(class kj::BufferedOutputStream &,class kj::ArrayPtr<class kj::ArrayPtr<class capnp::word const > const >)" (?writePackedMessage@capnp@@YAXAEAVBufferedOutputStream@kj@@V?$ArrayPtr@$$CBV?$ArrayPtr@$$CBVword@capnp@@@kj@@@3@@Z) referenced in function uda_capnp_serialise [C:\Users\User\AppData\Local\Temp\tmpihsx7noe\build\al.vcxproj]
C:\Users\User\AppData\Local\Temp\tmpihsx7noe\build\Release\al.dll : fatal error LNK1120: 31 unresolved externals [C:\Users\User\AppData\Local\Temp\tmpihsx7noe\build\al.vcxproj]
*** CMake build failed
ERROR Backend subprocess exited when trying to invoke build_wheel
✕ 106.96s
cibuildwheel: error: Command ['C:\\Users\\User\\AppData\\Local\\Temp\\cibw-run-sza432az\\cp311-win_amd64\\build\\venv\\Scripts\\python.EXE', '-m', 'build', 'C:\\Users\\User\\GIT\\ITER\\iterorg\\imas-core', '--wheel', '--outdir=C:\\Users\\User\\AppData\\Local\\Temp\\cibw-run-sza432az\\cp311-win_amd64\\built_wheel'] failed with code 1.
I suspect something is off in the way I am setting it all up with vcpkg and cibuildwheels so that the linking goes awry after compiling succeeded? or is it the UDA backend code?
Please let me know what you need to look in to this.