MAKEOPTS doesn't work in make.conf

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

MAKEOPTS doesn't work in make.conf

Postby kenorb » 09 Nov 2010, 16:02

I've added following lines into make.conf
Code: Select all
MAKEOPTS="-j8"


But it doesn't work.

Tested on:
Code: Select all
> sudo portupgrade -f mtr

Code: Select all
> sudo portupgrade -f sl


Why?
It's a bug or feature?

P.S. Could find anything in: man make.conf
> uname -a
FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #0: Tue Oct 19 15:28:55 BST 2010 root@kenorb:/usr/obj/usr/src/sys/BRO amd64
kenorb
Member
 
Posts: 330
Joined: 20 Oct 2010, 11:32
Location: London

Postby graudeejs » 09 Nov 2010, 16:10

[man=5]make.conf[/man] doesn't say anything about MAKEOPTS
User avatar
graudeejs
Style(9) Addict
 
Posts: 4591
Joined: 16 Nov 2008, 23:23
Location: Riga, Latvia

Postby SirDice » 09 Nov 2010, 16:12

kenorb wrote:Why?

Because it's a Linux option.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16153
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby graudeejs » 09 Nov 2010, 16:15

SirDice wrote:Because it's a Linux option.


I thought I've heard about this option, but wasn't sure.
Now I remember, I've been using it myself on GNU/Linux Gentoo :)
User avatar
graudeejs
Style(9) Addict
 
Posts: 4591
Joined: 16 Nov 2008, 23:23
Location: Riga, Latvia

Postby wblock@ » 09 Nov 2010, 16:19

In FreeBSD's [file]/etc/make.conf[/file] that would be
Code: Select all
MAKE_JOBS_NUMBER=8


At least for ports, I don't think that affects other source.
User avatar
wblock@
Old Fart
 
Posts: 10163
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby kenorb » 09 Nov 2010, 16:35

wblock wrote:In FreeBSD's [file]/etc/make.conf[/file] that would be
Code: Select all
MAKE_JOBS_NUMBER=8


At least for ports, I don't think that affects other source.


Code: Select all
> man make.conf | less +/MAKE_JOBS_NUMBER
Pattern not found  (press RETURN)
Why is not documented or where it's?
> uname -a
FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #0: Tue Oct 19 15:28:55 BST 2010 root@kenorb:/usr/obj/usr/src/sys/BRO amd64
kenorb
Member
 
Posts: 330
Joined: 20 Oct 2010, 11:32
Location: London

Postby SirDice » 09 Nov 2010, 16:39

kenorb wrote:Why is not documented or where it's?

Read [file]/usr/ports/Mk/bsd.port.mk[/file].
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16153
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby kenorb » 09 Nov 2010, 16:41

Following posts in this forum point to that variable:
http://forums.freebsd.org/showthread.php?p=1886#post1886
http://forums.freebsd.org/showthread.php?p=17289#post17289
http://forums.freebsd.org/showthread.php?p=96467#post96467 (it kind of works?)
http://forums.freebsd.org/showthread.php?p=100851#post100851
http://forums.freebsd.org/showthread.php?p=107599#post107599
http://forums.freebsd.org/showthread.php?p=10561#post10561 (even to MAKEOPT)

And found thousands of examples in [url=http://www.google.co.uk/search?q="MAKEOPTS%3D"+make.conf+FreeBSD]Google[/url].

How it's possible that it doesn't work and even that half of the people have it in make.conf?
They all are wrong?
> uname -a
FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #0: Tue Oct 19 15:28:55 BST 2010 root@kenorb:/usr/obj/usr/src/sys/BRO amd64
kenorb
Member
 
Posts: 330
Joined: 20 Oct 2010, 11:32
Location: London

Postby kenorb » 09 Nov 2010, 16:44

Code: Select all
# Multiple make jobs support
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
_MAKE_JOBS=             #
.else
.if defined(MAKE_JOBS_SAFE) || defined(FORCE_MAKE_JOBS)
MAKE_JOBS_NUMBER?=      `${SYSCTL} -n kern.smp.cpus`
_MAKE_JOBS?=            -j${MAKE_JOBS_NUMBER}
.if defined(FORCE_MAKE_JOBS) && !defined(MAKE_JOBS_SAFE)
BUILD_FAIL_MESSAGE+=    "You have chosen to use multiple make jobs (parallelization) for all ports.  This port was not tested for this setting.  Please remove FORCE_MAKE_
JOBS and retry the build before reporting the failure to the maintainer."
.endif
.endif
.endif

That mean you need to define MAKE_JOBS_SAFE or FORCE_MAKE_JOBS, to define MAKE_JOBS_NUMBER?
> uname -a
FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #0: Tue Oct 19 15:28:55 BST 2010 root@kenorb:/usr/obj/usr/src/sys/BRO amd64
kenorb
Member
 
Posts: 330
Joined: 20 Oct 2010, 11:32
Location: London

Postby SirDice » 09 Nov 2010, 16:47

kenorb wrote:That mean you need to define MAKE_JOBS_SAFE or FORCE_MAKE_JOBS, to define MAKE_JOBS_NUMBER?

Why don't you just read the remarks?

Code: Select all
##
# MAKE_JOBS_SAFE
#                               - This port can safely be built on multiple cpus in parallel.
#                                 The make will be invoked with -jX parameter where X equals
#                                 number of cores present in the system.
# MAKE_JOBS_UNSAFE
#                               - Disallow multiple jobs even when user set a global override.
#                                 To be used with known bad ports.
# DISABLE_MAKE_JOBS
#                               - Set to disable the multiple jobs feature.  User settable.
# FORCE_MAKE_JOBS
#                               - Force all ports to be built with multiple jobs, except ports
#                                 that are explicitly marked MAKE_JOBS_UNSAFE.  User settable.
# MAKE_JOBS_NUMBER
#                               - Override the number of make jobs to be used.  User settable.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16153
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby kenorb » 09 Nov 2010, 16:57

I've added into make.conf
Code: Select all
FORCE_MAKE_JOBS=yes
MAKE_JOBS_NUMBER=8


There is a nice make.conf:
http://www.bsdtips.org/index.php/My_make_conf
> uname -a
FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #0: Tue Oct 19 15:28:55 BST 2010 root@kenorb:/usr/obj/usr/src/sys/BRO amd64
kenorb
Member
 
Posts: 330
Joined: 20 Oct 2010, 11:32
Location: London

Postby graudeejs » 09 Nov 2010, 17:28

kenorb wrote:Following posts in this forum point to that variable:
http://forums.freebsd.org/showthread.php?p=1886#post1886
http://forums.freebsd.org/showthread.php?p=17289#post17289
http://forums.freebsd.org/showthread.php?p=96467#post96467 (it kind of works?)
http://forums.freebsd.org/showthread.php?p=100851#post100851
http://forums.freebsd.org/showthread.php?p=107599#post107599
http://forums.freebsd.org/showthread.php?p=10561#post10561 (even to MAKEOPT)

And found thousands of examples in [url=http://www.google.co.uk/search?q="MAKEOPTS%3D"+make.conf+FreeBSD]Google[/url].

How it's possible that it doesn't work and even that half of the people have it in make.conf?
They all are wrong?


Linuxis has deep roots
User avatar
graudeejs
Style(9) Addict
 
Posts: 4591
Joined: 16 Nov 2008, 23:23
Location: Riga, Latvia

Postby ckester » 09 Nov 2010, 20:24

killasmurf86 wrote:Linuxis has deep roots


Yep. Linuxisms are like kudzu.

Or English Ivy, if you're a Pacific Northwesterner like me. Forever climbing up the trunks of our trees and threatening to bring them down with all its extra weight. You should yank it out wherever you find it!

We must all be vigilant in order to preserve our ecosystems. Use only native plants ... and native BSD commands.

;)
User avatar
ckester
Member
 
Posts: 288
Joined: 30 Nov 2008, 01:18
Location: near Seattle, WA (USA)


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: No registered users and 0 guests