Weird behavior when building sys crate with multiple make jobs in docker container #573
-
Hello, ProblemThe problem occurs when using corrosion to build a rust bin that relies on the SetupI am using the following build setup: My test application can be found here but is essentially hello world bin with a basic cmake. Here are my commands I use to build the bin.
This will fail with the following log. However this is where it gets weird, if I run the same command without Here is the log for I know that since this only appears to occur in Docker that the problem likely does not fall entirely on corrosion however I was hoping anyone might have some thoughts on this. Unfortunately running in Docker for our builds is a hard requirement so even though it works without that's not an option. I am wondering if this has something to do with the make jobserver not being handled correctly in the Docker image however if that was true I would have assumed that the basic C++ program would of also failed with Any help at all would be really really appreciated as this seems to be the last hangup in porting a lot of CMake magic over to corrosion. Thank you, Additional Info:Below is a table of test builds and their results
I have also tried setting cargo build flag if |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You use a top-level make (generated from cmake), which spawns a make job-server. |
Beta Was this translation helpful? Give feedback.
You use a top-level make (generated from cmake), which spawns a make job-server.
Which make version do you have inside and outside of docker? I know something changed in make 4.4 with regards to the job server.
I believe the child make process from lib-ffi-sys will try to respect the make jobserver from the parent make, but it seems there is a problem there. This can be due to buggy make code, but I'm not a make expert, so you'll have to due some digging yourself to find out whats going wrong with the jobserver.