# MAKE_JOBS_UNSAFE



## PacketMan (Dec 28, 2015)

Rather than hijack another discussion.



wblock@ said:


> MAKE_JOBS_UNSAFE effectively means "this port fails to build with multiple jobs, so use only one".  And this setting should almost never be needed now, it was from a time when the ports tree was converted to use multiple jobs years ago.  (Yes, it is mentioned when a port fails to build.  That mention is misleading and should be changed.



This got my attention.  I am finding I have port builds failing more often than I expected, particularly so on my x11/gnome3 desktop machine, with the output suggesting I build with the MAKE_JOBS_UNSAFE option flag set. Wblock you mention that output is misleading and should be changed, but to what? I ask that because when this issue occurs, my setting the MAKE_JOBS_UNSAFE option flag works; the port build completes.

How often is "more often than I expected"? I would say almost every time I update the ports tree on my x11/gnome3 desktop machine and then follow through with the `portmaster -a` (plus some other option flags) at least one port getting upgraded aborts with the MAKE_JOBS_UNSAFE comment.  But maybe in perspective, this being a desktop machine with a big desktop package installed, plus a bunch of other user programs, maybe a port or two failing for this reason is "almost never be needed now".


----------



## talsamon (Dec 28, 2015)

`portmaster -m MAKE_JOB_UNSAF=YES`. But `MAKE_JOBS_UNSAFE` change very seldom anything.


----------



## wblock@ (Dec 28, 2015)

PacketMan said:


> Wblock you mention that output is misleading and should be changed, but to what?


When that was added, building ports with multiple jobs was a new thing.  The few ports that do not build with multiple jobs are supposed to have MAKE_JOBS_UNSAFE set in their Makefile.  Because it was a new thing, problems were often due to it, so the message was added to the toolchain.

That all happened several years ago.  Now, when a build fails, it is usually not caused by multiple jobs.  So the message is misleading.

It might make more sense to tell the user to build again with MAKE_JOBS_NUMBER=1 so that errors from multiple jobs are not all mixed together in the output.


----------



## PacketMan (Dec 28, 2015)

wblock@ said:


> Now, when a build fails, it is usually not caused by multiple jobs.  So the message is misleading.



I will have to look at my messages closer.  So what would cause a build job to fail, where support for multiple jobs is not the issue, yet setting the the MAKE_JOBS_UNSAFE option flag causes it to build successfully?


----------



## wblock@ (Dec 28, 2015)

Maybe you found the rare instance where that is a problem.  Or maybe it just hides the real problem.


----------



## PacketMan (Dec 28, 2015)

Maybe, but like I said, this happens often when I do port updates, more so on the machines with lots of more ports installed.


----------



## SirDice (Dec 28, 2015)

Perhaps it's running out of disk space and/or memory if there are multiple jobs running at the same time?


----------



## wblock@ (Dec 29, 2015)

Or maybe there is one specific port on those machines that really does need MAKE_JOBS_UNSAFE.


----------



## PacketMan (Dec 29, 2015)

wblock@ said:


> Or maybe there is one specific port on those machines that really does need MAKE_JOBS_UNSAFE.



I'm inclined to this this is what is going on, certainly not disk space issue, and I will watch memory next time, but I doubt it.


----------



## protocelt (Dec 29, 2015)

If this is an older machine, it might also be a good idea to test the system memory. That could also cause odd issues like this.


----------



## PacketMan (Dec 29, 2015)

I see this happening on multiple machines.  Next time it happens I will try to post in here which port is burping back.


----------



## RichardM (Dec 31, 2015)

I've also seen this message appearing with port build failures, something like 1 in 500 port builds. As said above, it hides the real issue. The solution I found was to use the quarterly branch of the ports tree (just updated for errors and security issues), which seems more stable than HEAD. Today, just finished building 1272 desktop/multimedia/scientific ports (inc. libreoffice, kde, gimp, R, firefox, TeX, virtualbox) from the 2015Q4 branch with no errors, whereas when I was building from HEAD, there would be ~4 failures with the MAKE_JOBS_UNSAFE message.


----------

