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

Opam for windows: make compiler does not honor -j argument #5856

Open
Chimrod opened this issue Feb 25, 2024 · 6 comments
Open

Opam for windows: make compiler does not honor -j argument #5856

Chimrod opened this issue Feb 25, 2024 · 6 comments

Comments

@Chimrod
Copy link

Chimrod commented Feb 25, 2024

I’m compiling opam in a virtual windows machine. I’ve assigned a limited number of cores to that virtual machine, and the compilation freeze during the step make compiler. As consequence, I need to open the task manager and manually kill the process x86_64-w64-mingw32-gcc.

After some tries and restart, I’ve found that the script bootstrap-ocaml.sh override the -j argument given to the original make job. It looks likes make detect here the number of core for the hardware cpu, and create too many processes and fall into race condition which bloc the whole compilation task.

After editing the script and removing the -j argument given in the make commands I’ve been able to compile the task without any issue.

@kit-ty-kate kit-ty-kate added this to For RC in Opam 2.2.0 Feb 26, 2024
@kit-ty-kate
Copy link
Member

kit-ty-kate commented Feb 29, 2024

I'm suddenly having the same issue after upgrading cygwin to the latest version (3.5.1), it was working just fine minutes before on the same machine but after the upgrade i deterministically can't compile OCaml anymore.. sigh

@kit-ty-kate
Copy link
Member

I sent a bug-report to the Cygwin bug-tracker: https://cygwin.com/pipermail/cygwin/2024-February/255561.html

@dra27
Copy link
Member

dra27 commented Mar 1, 2024

Me too - thanks for reporting! Just as a data point, I had been using Cygwin 3.5.0 on bare metal with no problems to build OCaml (this was in opam itself), but I hadn't run make cold. Are you both using VMs? My desktop has a crazy high core count, but I'm seeing the same problem in a Hyper-V VM even with 16 vCPUs (-j16 is about the best parallelism OCaml's build can achieve anyway).

@kit-ty-kate
Copy link
Member

No i'm on baremetal (4core machine on Intel i5-750)

@kit-ty-kate kit-ty-kate removed this from For RC in Opam 2.2.0 Apr 3, 2024
@kit-ty-kate
Copy link
Member

Cygwin 3.5.3 was just released and should have fixed the underlying bug.

The lack of parametricity for make compiler is still a problem though but not urgently to be fixed before the 2.2.0 release so I've removed it from the 2.2.0 project. We can fix that later.

If you're still experiencing the underlying Cygwin bug with the new release though please don't hesitate to tell us and we'll look into it.

@Chimrod
Copy link
Author

Chimrod commented Apr 4, 2024

Thank you for keeping me informed and your involvement in a general way, this is very appreciated :)

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

3 participants