-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Re-add actions to build xmake with cosmocc #6010
Comments
I tried it before, but it still has many problems, such as it will stuck on macos ci and some windows api problems. But I don't have time to solve them recently, so I can only delete it temporarily. If you can solve these problems, you can submit a PR. |
I managed to built xmake in the CI but one of the test fails, I don't know if this is due to cmake or not.
https://github.com/A2va/xmake/blob/cosmocc-ci/.github/workflows/cosmocc.yml |
I don't know why. I haven't had time to look at it, but if you can get it to pass on all ci tests, you can open a PR to rebuild xmake with cosmocc binary |
I just updated my fork to the latest commit of the master branch and ran to both linux and cosmocc ci. Both fail on the same test, which seems to indicate that xmake cosmocc is acting the same as the regular one. What is weird is that the same test on the xmake main repo with the linux ci passes.
Linux: https://github.com/A2va/xmake/actions/runs/12675795887/job/35327578205#step:8:944 |
I don't know why. you can diff ci yml. |
The PR #6065 seems to have the test problem I was getting on my fork, so I made a PR to add a cosmocc action. There is still this windows crash that I need to resolve. At first I tought that it was a missing stub in the win32 api of cosmocc, but that does not seems the case. Lines 383 to 398 in 58c00fc
And so the winos function doesn't get registered with ``xm_lua_register'', and it returns nil. Line 1356 in 58c00fc
I tried to build in debug, to see if the stacktrace tells a bit more
How can I fix this ? |
I don't know how cosmocc calls the windows api。 |
They have a windows.h as well as some stub functions for win32 I will try to compile the winos module with cosmocc, and adding some check at runtime in the lua script to verify that is runs on windows. |
Is your feature request related to a problem? Please describe.
Previously, a workflow was created to build xmake with cosmocc
https://github.com/xmake-io/xmake/blob/b657911e2b0c34674570368c73c5025eff9d7649/.github/workflows/cosmocc.yml
However, this was not successful as it didn't run, but I noticed that this build was made using macos, so I tried to build it on linux.
First, I just tested that a normal xmake build (without embed) would work
The executable runs fine, then I enabled embed
Again, no problem with the executable, then I copied the file to Windows (the build was done in WSL Ubuntu). And it starts, but with this error:
I suspect this is because Cosmopolitan doesn't implement the Windows API for editing the registry, but those can added if needed (eg: jart/cosmopolitan#1318), or the other solution would be to completely disable this functionality.
Describe the solution you'd like
With this feature the xmake bundle executable which is for now windows only could be extended to other platforms.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: