Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix lua tests on windows #10919

Open
kLabz opened this issue Jan 5, 2023 · 6 comments
Open

[CI] Fix lua tests on windows #10919

kLabz opened this issue Jan 5, 2023 · 6 comments
Milestone

Comments

@kLabz
Copy link
Contributor

kLabz commented Jan 5, 2023

Lua tests have been fixed in #10916, but are still failing on windows.

Current attempt at fixing CI for windows is making progress but is not there yet. @inklit if you give up please provide some informations about what problems you faced / what you tried so far..

I'm disabling lua tests on windows again until this is fixed; at least now lua tests are running on unix 👍

@inklit
Copy link
Contributor

inklit commented Jan 5, 2023

Here's the current state:
In order for tests to work on Windows, we need to link libopenssl, libpcre, and libuv with the current Lua runtime.

libopenssl is relatively straight forward: we just install it from choco and then set the openssl directory.
libpcre is a bit not as straight forward, we can install it from msys2's pacman, but have to install msys2 first, then we can directly set the libpcre directory as well.

My PR does both of these, although the catch is: you need to install the correct ARCH version of these libs, and the directories will be different on 32 bit vs. 64 bit, so my current PR only supports 64 bit. This is easy to address after we figure out what else is broken.

There is another issue (hopefully the last...) related to libuv. During the installation of libuv, the luarocks config is providing an incorrect location for liblua:

- Lua: using information from luarocks
-- LUA_LIBDIR: C:\Users\runneradmin\haxe-ci\lua_env\lua-l5.1\bin

^this should actually be \lib, it seems it got bindir and libdir mixed up, which results in this error:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LUA_LIBRARIES
    linked by target "luv" in directory C:/Users/runneradmin/AppData/Local/Temp/luarocks_luv-1.36.0-0-442/luv-1.36.0-0
CMake Generate step failed.  Build files cannot be regenerated correctly.

@l0go
Copy link

l0go commented Jan 6, 2023

Would it be better to get libpcre into Choco's repo? Not too familiar with it.

@inklit
Copy link
Contributor

inklit commented Jan 6, 2023

Would it be better to get libpcre into Choco's repo? Not too familiar with it.

It would be faster, for sure.

FYI, I was able to fix libpcre, libuv, and libopenssl, but now our own hx-lua-simdjson library is failing to build, and at this point I give up because this repository is abandoned, never had 32 bit support, and likely never built properly for MingGW.

@Simn Simn added this to the Later milestone Mar 24, 2023
@tobil4sk
Copy link
Member

hx-lua-simdjson library is failing to build, and at this point I give up because this repository is abandoned, never had 32 bit support, and likely never built properly for MingGW.

We could try to update hx-lua-simdjson with a newer version from https://github.com/simdjson/simdjson, but it might take some work. Seems there is some chance that 32 bit works: simdjson/simdjson#742 (comment)

@tobil4sk
Copy link
Member

I've sent some upstream patches to lua-simdjson which allow it to compile both on windows and on unix: FourierTransformer/lua-simdjson#82. Previous patches got windows working but broke mac/linux builds.

If we can have a HaxeFoundation/hx-lua-simdjson repo, we can pull these changes in from upstream and maybe get further with this.

@tobil4sk
Copy link
Member

tobil4sk commented Oct 8, 2024

I had to send a few more bug fixes upstream to get the haxe unit tests passing, but everything seems to be working now! Windows support in hx-lua-simdjson is now available with this PR: HaxeFoundation/hx-lua-simdjson#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants