Can't build project - too many open files when linking #1292
-
EnvironmentmacOS 13.4.1 running Colima (with a VM with 4GBs of RAM and 4 cores). Colima is started like so: colima start --cpu 4 --memory 4 --disk 50 --ssh-agent --mount-type 9p IssueWhen I run a build for a package I get some
If I try to build over and over again, eventually I make it through the list of dependencies. Sometimes during linking I get the following error.
Note that in the example above the error is for One error I can't get around in one project is the final linking step of the binary. It always fails with an error just like the one above, but for the main package. Importantly, this issue arose after the project reached a certain size (just a few KLOC, but with larger dependencies such as zbus, image, imageproc etc.). I've been able to use cross many times with the current setup. Things I've tried
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Does changing ulimit change anything when done in the container? try # Cross.toml
[build]
pre-build = ["ulimit -n 1024000"] |
Beta Was this translation helpful? Give feedback.
-
I've found a solution. As I'd ruled out just about everything else, I started to blame the virtual file system in use by colima. Sure enough, when I moved away from using 9p and started to use virtiofs instead in a vz type VM, things went better. I had to first remove my current colima instance. colima delete Then, I started a new instance. colima start --cpu 4 --memory 4 --disk 50 --ssh-agent --mount-type virtiofs --vm-type=vz |
Beta Was this translation helpful? Give feedback.
I've found a solution. As I'd ruled out just about everything else, I started to blame the virtual file system in use by colima. Sure enough, when I moved away from using 9p and started to use virtiofs instead in a vz type VM, things went better.
I had to first remove my current colima instance.
Then, I started a new instance.