Share your make.conf and src.conf

Alain De Vos

Aspiring Daemon

Reaction score: 181
Messages: 693

make.conf :

CPUTYPE= ivybridge
MTREE_FOLLOWS_SYMLINKS= -L
OPTIONS_UNSET+= PULSEAUDIO PULSE ALSA JACK DEBUG
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,121
Messages: 35,597

Yep, most of these variables just need to be defined, their contents doesn't really matter.
 

rvaneijk

New Member


Messages: 1

I used the following /etc/make.conf in the past:

KERNCONF=MYKERNEL
.if ${.CURDIR:M*/usr/src/*} || ${.CURDIR:M*/usr/obj/*}
CFLAGS+= -O2 -fno-strict-aliasing -pipe
CXXFLAGS+= -O2 -fno-strict-aliasing -pipe
COPTFLAGS= -O2 -fno-strict-aliasing -pipe
.endif

I am aware that the default make is set to optimize, including the optimizations above.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,121
Messages: 35,597

Remove them, the kernel and userland sources already contain the most optimal compiler settings. Yours are only going to interfere with that. It will not result in "better" optimizations or any other measurable improvements. You're only more likely to run into problems.
 

debguy

Active Member

Reaction score: 20
Messages: 176

If/When you run into problems the first thing everybody is going to suggest is to remove /etc/make.conf and /etc/src.conf.

i agree, if your talking about "make World" (base system and or kernel, not a config of ports)

hacking security libs in from (ubuntu?) would be a virus thing to do and NOT something people with install questions should be considering in "install questions" thread (infact - i'd tell them never ever to hack those options at any time)

also: X.org is NOT X11 compatible it is an X12 (if you like i can prove that - x.org completely damages many X11 compatible softwares). if make.conf is for base or kernel builds not for ports - then X.org doesn't belong in it anywhere. X11 or X12 is not part of the "base system".

if your talking about a "make.conf" for ports then i'd say: there should be nothing in it since any port should expect and have the freedom that "there are no pre-conditions and restraints added" other than base system.
 

chrcol

Well-Known Member

Reaction score: 48
Messages: 457

I have observed a few things.

Code:
MAKE_JOBS_NUMBER
seems to be ignored in my testing in ports. Some ports will use multi make's regardless of this setting which might give the impression it works, but I have noticed various ports only use one make process, and as such build very slowly, unless I add something like
Code:
MAKE_ARGS+=-j4
in the make.conf. However I observed using the make flags modifier breaks some ports even with -j1, so it isn't safe so don't use it. Instead just have to put up with some ports compiling at snail's pace due to been stuck on one compile process.

Also
Code:
OPTIONS_SET
been dead for me since the day dialog boxes were added for options, again completely ignored by ports. Unless it acts as an override (overriding what's selected in dialog box rather than affecting default selections).
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,121
Messages: 35,597

Unless it acts as an override (overriding what's selected in dialog box rather than affecting default selections).
It acts as an override.
 

chrcol

Well-Known Member

Reaction score: 48
Messages: 457

ok that explains that then, thanks.

any thoughts on my make jobs observations?

Two example port's are 'exim' and 'percona57-server'. 'exim' actually breaks with multi make's so maybe that one is forcefully made one make process only for safety, but percona doesn't, and just uses one make process ignoring the make jobs variable.
 

Alain De Vos

Aspiring Daemon

Reaction score: 181
Messages: 693

What I find weird is that if you don't want zfs you need to put it in src.conf and not in the kernel configfile
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,121
Messages: 35,597

ZFS has always been a module and can't be statically linked in it (don't know why, it's what I've understood from it). Everything is actually built as a module, the kernel config simply defines which modules are statically linked into it. The setting in src.conf defines whether or not you want to build the code at all.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,121
Messages: 35,597

In linux I could understand it as a license thing.
That's certainly not the case on FreeBSD, the CDDL is compatible enough with the BSD license.

If I recall correctly it was a technical issue but don't know the exact details. It probably has something to do with its dependency on the OpenSolaris layer.
 

chrcol

Well-Known Member

Reaction score: 48
Messages: 457

Use something like ports-mgmt/poudriere or ports-mgmt/synth to build your own packages with your own options/defaults. Much easier to use.

Yeah I recently started looking into synth, I however only like to use software I have experience with and can configure how I want, so I am not quite ready to be using synth yet, but its definitely on my TODO list.

Back on to the subject at hand though, the make.conf, I am curious if this has been deliberately disabled in code, a bug or I have simply broken it with my configuration. I have managed to now get 'MAKE_ARGS' working well, and if any ports such as mail/exim which require strict ordering, then I found '.undef MAKE_ARGS' does the job. Its not the documented method but for whatever reason 'MAKE_JOBS_NUMBER' seems to now be defunct.
 

farson

New Member


Messages: 2

Hopefully I don't wreck it...

I wanted to move my big list from NanoBSD but it was stale. So I started over on FreeBSD 12.
This is so minimal I don't recommend it for anyone without maximum caution. Firewalls removed.
I don't use a src.conf. I am building images from a custom makefile directory, modified from /usr/src/release.
I copy my /etc/make.conf in to position after building world and kernel.
The below makefile WITHOUT_ directives were found in /usr/src/tools/build/options/
/etc/make.conf
Code:
TARGET_ARCH=amd64
TARGET_CPUTYPE=amd64
TARGET=amd64
#######  FROM FREEBSD 12.0-STABLE SOURCE r342891  ##########
WITHOUT_ACCT=
WITHOUT_AMD=
WITHOUT_APM=
WITHOUT_ASSERT_DEBUG=
WITHOUT_AT=
WITHOUT_ATM=
WITHOUT_AUDIT=
WITHOUT_AUTHPF=
WITHOUT_AUTOFS=
WITHOUT_AUTO_OBJ=
WITHOUT_BHYVE=
WITHOUT_BINUTILS=
WITHOUT_BINUTILS_BOOTSTRAP=
WITHOUT_BLACKLIST_SUPPORT=
WITHOUT_BLUETOOTH=
WITHOUT_BMAKE=
WITHOUT_BOOTPARAMD=
WITHOUT_BOOTPD=
WITHOUT_BSDINSTALL=
WITHOUT_BSD_CPIO=
WITHOUT_BSNMP=
WITHOUT_BZIP2=
WITHOUT_BZIP2_SUPPORT=
WITHOUT_CALENDAR=
WITHOUT_CCD=
WITHOUT_CDDL=
WITHOUT_CLANG=
WITHOUT_CLANG_BOOTSTRAP=
WITHOUT_CLANG_FULL=
WITHOUT_CLANG_IS_CC=
WITHOUT_CPP=
WITHOUT_CROSS_COMPILER=
WITHOUT_CTM=
WITHOUT_CUSE=
WITHOUT_CVS=
WITHOUT_CXGBETOOL=
WITHOUT_DEBUG_FILES=
WITHOUT_DIALOG=
WITHOUT_DICT=
WITHOUT_DMAGENT=
WITHOUT_DOCCOMPRESS=
WITHOUT_DYNAMICROOT=
WITHOUT_ED_CRYPTO=
WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=
WITHOUT_EXAMPLES=
WITHOUT_FDT=
WITHOUT_FINGER=
WITHOUT_FLOPPY=
WITHOUT_FMTREE=
WITHOUT_FORMAT_EXTENSIONS=
WITHOUT_FORTH=
WITHOUT_FP_LIBC=
WITHOUT_FREEBSD_UPDATE=
WITHOUT_FTP=
WITHOUT_GAMES=
WITHOUT_GCC=
WITHOUT_GCC_BOOTSTRAP=
WITHOUT_GCOV=
WITHOUT_GDB=
WITHOUT_GDB_LIBEXEC=
WITHOUT_GNUCXX=
WITHOUT_GNU_DIFF=
WITHOUT_GNU_GREP_COMPAT=
WITHOUT_GPIO=
WITHOUT_GPL_DTC=
WITHOUT_HAST=
WITHOUT_HTML=
WITHOUT_HYPERV=
WITHOUT_ICONV=
WITHOUT_INCLUDES=
WITHOUT_INET6=
WITHOUT_INET6_SUPPORT=
WITHOUT_INFO=
WITHOUT_INSTALLLIB=
WITHOUT_IPFILTER=
WITHOUT_IPFW=
WITHOUT_ISCSI=
WITHOUT_JAIL=
WITHOUT_KDUMP=
WITHOUT_KERNEL_RETPOLINE=
WITHOUT_KERNEL_SYMBOLS=
WITHOUT_KVM=
WITHOUT_KVM_SUPPORT=
WITHOUT_LIB32=
WITHOUT_LIBCPLUSPLUS=
WITHOUT_LLD=
WITHOUT_LLDB=
WITHOUT_LLD_BOOTSTRAP=
WITHOUT_LLD_IS_LD=
WITHOUT_LLVM_COV=
WITHOUT_LLVM_TARGET_AARCH64=
WITHOUT_LLVM_TARGET_ALL=
WITHOUT_LLVM_TARGET_ARM=
WITHOUT_LLVM_TARGET_MIPS=
WITHOUT_LLVM_TARGET_POWERPC=
WITHOUT_LLVM_TARGET_SPARC=
WITHOUT_LLVM_TARGET_X86=
WITHOUT_LOADER_GELI=
WITHOUT_LOADER_OFW=
WITHOUT_LOADER_UBOOT=
WITHOUT_LOCALES=
WITHOUT_LOCATE=
WITHOUT_LPR=
WITHOUT_LS_COLORS=
WITHOUT_LZMA_SUPPORT=
WITHOUT_MAIL=
WITHOUT_MAILWRAPPER=
WITHOUT_MAKE=
WITHOUT_MAKE_CHECK_USE_SANDBOX=
WITHOUT_MAN=
WITHOUT_MANCOMPRESS=
WITHOUT_MAN_UTILS=
WITHOUT_MLX5TOOL=
WITHOUT_MODULE_DRM=
WITHOUT_MODULE_DRM2=
WITHOUT_NAND=
WITHOUT_NCP=
WITHOUT_NDIS=
WITHOUT_NETCAT=
WITHOUT_NETGRAPH=
WITHOUT_NETGRAPH_SUPPORT=
WITHOUT_NLS=
WITHOUT_NLS_CATALOGS=
WITHOUT_NS_CACHING=
WITHOUT_NTP=
WITHOUT_PC_SYSINSTALL=
WITHOUT_PF=
WITHOUT_PMC=
WITHOUT_PORTSNAP=
WITHOUT_PPP=
WITHOUT_PROFILE=
WITHOUT_QUOTAS=
WITHOUT_RADIUS_SUPPORT=
WITHOUT_RBOOTD=
WITHOUT_REPRODUCIBLE_BUILD=
WITHOUT_RESCUE=
WITHOUT_ROUTED=
WITHOUT_SENDMAIL=
WITHOUT_SERVICESDB=
WITHOUT_SETUID_LOGIN=
WITHOUT_SHAREDOCS=
WITHOUT_SOURCELESS=
WITHOUT_SOURCELESS_HOST=
WITHOUT_SOURCELESS_UCODE=
WITHOUT_SSP=
WITHOUT_SVNLITE=
WITHOUT_SYMVER=
WITHOUT_SYSCONS=
WITHOUT_SYSTEM_COMPILER=
WITHOUT_SYSTEM_LINKER=
WITHOUT_TALK=
WITHOUT_TCP_WRAPPERS=
WITHOUT_TELNET=
WITHOUT_TESTS=
WITHOUT_TESTS_SUPPORT=
WITHOUT_TEXTPROC=
WITHOUT_TFTP=
WITHOUT_TIMED=
WITHOUT_TOOLCHAIN=
WITHOUT_UNBOUND=
WITHOUT_UNIFIED_OBJDIR=
WITHOUT_USB_GADGET_EXAMPLES=
WITHOUT_UTMPX=
WITHOUT_VI=
WITHOUT_WARNS=
WITHOUT_WIRELESS=
WITHOUT_WIRELESS_SUPPORT=
WITHOUT_WPA_SUPPLICANT_EAPOL=
WITHOUT_ZFS=
WITHOUT_ZONEINFO=



How low can you go?? I have mine down to 205MB for starting embedded builds.
# ls -ll /usr/obj/usr/src/amd64.amd64/custom/memstick.img
-rw-r--r-- 1 root wheel 205103616 Jun 6 21:45 /usr/obj/usr/src/amd64.amd64/custom/memstick.img

This is as low as I can go with networking, sshd and dhclient available. I can install software with pkg.
How awesome is it that FreeBSD is so configurable.

Hi,[USER=47099]Phishfry[/USER]
Thanks for your share.
I'm trying to build a nano image and am very excited to see your sharing
but I try to use it for FreeBSD 12.1, it's not working it.


Code:
ld: error: unable to find library -legacy
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1


so. I try to find and fix it.
remove the line for make.conf
WITHOUT_INSTALLLIB=

but...

Code:
/usr/src/contrib/libunwind/src/libunwind.cpp:18:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
1 error generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib/libgcc_eh
*** Error code 1



I don't know how to solve it, can you share the nano world configuration file that supports 12.1?
thanks.
 

Phishfry

Beastie's Twin

Reaction score: 2,166
Messages: 5,098

I have not worked with custom 12.1 yet.
To solve this problem I would start by removing all the compiler specific settings
 

luckied

New Member

Reaction score: 1
Messages: 2

Sure, I'll bite!

ghost% cat /etc/make.conf
Code:
CPUTYPE?=haswell
#CFLAGS=-O2 -pipe -fno-strict-aliasing
#COPTFLAGS=-O2 -pipe -fno-strict-aliasing
MALLOC_PRODUCTION="YES"
MAKE_JOBS_NUMBER=4

# CC
CC=/usr/local/bin/clang80
CXX=/usr/local/bin/clang++80
CPP=/usr/local/bin/clang-cpp80
#LD=/usr/local/bin/ld

# Ports stuffs
#FORCE_MAKE_JOBS=YES
DEFAULT_VERSIONS+=    ssl=libressl python=3.8 python3=3.8 perl5=5.30 llvm=8.0
DEVELOPER=YES
OPTIONS_SET+=SAFESTACK CFIHARDEN IPV6 SSL PERL TCL \
             PYTHON THREADS MANPAGES OPENSSL PCRE
OPTIONS_UNSET+=DEBUG DOCS EXAMPLES GNUTLS
WITH_CCACHE_BUILD="yes"

ghost% cat /etc/src.conf


ghost% cat /etc/src.conf
Code:
WITH_CCACHE_BUILD=
WITHOUT_AMD=
WITHOUT_ASSERT_DEBUG=
WITHOUT_CLANG=
WITHOUT_FLOPPY=
WITHOUT_FREEBSD_UPDATE=
# Need to verify Kerberos from ports before disabling crypto
#WITHOUT_CRYPT=
WITHOUT_FTP=
WITHOUT_HTML=
WITHOUT_IPFILTER=
WITHOUT_IPFW=
WITHOUT_IPX=
WITHOUT_GDB=
WITHOUT_GAMES=
WITHOUT_TESTS=
WITHOUT_DEBUG_FILES=
WITHOUT_INETD=
WITHOUT_LDNS=
WITHOUT_LLDB=
WITHOUT_LPR=
WITHOUT_NETCAT=
WITHOUT_NIS=
WITH_PIE=
WITHOUT_PPP=
WITH_RATELIMIT=
WITHOUT_PROFILE=
WITHOUT_RCS=
WITHOUT_REPRODUCIBLE_BUILD=
WITH_RETPOLINE=
WITHOUT_TALK=
WITHOUT_TELNET=
WITHOUT_LLVM_TARGET_ALL=
 

sauv

New Member


Messages: 3

/etc/make.conf
Code:
MALLOC_PRODUCTION=yes
CPUTYPE?=haswell
MAKE_JOBS_NUMBER?=4
WITH_FAST_DEPEND=yes

.if ${.CURDIR:M*/usr/src*} || ${.CURDIR:M*/usr/obj*}
KERNCONF=LAPTOP
WITH_CCACHE_BUILD=yes
CCACHE_DIR=/var/ccache/freebsd
.endif

.if ${.CURDIR:M*/usr/ports*}
WITH_CCACHE_BUILD=yes
CCACHE_DIR=/var/ccache/ports
DEFAULT_VERSIONS+= ssl=libressl
OPTIONS_UNSET+= DEBUG PULSEAUDIO CUPS IPV6 LPR COLORD DBUS GCONF PRINT TEST TESTS VDPAU SMB XINERAMA
OPTIONS_SET+= OPTIMIZED_CFLAGS SIMD OPUS WEBP
DISABLE_VULNERABILITIES=yes
.endif

.if ${.CURDIR:M*/audio/musicpd}
OPTIONS_UNSET+= CURL
OPTIONS_SET+= FAAD
.endif

.if ${.CURDIR:M*/emulators/virtualbox-ose}
OPTIONS_UNSET+= UDPTUNNEL VNC WEBSERVICE
.endif

.if ${.CURDIR:M*/www/chromium*}
CCACHE_DIR=/var/ccache/chromium
OPTIONS_UNSET+= KERBEROS DRIVER
.endif

.if ${.CURDIR:M*/misc/mc}
OPTIONS_UNSET+= SFTP SUBSHELL X11
.endif

.if ${.CURDIR:M*/ftp/curl}
OPTIONS_UNSET+= GSSAPI_BASE COOKIES
OPTIONS_SET+= GSSAPI_NONE
.endif


/etc/src.conf
Code:
CPUTYPE?=haswell
MALLOC_PRODUCTION=yes
WITH_CCACHE_BUILD=yes
WITHOUT_ATM=
WITHOUT_BLACKLIST_SUPPORT=
WITHOUT_BLACKLIST=
WITHOUT_CALENDAR=
WITHOUT_DEBUG_FILES=
WITHOUT_FLOPPY=
WITHOUT_FTP=
WITHOUT_GAMES=
WITHOUT_GDB=
WITHOUT_GOOGLETEST=
WITHOUT_HTML=
WITHOUT_HYPERV=
WITHOUT_INET6_SUPPORT=
WITHOUT_INET6=
WITHOUT_INETD=
WITHOUT_IPFILTER=
WITHOUT_KERNEL_SYMBOLS=
WITHOUT_LDNS=
WITHOUT_LPR=
WITHOUT_NLS_CATALOGS=
WITHOUT_NLS=
WITHOUT_NTP=
WITHOUT_NVME=
#WITHOUT_PF=
WITHOUT_PPP=
WITHOUT_RADIUS_SUPPORT=
WITHOUT_RCMDS=
WITHOUT_RCS=
WITHOUT_RESCUE=
WITHOUT_SENDMAIL=
WITHOUT_SHAREDOCS=
WITHOUT_TALK=
WITHOUT_TELNET=
WITHOUT_TESTS_SUPPORT=
WITHOUT_TESTS=
WITHOUT_TFTP=
WITHOUT_TIMED=
WITHOUT_UNBOUND=
WITH_PIE=
WITH_RETPOLINE=
WITHOUT_LLVM_TARGET_ALL=
WITH_LLVM_TARGET_X86=
WITHOUT_CLANG_FULL=
WITH_RATELIMIT=


/etc/src-env.conf
Code:
WITH_META_MODE=yes
 
Top