UPPAALModelChecker / UUtils

The (spookiest) UPPAAL utility library
GNU General Public License v3.0
0 stars 2 forks source link

Does this library support Win32? #29

Open HansBug opened 2 days ago

HansBug commented 2 days ago

Does this library support Win32 compile?

I'm trying to create a cross-platform Python wrapper library for UUtils with pybind11, but when I was trying to compile it on Win32, the unittest in ctest command (just the command mentioned in README) failed: https://github.com/HansBug/pyuutils/actions/runs/12074240838/job/33671876202#step:4:595

Seems something wrong with win32. If win32 are not planned to get supported, we will give up supporting this arch.

BTW, our working progress:

  1. Linux, both x86_64/aarch64 passed compiling, PyPI wheel building and unittests
  2. Windows, AMD64 passed all those, but for Win32, unittest for UUtils failed
  3. MacOS, x86_64 passed all those, but for arm64 there is still something wrong with pypi wheel building.

And currently only a few functions (hash computations) supported, just for the very early try. We did these for academical purpose, and maybe we will create more wrappers for other uppaal cpp libraries in the future. Python libraries can significantly boost up the researches, experiments and open-source developments. So we may need some help from your official team.

HansBug commented 2 days ago

Some new attempts:

  1. I just tried many archs on linux (e.g. i686), most of them are well supported
  2. but something wrong on macos arm64 arch, but failed: https://github.com/HansBug/pyuutils/actions/runs/12075076585/job/33674231945#step:4:429 ctest failed. and the xxhash library's compile arch seems to be x86_64, i have tried all what i can do to fix that, but failed.

So I decide to give up the support for macos arm64 temporarily, if you are willing to support macos arm64 plz let me know, I think maybe the cmake scripts of UUtils may need some changes.

Also I found that in compile.sh of UUtils, only x86 archs are officialy supported. LoL

mikucionisaau commented 2 days ago

UUtils contains some platform specific code (like measuring CPU and memory consumption), so it is not portable out of the box.

We use MINGW to cross-compile for Windows (also available on most Linux distributions). The 32bit builds used to work, but we abandoned them some time ago as there is no use for it.

Your macos arm64 logs show that the build succeeded, but tests have failed.

We haven't ported to arm64 yet (I've got arm64 mac only a month ago, and given the Apple attitude it looks like a massive waste of time and resources).

mikucionisaau commented 2 days ago

May I ask what are you trying to achieve? UUtils are low level utilities used by other C++ libraries, I don't think there is anything interesting for python.

HansBug commented 1 day ago

UUtils contains some platform specific code (like measuring CPU and memory consumption), so it is not portable out of the box. We use MINGW to cross-compile for Windows (also available on most Linux distributions). The 32bit builds used to work, but we abandoned them some time ago as there is no use for it.

Got it. We will stop trying win32 build.

We haven't ported to arm64 yet (I've got arm64 mac only a month ago, and given the Apple attitude it looks like a massive waste of time and resources).

The same, when you plan to support that plz let me know.

May I ask what are you trying to achieve? UUtils are low level utilities used by other C++ libraries, I don't think there is anything interesting for python.

Well, actually we are planning to create python wrapper for UDBM and other C++ libs of uppaal, we are building devops on github action. We are currently not familiar enough to all the source code & project structure of UDBM, so we selected a simpler one (UUtils) as experimental attempt.

We know that the UUtils is just a utils library for other libs. So after we completed the github action workflow, we will try to create UDBM python wrapper libraries, that is useful for academical usages because python has really much scientific libs supported.

HansBug commented 1 day ago

one more thing, there is something wrong with compiling on windows-amd64.

in code https://github.com/UPPAALModelChecker/UUtils/blob/main/src/base/platform.c#L59 this means only mingw compiler supported (otherwise the function base_getMemInfo will gone, i tried with compiling on visual studio and met that problem)

but, when i tried to compile it on windows gcc/g++, the ctest will fail, the failed cases are all runtime errors with exit codes

this issue is in src/base/platform.c, and due to the relationship between UDBM and UUtils, i think this issue should be solved, otherwise the wrapping for UDBM will fail as well.