Miscellaneous > Technical Support

Dual core madness; Make -j never works

<< < (2/2)

toadlife:
distcc wouldn't work because it uses the same -j switch that regular make does.

After going over what I know about the FreebSD ports systems, I know why it doesn't work now. FreeBSD uses 'make' to do every step of port installation.

When you are in a ports directory there are four main steps in installing a port. I might be leaving steps out here, but this is the jist of it...

1) make fetch
2) make configure
3) make build
4) make install

If you type 'make install', it actually implies, `make fetch configure build install'

If you say 'make install -j2', then make will try to do the first two jobs at the same time - fetch and configure. Ooops! That can't work because you have to fetch what you are configuring first.

Hopefully port makers can override the -j setting in their ports or the FreeBSD dev team can fix the ports system to override the -j switch until the compilation actually starts.

Orethrius:
So it sounds like the BSD installer is setup to symlink to a bunch of other functions - why not configure it to pass the -j2 switch to 'make build' only; or, failing that, make your own installer script?  It doesn't sound like it'd be that difficult.

toadlife:
No everything is done with 'make', thus the makefile cotrols the entire process. I've talked to some other BSD users and as far as they know the only way to fix it is to fix the ports induvidually.

Oh well.

KernelPanic:
Moving to Tech Support.

toadlife:

--- Quote from: KernelPanic ---Moving to Tech Support.
--- End quote ---

Hmmm, I wasn't asking for help with this but...ok. I just wanted to know if other package management systems that compiled programs had this problem.



Anyway, I think I figured it out. You can set `MAKE_ARGS=-j3` in your /etc/Make.conf and the -j switch only activates on build part of installing a port. So far it seems to work. :)

Navigation

[0] Message Index

[*] Previous page

Go to full version