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

Windows RISC-V build can be fixed #8

Closed
ndabas opened this issue Nov 25, 2024 · 5 comments · Fixed by #9
Closed

Windows RISC-V build can be fixed #8

ndabas opened this issue Nov 25, 2024 · 5 comments · Fixed by #9

Comments

@ndabas
Copy link
Contributor

ndabas commented Nov 25, 2024

I was looking at this commit and the associated Actions run.

I saw something similar in my own experiments, and it sounds completely unrelated, but the issue can be fixed by setting core.autocrlf to false in the git config. On Windows the build.ps1 file is used to clone needed repos so you could likely just add -c core.autocrlf=false to the command line there:

exec { git clone -b "$($_.tree)" --depth=1 -c advice.detachedHead=false "$($_.href)" "$repodir" }

(Or set it globally beforehand, it's a throwaway CI runner.)

@ndabas
Copy link
Contributor Author

ndabas commented Dec 1, 2024

I actually tried this and got it to work. The key elements are:

  • The build uses file names that are too long for most tools on Windows to handle, so I had to subst the working directory to a drive to shorten the paths.
  • MSYS2 makes deep copies instead of symlinks by default, but this can be easily changed with an environment variable. (MSYS = "winsymlinks:nativestrict")
  • I added the base-devel package to MSYS2 and cleaned up some of the others that were added in the test in this repo.

The last few commits of the PR linked above have the needed changes. Let me know if this is something you'd want and I can create a PR for it. I understand that there is a functional way to get a build for Windows already, but it's not 100% consistent with the build for Linux.

@will-v-pi
Copy link
Contributor

Thanks - those do look like useful fixes, so if you could raise a PR that would be great

@ndabas
Copy link
Contributor Author

ndabas commented Dec 5, 2024

Sure -- will raise a PR in the next few days.

I also noticed that the build_linux.sh and setup.ps1 scripts are largely the same, functionally (the only major difference is how the dependencies are installed) -- do you mind if I refactor the code a bit so that we don't need setup.ps1 at all, and just use a common (sh) script on both Linux and Windows?

@will-v-pi
Copy link
Contributor

I think a refactor would probably be better in a separate PR? Also, you could probably combine the build_macos.sh to make a single build.sh script that runs cross platform

@ndabas
Copy link
Contributor Author

ndabas commented Dec 14, 2024

Okay, thanks, I've created a PR for this.

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

Successfully merging a pull request may close this issue.

2 participants