# Share your make.conf and src.conf



## ldgc (Dec 4, 2017)

Hello  

It would be nice that experienced users shared their make.conf and src.conf to help new users like me  
I know that there are man pages and I read both of them, but real user's configurations are IMHO also helpful!


----------



## SirDice (Dec 4, 2017)

The only option new users should use: `rm -f /etc/make.conf /etc/src.conf`.

Seriously, unless you know what you are doing I would advice to stay away from them. If you know what you are doing you don't need this list.


----------



## ldgc (Dec 4, 2017)

SirDice said:


> The only option new users should use: `rm -f /etc/make.conf /etc/src.conf`.
> 
> Seriously, unless you know what you are doing I would advice to stay away from them. If you know what you are doing you don't need this list.



I don't think so. Some options become obsolete and the posting of the configurations can also help experienced users to noticed them faster


----------



## tobik@ (Dec 4, 2017)

I see nothing wrong with sharing make.confs.  Then we can receive and provide some feedback on them.  Maybe even nip some future problems in the bud before they even happen.

Or the whole thread could be a train wreck.  Only one way to find out 

Here is the make.conf I use for building desktop packages:
https://github.com/t6/freebsd-ports-sndio/blob/sndio-rebase/poudriere.d/fbsd12-amd64-sndio-make.conf

and for building a server package set:
https://github.com/t6/freebsd-ports-sndio/blob/sndio-rebase/poudriere.d/server-make.conf

On my workstation I also locally set this in /etc/make.conf

```
DEFAULT_VERSIONS=	ssl=libressl
DEVELOPER=		yes
DEV_WARNING_WAIT=	0
SU_CMD=			/usr/local/bin/sudo -E sh -c
```

And the /etc/make.conf for building FreeBSD base packages:

```
MALLOC_PRODUCTION=	yes
KERNCONF=		TOBIK
PKGSIGNKEY=		/root/pkgbase-private.key
REPODIR=		/pkgbase
```

/etc/src.conf is empty.


----------



## SirDice (Dec 4, 2017)

pensador_13 said:


> I don't think so. Some options become obsolete and the posting of the configurations can also help experienced users to noticed them faster


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


----------



## ldgc (Dec 4, 2017)

SirDice said:


> 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 will keep that in mind


----------



## ShelLuser (Dec 4, 2017)

There's really not much to share. Especially the sharing of src.conf is pretty useless in my opinion because this is only useful if you need to specifically customize your system. For example, on my main server I use these options (amongst many others):


```
WITHOUT_EXAMPLES=
WITHOUT_FREEBSD_UPDATE=
WITHOUT_PC_SYSINSTALL=
WITHOUT_PF=
WITHOUT_PKGBOOTSTRAP=
WITHOUT_SENDMAIL=
WITHOUT_SVNLITE=
WITHOUT_IPFW=
WITHOUT_LDNS=
```
So the problem here is that if you, as unexperienced user, would blindly use my src.conf without understanding what these options do then you'll probably end up with a messed up system. For starters you won't have a working firewall anymore. That's because I'm using IPFilter on this system, which has to be specifically enabled in your kernel configuration. Which you didn't ask for 

Next you won't have Sendmail. So unless you installed an MTA from the ports collection (I'm using mail/postfix on this server) then you'll end up without mail. And I could go on...  I also disabled freebsd-update so you'd be forced into using the source tree, no local DNS utilities (I dislike drill, but that's only because I'm very used to dig) so resolving could become tricky and no subversion.

Seriously...  If you wish you customize your system then there's only 1 smart way to do it. Check out the source tree, then run `man -M /usr/src/share/man src.conf` to study all the new ("current") customization options and then add whatever you (don't) need.

I realize the others already mentioned all the caveats, but I figured I'd share an hands-on example.


----------



## trev (Dec 4, 2017)

FWIW make.conf


```
KERNCONF=MACMINI    # MacMini 3,1 hardware custom kernel config file
#
# Modules
#
# Modules to build instead of all
# MODULES_OVERRIDE = linux
# Modules not to build
# WITHOUT_MODULES = linux acpi
# Rebuild nvidia ports driver with kernel builds (ie keep in sync)
PORTS_MODULES+=x11/nvidia-driver-340
#
# Legacy binary library support
#
# If you want the "compat" shared libraries installed as part of your normal builds:
##COMPAT2X=yes
##COMPAT3X=yes
##COMPAT4X=yes
##COMPAT5X=yes
##COMPAT6X=yes
##COMPAT7X=yes
##COMPAT8X=yes
# Now use ports - see eg /usr/ports/misc/compat4x - for legacy binaries that depend on them.
#
# Sendmail config
#
SENDMAIL_CFLAGS= -UNETINET6     # no ISP IPv6 rDNS, so ditch IPv6 for sendmail
SENDMAIL_MC=/etc/mail/shadow.mc
SENDMAIL_SUBMIT_MC=/etc/mail/shadow.submit.cf
#
# PORTS BUILDS ONLY
#
MAKE_JOBS_NUMBER?=3
DEFAULT_VERSIONS+=ssl=openssl
DEFAULT_VERSIONS+=perl5=5.24
OPENSSLBASE=/usr/local  # Use ports version of openssl with TLS 1.2
OPTIONS_SET+=IPV6       # Build ports with IPv6 option
OPTIONS_UNSET+=GNOME    # Build ports w/o Gnome
OPTIONS_UNSET+=HAL      # Build ports w/o HAL
OPTIONS_UNSET+=DBUS     # Build ports w/o dbus
OPTIONS_UNSET+=GSSAPI   # Build ports w/o kerberos
```


----------



## ldgc (Dec 5, 2017)

getopt said:


> You got best practice advice from
> 
> Well, if you are that smart why bothering us? Candidate for ignore list! Unfortunately the FreeBSD forums  get flooded with such supersmart newbees. Reading their output here is just a waste of lifetime.



You have misunderstood me, I don´t consider me a supersmart newbie as you stated. In fact, when I disagreed with SirDice opinion, I gave a reason why with politeness. Now if you don´t agree with me, that´s ok for me, but please be polite with other people. It´s something very important to a healthy community


----------



## sidetone (Dec 7, 2017)

Partial src.conf

```
#Network
WITHOUT_CTM=yes
WITHOUT_FINGER=yes
WITHOUT_FTP=yes
WITHOUT_HAST=yes
WITHOUT_HTML=yes
WITHOUT_IPFILTER=yes
WITHOUT_OPENSSH=yes
WITHOUT_RCMDS=yes
WITHOUT_SENDMAIL=yes
WITH_SVN=yes
WITHOUT_TALK=yes
WITHOUT_TELNET=yes
WITHOUT_TFTP=yes

#Other
WITHOUT_BHYVE=yes
WITHOUT_BOOTPARAMD=yes
WITHOUT_BOOTPD=yes
WITHOUT_CCD=yes
WITHOUT_EE=yes
WITHOUT_FLOPPY=yes
WITHOUT_GAMES=yes
WITHOUT_GPIO=yes
WITHOUT_GNU_GREP_COMPAT=yes
WITHOUT_HYPERV=yes
WITHOUT_SYSCONS=yes
WITHOUT_ZFS=yes
WITH_BSD_GREP=yes
```
For #Network, I've mostly disabled clear text services. In #Other I'm using VT exclusively, instead of SYSCONS (for VESA). Virtualization is removed too. GPIO is for controlling breadboard electronics, and other small electronics with your computer. HTML is for HTML docs. HAST is for network storage. I've left off my buildtools/toolchain options from the above, which I am still sorting out.

make.conf

```
WITH_PKGNG=yes
CPUTYPE?=k8
KERNCONF=MINIMAL
WRKDIRPREFIX=/tmp/bport
NO_MODULES=yes
#MODULES_WITH_WORLD=yes
#PORTS_MODULES=shells/mksh ports-mgmt/psearch ports-mgmt/portmaster security/doas

COMPILER_TYPE=  clang
CC=             /usr/local/llvm40/bin/clang
CXX=            /usr/local/llvm40/bin/clang++
CPP=            /usr/local/llvm40/bin/clang-cpp
LD=             /usr/local/llvm40/bin/ld.lld
NM=             /usr/local/llvm40/bin/llvm-nm
OBJDUMP=     /usr/local/llvm40/bin/llvm-objdump
STRINGS=        /usr/local/llvm40/bin/llvm-strings

OPTIONS_SET=    SNDIO ATI JOYSTICK SOUNDEX LIBINPUT CRYPTO \
                SPEEX CURL IDN SQLITE IDN PYGMENTS \
                EXAMPLES RUST TCLTK HUNSPELL UTF8 \
                NOTIFY CPU_CLIP SASL TZDATA \
                PNG SVG OPENGL NLS
OPTIONS_SET+=   PORTAUDIO XAW3DXFT XVIDEO PORT_LLVM
OPTIONS_UNSET=  PULSEAUDIO PULSE ALSA NAS JACK \
                CUPS VESA SCFB WGET GCC COLORD \
                TWM XCONSOLE XCLOCK XAUTH XBACKLIGHT XGC XSETROOT ICEAUTH \
                GDBM BASH GNUTLS \
                CANBERRA VAAPI QT5 V4L \
                VV BONJOUR GG SAMETIME SILC IRC NOVELL OSCAR QQ SIMPLE ZEPHYR \
                GNOME GNOMEVFS
QT4_OPTIONS=    -CUPS

DEFAULT_VERSIONS+=     python=3.6
```
I've intentionally left commented out options pertaining to MODULES, because those I'm still figuring out and considering those. As for my LD, NM, OBJECTDUMP, and STRING options, I'm considering installing devel/binutils, and pointing to there. CUPS is mentioned twice, because that's what it takes to remove it with QT4 as well.

Enabling ATI, and disabling VESA, sets options for x11-drivers/xorg-drivers for the corresponding card.

** Edits -*_ I see how using binutils from ports would affect developers, bc then it forces everyone to use its ports dependencies for that code, and for that code to be less portable.
It was supposed to be OBJDUMP, not OBJECTDUMP._


----------



## SirDice (Dec 8, 2017)

You can remove the WITH_PKGNG=yes now. It has no function any more


----------



## CraigW (Dec 15, 2017)

Here is some of my /etc/make.conf.  Parts are stolen from other users in the forum, some are from my own
trial and error and many poudriere builds.

I have some trouble with my particular processor and compiling things with CPUTYPE?=native.
You may or may not.  The main problem for me is with erroneous avx avx2 instructions popping up despite
disabling them.

I can include some other patches to files in /usr/ports/Mk that I use to work around this if there is interest.
My guess is that sandybridge and above processors won't run into the troubles I do.



```
################################################################################
#       /usr/src things
#
KERNCONF?=beastie
PORTS_MODULES+=emulators/virtualbox-ose-kmod sysutils/lsof

################################################################################
#       Intel(R) Pentium(R) CPU G850 @ 2.90GHz (K8-class CPU)
#
CPUTYPE?=corei7

################################################################################
#       Override default versions
#
DEFAULT_VERSIONS+=ssl=openssl

################################################################################
#       Quiet some clang flags
#
.if ${CC:T} == "clang"
 CFLAGS+=-Qunused-arguments -Wno-dev
.endif

################################################################################
#       Add custom port category
#
VALID_CATEGORIES+=local

################################################################################
#       Default GLOBAL port options
#
OPTIONS_SET+=\
        OPTIMIZATIONS OPTIMIZED_CFLAGS OPTIMIZED_FLAGS \
        PTHREAD PTHREADS THREAD THREADS THREADSAFE TTB \
        RTCPU RUNTIME DYNAMIC_ARCH OPENBLAS OPENMP OPENMPI OPENSSL \
        CPU_OPTS SSE SSE2 SSE3 SSSE3 SSE41 SSE42 \
        DC1394 DVDREAD FFMPEG LIBBLURAY MAD XVID X264 X265 DECRYPT \
        AVAHI DBUS HAL ICONV NCURSES NLS LDAP \
        DYNAMIC PYTHON SUID SYSLOG \
        MAN MANPAGES VERBOSE VERBOSE_BUILD \
        COMPOSITE GALLIUM GLX GUI OPENGL X11 \
        ALSA PORTAUDIO FLAC MP3 OGG XMMS 7ZIP \
        GIF IMAGEMAGICK JPEG PANGO PNG PNM RAR TIFF ZIP ZLIB \
        DVDCSS FDK_AAC VTKMPEG2 NONFREE
OPTIONS_UNSET+=\
        AVX AVX2 NETLIB\
        DEVD MDNS MDNSRESPONDER NSS GNUTLS POLARSSL WOLFSSL \
        OSS CPU_CLIP ESOUND JACK NAS OPENAL PULSEAUDIO VDPAU \
        APIDOCS APIDOC DOCS DOXYGEN EXAMPLES HTMLDOCS INFO \
        PDFDOCS PROFILE RUBY TEST

#       Fix some problems with the GLOBAL port options above
#       Reset mod_info to build. In apache info did not refer to info pages
www_apache24_SET+=INFO

#       override OPTIONS_SET+=NCURSES at top of this file
#       back to the default one of TTY
security_pinentry_SET+=TTY
security_pinentry_UNSET+=QT4 NCURSES GTK2 GNOME3

#       Unset unexepected use of runtime
audio_espeak_UNSET+=RUNTIME

################################################################################
#       UNSET a few foreign languages
#
OPTIONS_UNSET+=\
        LADSPA LANG_AF LANG_AK LANG_AM LANG_AR LANG_AST LANG_BB \
        LANG_BE LANG_BG LANG_BN LANG_BR LANG_BS LANG_CA LANG_CS \
        LANG_CY LANG_DA LANG_DE LANG_EL LANG_EO LANG_ES LANG_ET \
        LANG_EU LANG_FA LANG_FI LANG_FR LANG_FY LANG_GA LANG_GB \
        LANG_GD LANG_GL LANG_GU LANG_HE LANG_HI LANG_HR LANG_HU \
        LANG_ID LANG_IS LANG_IT LANG_JA LANG_JP LANG_KK LANG_KN \
        LANG_KO LANG_KU LANG_LG LANG_LK LANG_LT LANG_LV LANG_MAI \
        LANG_MK LANG_ML LANG_MN LANG_MR LANG_NB LANG_NL LANG_NN \
        LANG_NSO LANG_OR LANG_PA LANG_PBR LANG_PL LANG_PT LANG_RM \
        LANG_RO LANG_RU LANG_SA LANG_SC LANG_SE LANG_SI LANG_SK \
        LANG_SL LANG_SM LANG_SON LANG_SQ LANG_SR LANG_SV LANG_TA \
        LANG_TE LANG_TH LANG_TR LANG_UA LANG_UK LANG_VI LANG_ZA \
        LANG_ZU LANG_TW

################################################################################
#       XOrg -- Only build xorg with drivers below
#
x11-drivers_xorg-drivers_SET+=\
        APM INTEL MOUSE KEYBOARD VESA SYNAPTICS FBDEV VMWARE VMMOUSE WACOM
x11-drivers_xorg-drivers_UNSET+=\
        ATI MACH64 NV R128 RADEONHD OPENCHROME ACECAD ELOGRAPHICS \
        HYPERPEN JOYSTICK MAGICTOUCH MUTOUCH PENMOUNT \
        VMMOUSE VOID ARK CHIPS CIRRUS CYRIX DUMMY \
        GLINT I128 I740 IMSTT MGA NEOMAGIC NEWPORT RENDITION \
        S3 S3VIRGE SAVAGE SILICONMOTION SIS TDFX TGA TRIDENT \
        TSENG VIA VOODOO

################################################################################
#       php5-extensions
#
lang_php56-extensions_SET+=\
        BZ2 CTYPE DOM FILEINFO FILTER GD GETTEXT HASH ICONV JSON \
        LDAP OPCACHE OPENSSL PDO PDO_SQLITE PHAR POSIX SESSION SIMPLEXML \
        SQLITE3 TOKENIZER XML XMLREADER XMLWRITER XSL ZIP ZLIB

################################################################################
#       Override TESSERACT_LANGS in port Makefile
#
TESSERACT_LANGS=eng
graphics_yagf_SET+=TESSERACT
graphics_yagf_UNSET+=CUNEIFORM

################################################################################
#       Try to match FreeBSD package distribution flags
#
www_firefox_SET+=ALSA BUNDLED_CAIRO DBUS DTRACE FFMPEG GCONF JACK OPTIMIZED_CFLAGS PROFILE PULSEAUDIO
www_firefox_UNSET+=CANBERRA DEBUG INTEGER_SAMPLES LIBPROXY SNDIO TEST

################################################################################
#       Make port non-interactive when doing kernel build/install
#
emulators_virtualbox-ose_SET+=GUESTADDITIONS
.if ${.CURDIR:M*/emulators/virtualbox-ose*}
 BATCH=yes
.endif

################################################################################
#       Some port specific overrides
#
editors_libreoffice_SET+=KDE4 SYSTRAY
graphics_blender_SET+=CAMERATRACK MOD_OCEANSIM RAYOPTIMIZATION
multimedia_dvdauthor_SET+=NTSC IMAGEMAGICK
ports-mgmt_poudriere_SET+=EXAMPLES QEMU
ports-mgmt_poudriere-devel_SET+=EXAMPLES QEMU
print_foomatic-filters_SET+=ENSCRIPT_LETTER
print_foomatic-filters_UNSET+=ENSCRIPT_A4
security_sudo_SET+=INSULTS
sysutils_udfclient_SET+=FUSE
sysutils_apcupsd_SET+=CGI
www_lynx_SET+=DEFAULT_COLORS

################################################################################
#       Override unset TEST global at top TEST=off fails:
#       https://bugs.kde.org/show_bug.cgi?id=366110
devel_kf5-extra-cmake-modules_SET+=TEST
```


my /etc/src.conf is minimal:


```
WITHOUT_KERNEL_SYMBOLS=
WITHOUT_SYSCONS=
```


----------



## raphidae (Mar 22, 2018)

A little old thread, but I figure I'd dump mine too:

make.conf:

```
FORCE_MAKE_JOBS=YES
MAKE_JOBS_NUMBER=30

#BATCH="YES"

OPTIONS_SET+=SAFESTACK CFIHARDEN PIE RELRO IPV6 SSL PERL TCL \
             PYTHON DOCS THREADS MANPAGES OPENSSL PCRE PTHREAD KQUEUE

OPTIONS_UNSET+=NLS EXAMPLES DEBUG ASPELL GNUTLS IDN X11 GUI

oidentd_UNSET=MASQ

DEFAULT_VERSIONS+=perl5=5.26
DEFAULT_VERSIONS+=python=3.6
```

src.conf:


```
KERNCONFDIR=/usr/KERNCONF
KERNCONF=PERSEPHONE-HBSD-SMP

#other tmpdir (/tmp is mounted noexec, will fail installworld)
TMPDIR=/usr/tmp

#debug symbols in world, etc.
#CFLAGS=-pipe
#DEBUG_FLAGS=-g

#FORCE_MAKE_JOBS=YES
MAKE_JOBS_NUMBER=30

#also build 32-bit libs (together with options COMPAT_FREEBSD32)
WITH_LIB32=YES

#using opensmtpd from ports
WITHOUT_SENDMAIL=YES
WITHOUT_DMAGENT=YES

#using unbound from ports
WITHOUT_UNBOUND=YES

#using xinetd from ports
WITHOUT_INETD=YES

#using openntpd from ports
WITHOUT_NTP=YES

#BSD grep instead of GNU grep
WITH_BSD_GREP=YES

#using git to sync ports tree
WITHOUT_PORTSNAP=YES
WITHOUT_FREEBSD_UPDATE=YES
WITHOUT_HBSD_UPDATE=YES

#Hyper-V guest tools
WITHOUT_HYPERV=YES

#other crud we don't need
WITHOUT_AMD=YES
WITHOUT_APM=YES
WITHOUT_ATM=YES
WITHOUT_BHYVE=YES
WITHOUT_BLUETOOTH=YES
WITHOUT_BOOTPARAMD=YES
WITHOUT_BOOTPD=YES
WITHOUT_BSNMP=YES
WITHOUT_CCD=YES
WITHOUT_CTM=YES
WITHOUT_FINGER=YES
WITHOUT_FLOPPY=YES
WITHOUT_GSSAPI=YES
WITHOUT_HAST=YES
WITHOUT_HTML=YES
WITHOUT_INFO=YES
WITHOUT_IPFILTER=YES
WITHOUT_IPX=YES
WITHOUT_ISCSI=YES
WITHOUT_KERBEROS=YES
WITHOUT_LPR=YES
WITHOUT_NDIS=YES
WITHOUT_NIS=YES
WITHOUT_NLS=YES
WITHOUT_NLS_CATALOGS=YES
WITHOUT_NS_CACHING=YES
WITHOUT_PF=YES
WITHOUT_AUTHPF=YES
WITHOUT_PPP=YES
WITHOUT_RADIUS_SUPPORT=YES
WITHOUT_RBOOTD=YES
WITHOUT_RCMDS=YES
WITHOUT_RCS=YES
WITHOUT_ROUTED=YES
#WITHOUT_SVNLITE=YES
WITHOUT_TCP_WRAPPERS=YES
WITHOUT_TFTP=YES
WITHOUT_TIMED=YES
WITHOUT_WIRELESS=YES
WITHOUT_ZFS=YES
```

Notes:

-These files are actually from a HardenedBSD system, so that's what the extra WITHOUT_HBSD_UPDATE is for.

-KERNCONFDIR is handy to store the KERNCONF outside /usr/src, so if you're syncing the entire /usr/src with SVN or GIT it's not removed as extra.

-I see a lot of people putting KERNCONF= in make.conf. AFAIK the KERNCONF= is best placed in src.conf, since it only concerns kernel builds. Correct me if I'm wrong 

-If you turn off parts of world to build & install in src.conf, be sure to actually do a "make check-old" & "make check-old-libs" and (after checking) "yes|make delete-old" & "yes|make delete-old-libs". If you skip this, the old binaries of these parts (installed when the system was installed, some of which suid) will hang around on the filesystem without getting upgraded with the system. The idea is to actually remove these parts from the system, not just turning off upgrading them while keeping a very old version (possibly suid and exploitable) around


----------



## JAW (Mar 23, 2018)

Are there any flags to prevent the build of clang (when building world) from including unwanted architectures?
For example, I only need x86 and x64, *not *ARM, AArch64, MIPS, Sparc, etc. But the build will include everything (which seems to take a large portion of total build time).


----------



## sidetone (Mar 23, 2018)

JAW said:


> Are there any flags to prevent the build of clang (when building world) from including unwanted architectures?
> For example, I only need x86 and x64, *not *ARM, AArch64, MIPS, Sparc, etc.




```
CPUTYPE?=
```
 tells it to build for a specific processor, but I'm not sure how to tell it to use a limited amount of architectures. The ? is used to allow ports to build, which won't build when the specific processor instruction is forced.


----------



## rfraile (Aug 31, 2018)

My tiny make.conf:


```
NO_MODULES=yes
CPUTYPE?=pentium3
```

Any option in src.conf


----------



## VladiBG (Aug 31, 2018)

```
% cat make.conf
DEFAULT_VERSIONS+= perl5=5.26
% cat src.conf
cat: src.conf: No such file or directory
```


----------



## kpa (Aug 31, 2018)

```
PORTSDIR=/data/poudriere/ports/default
DISTDIR=/data/cache/distfiles
WRKDIRPREFIX=/var/tmp
PORT_DBDIR=/tmp

.include "/usr/local/etc/poudriere.d/make.conf"
```

No src.conf.


----------



## sidetone (Sep 17, 2018)

make.conf:

```
KERNCONF=MYKERNCONF
WRKDIRPREFIX=/usr/buildport
WITHOUT_MODULES=i915 i915kms mach64 mga r128 savage sis tdfx via ipfilter zfs
PORTS_MODULES=graphics/drm-stable-kmod shells/mksh ports-mgmt/psearch net/svnup

COMPILER_TYPE=  clang
CC=             /usr/local/bin/clang60
CXX=            /usr/local/bin/clang++60
CPP=            /usr/local/bin/clang-cpp60
LD=             /usr/bin/ld # default
#XLD=           /usr/local/llvm60/bin/ld.lld
#CROSS_BINUTILS_PREFIX=/var/empty

OPTIONS_SET=    SNDIO SOUNDEX OGG \
                CRYPTO LIBBLURAY \
                SPEEX SQLITE PYGMENTS \
                EXAMPLES HUNSPELL UTF8 \
                CPU_CLIP SASL TZDATA \
                PNG OPENGL VDPAU VAAPI NONFREE \
                XCONSOLE XCLOCK XSETROOT \
                IPV6 IDN CURL GSSAPI_MIT \
                TCLTK RUST \
                SYSTRAY NOTIFY
OPTIONS_SET+=   PORTAUDIO XAW3DXFT XVIDEO PORT_LLVM QT4
OPTIONS_UNSET=  PULSEAUDIO PULSE ALSA NAS JACK \
                CUPS WGET GCC COLORD AVAHI \
                TWM XAUTH XBACKLIGHT XGC ICEAUTH \
                GDBM BASH GNUTLS NLS \
                CANBERRA QT5 V4L DOXYGEN SVG \
                VV BONJOUR GG SAMETIME SILC IRC NOVELL OSCAR QQ SIMPLE ZEPHYR \
                GNOME GNOMEVFS GCONF HTTPD LIVEMEDIA \
                GSSAPI_BASE
x11-drivers_xorg-drivers_SET=AMDGPU ATI JOYSTICK LIBINPUT
x11-drivers_xorg-drivers_UNSET=SCFB VESA
emulators_i386-wine_SET=MONO GECKO
mail_thunderbird_UNSET=LIGHTNING FFMPEG
net-im_libpurple_UNSET=GSTREAMER # using command interface to waveplay or wavplay
net-im_pidgin_UNSET=GSTREAMER
textproc_libe-book_UNSET=DOCS
audio_libsamplerate_UNSET=EXAMPLES
editors_libreoffice_UNSET=MMEDIA
QT4_OPTIONS=    -CUPS
```

src.conf:

```
# NETWORK
WITHOUT_CTM=yes
WITHOUT_FINGER=yes
WITHOUT_FTP=yes
WITHOUT_HAST=yes
WITHOUT_HTML=yes
WITHOUT_IPFILTER=yes
WITHOUT_OPENSSH=yes
WITHOUT_RCMDS=yes
WITHOUT_SENDMAIL=yes
WITH_SVN=yes
WITHOUT_TALK=yes
WITHOUT_TELNET=yes
WITHOUT_TFTP=yes
WITHOUT_GSSAPI=yes      # LibreSSL can't use base's GSSAPI, alternate can be set from make.conf
WITHOUT_NTP=yes # needed for LibreSSL

# TOOLCHAIN
WITHOUT_CLANG=yes
WITHOUT_CXX=yes
WITHOUT_CPP=yes
WITHOUT_LLD=yes
WITHOUT_GCC_BOOTSTRAP=yes
WITHOUT_GCC=yes
WITHOUT_GDB=yes
WITHOUT_GPL_DTC=yes
WITHOUT_GNU=yes
WITHOUT_GNUCXX=yes
WITHOUT_GNU_SUPPORT=yes

# OTHER
WITHOUT_BHYVE=yes
WITHOUT_BOOTPARAMD=yes
WITHOUT_BOOTPD=yes
WITHOUT_CCD=yes
WITHOUT_EE=yes
WITHOUT_FLOPPY=yes
WITHOUT_GAMES=yes
WITHOUT_GPIO=yes
WITHOUT_GNU_GREP=yes
WITHOUT_HYPERV=yes
WITHOUT_ZFS=yes
WITH_BSD_GREP=yes
```
Left syscons in the base and module, in case of urgent need of VESA driver for any available card. Syscons, VESA and related drivers/arguments can likely be left out of the kernel build, because then that can hopefully be loaded from module if needed. I forgot if linux and linux64 modules are needed for certain FreeBSD modules, including for graphics cards, but if so, I can use VESA if that temporary need arises.

The compiler parts left out of src.conf, are referenced to clang from ports in make.conf. GSSAPI_BASE must be unset, before an alternate can be set.


----------



## CraigW (Oct 4, 2018)

JAW said:


> Are there any flags to prevent the build of clang (when building world) from including unwanted architectures?
> For example, I only need x86 and x64, *not *ARM, AArch64, MIPS, Sparc, etc. But the build will include everything (which seems to take a large portion of total build time).



I've noticed that the following have been added recently (July), https://reviews.freebsd.org/rS335875
so I've been adding to my src.conf.  I have not benchmarked it myself.


```
WITHOUT_LLVM_TARGET_AARCH64=
WITHOUT_LLVM_TARGET_ARM=
WITHOUT_LLVM_TARGET_MIPS=
WITHOUT_LLVM_TARGET_POWERPC=
WITHOUT_LLVM_TARGET_SPARC=
```


----------



## Phishfry (Jun 7, 2019)

tobik@ said:


> Or the whole thread could be a train wreck.


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

```
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.


----------



## zirias@ (Jun 7, 2019)

As you can see here, I'm not a fan of the C shell:

```
vmhost# cat /etc/src.conf

# unwanted base components/options:
WITHOUT_ASSERT_DEBUG=yes
WITHOUT_ATM=yes
WITHOUT_AUDIT=yes
WITHOUT_AUTHPF=yes
WITHOUT_BOOTPARAMD=yes
WITHOUT_BOOTPD=yes
WITHOUT_ED_CRYPTO=yes
WITHOUT_EE=yes
WITHOUT_EXAMPLES=yes
WITHOUT_FLOPPY=yes
WITHOUT_GPIB=yes
WITHOUT_HTML=yes
WITHOUT_IPFILTER=yes
WITHOUT_IPFW=yes
WITHOUT_IPX=yes
WITHOUT_PC_SYSINSTALL=yes
WITHOUT_KERBEROS=yes
WITHOUT_OPENSSH=yes
WITHOUT_PROFILE=yes
WITHOUT_RBOOTD=yes
WITHOUT_RCS=yes
WITHOUT_SENDMAIL=yes
WITHOUT_SHAREDOCS=yes
WITHOUT_SVNLITE=yes
WITHOUT_SYSCONS=yes
WITHOUT_TCSH=yes
WITHOUT_TESTS=yes
WITHOUT_VI=yes
WITHOUT_MODULE_DRM=yes
WITHOUT_MODULE_DRM2=yes

# build options
MALLOC_PRODUCTION=yes

KERNCONF=GENERIC ROUTER DESKTOP
```
The `MALLOC_PRODUCTION` is a leftover from using 11-CURRENT -- btw, any good ideas about maintenance of all these options? How do you discover any of these got obsolete?

The `ROUTER` kernel includes some ALTQ stuff, the `DESKTOP` kernel has the "sg" device, so I can use MakeMKV.

Packages are built with poudriere, using this config:

```
builder# cat /usr/local/etc/poudriere.d/make.conf
DEFAULT_VERSIONS+= ssl=libressl samba=4.8 php=7.2 pgsql=10 linux=c7

OPTIONS_UNSET+= GSSAPI_BASE GSSAPI_NONE HEIMDAL ALSA JACK PULSE PULSEAUDIO
OPTIONS_SET+=   GSSAPI_MIT SNDIO PORTAUDIO
net_samba48_UNSET+=    GSSAPI_BUILTIN DEBUG
net_samba48_SET+=    CUPS BIND914
www_elinks_SET+=    ICONV IDN
www_firefox_UNSET+=    ALSA JACK
java_openjdk8_SET+=    ALSA
net_freerdp_SET+=    ALSA
devel_electron4_SET+=    ALSA
www_node_SET+=    BUNDLED_SSL
news_tin_SET+=    SLRNFACE
games_eduke32_SET+=    HRP OFFENSIVE FULL
irc_irssi_SET+=    OTR PROXY
irc_bitlbee_SET+=    LIBPURPLE OTR
irc_bitlbee_UNSET+=    SKYPE MSN TWITTER JABBER OSCAR
editors_libreoffice_UNSET+=    GTK2 GTK3
editors_libreoffice_SET+=    JAVA KDE5 SYSTRAY WEBDAV
emulators_playonbsd_UNSET+=    GECKO MONO
emulators_wine_SET+=    CUPS HAL LIBXSLT MPG123
graphics_gimp-app_SET+=    GHOSTSCRIPT
graphics_mesa-dri_SET+= VAAPI VDPAU
graphics_sane-frontends_SET+=    GIMP
multimedia_mplayer_SET+=    BLURAY XVMC
net-im_pidgin_SET+=    SASL
net_freeradius3_SET+=    WINBIND MITKRB_PORT
security_openssh-portable_SET+=    KERB_GSSAPI MIT
security_sudo_UNSET+=    GSSAPI_MIT
ftp_curl_UNSET+=    TLS_SRP

DISABLE_VULNERABILITIES=yes
LICENSES_ACCEPTED+=    MAKEMKV

ICA_CERTS=Addtrust_External_CA_Root.pem
DUKE3DFULLDIR=/distfiles/duke3d
```


----------



## Phishfry (Jun 12, 2019)

Zirias said:


> any good ideas about maintenance of all these options? How do you discover any of these got obsolete?


Well here are some of the other settings locations I have found: /usr/share/mk/bsd.opts.mk


----------



## olafz (Jun 21, 2019)

JAW said:


> Are there any flags to prevent the build of clang (when building world) from including unwanted architectures?
> For example, I only need x86 and x64, *not *ARM, AArch64, MIPS, Sparc, etc. But the build will include everything (which seems to take a large portion of total build time).


Put this into src.conf:

```
WITHOUT_LLVM_TARGET_ALL=
```


----------



## Alain De Vos (Jun 21, 2019)

make.conf :

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


----------



## CyberCr33p (Jun 21, 2019)

Does it need "yes" at the end?


```
WITHOUT_LLVM_TARGET_ALL=yes
```


----------



## driesm (Jun 21, 2019)

CyberCr33p said:


> Does it need "yes" at the end?
> 
> 
> ```
> ...


Simple answer: no. The build system only needs the variable up and including the equal sign.


----------



## SirDice (Jun 24, 2019)

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


----------



## rvaneijk (Jul 20, 2019)

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 (Jul 22, 2019)

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 (Jul 29, 2019)

SirDice said:


> 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 (Nov 12, 2019)

I have observed a few things.


```
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 
	
	



```
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 
	
	



```
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 (Nov 12, 2019)

chrcol said:


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


It acts as an override.


----------



## chrcol (Nov 12, 2019)

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.


----------



## SirDice (Nov 12, 2019)

chrcol said:


> any thoughts on my make jobs observations?


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


----------



## Alain De Vos (Nov 12, 2019)

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 (Nov 12, 2019)

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.


----------



## Alain De Vos (Nov 12, 2019)

In linux I could understand it as a license thing.


----------



## SirDice (Nov 12, 2019)

Alain De Vos said:


> 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 (Nov 14, 2019)

SirDice said:


> 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 (Dec 15, 2019)

Phishfry said:


> 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.
> ...



Hi,*Phishfry*
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.



```
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...


```
/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 (Dec 17, 2019)

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


----------



## farson (Dec 17, 2019)

Phishfry said:


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


thanks so much
you have a nice day.


----------



## luckied (Apr 19, 2020)

Sure, I'll bite!

ghost% cat /etc/make.conf        

```
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 

```
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 (Nov 13, 2020)

/etc/make.conf

```
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

```
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

```
WITH_META_MODE=yes
```


----------



## Israel (Apr 7, 2021)

I was curious what others have found useful with /etc/make.conf. This seems more like an opinion post than trouble-shooting, so I figured Off-Topic was the right place. Lately I've been using this:

```
CPUTYPE?=native
CFLAGS=-O3 -pipe -fno-strict-aliasing -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security 
COPTFLAGS=-O3 -pipe -funroll-loops -ffast-math -fno-strict-aliasing -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security 
KERNCONF=BSD GENERIC
OPTIMIZED_CFLAGS=YES
WITHOUT_X11=YES
BUILD_OPTIMIZED=YES
WITH_CPUFLAGS=YES
WITH_OPTIMIZED_CFLAGS=YES
WITHOUT_DEBUG=YES
BUILD_STATIC=YES
NO_PROFILE=YES
NO_INET6=YES
```
I know some will say never go above -O2 with CFLAGS, and others say -O3 is fine and to only worry about anything higher. I've rebuilt all ports with the above and the only package failures I experienced breakage with were not related to this make.conf. I'm open to any criticism or suggestions though. What have you found useful?


----------



## SirDice (Apr 7, 2021)

Remove those CFLAGS and COPTFLAGS. The system already picks the most optimal settings, setting them by hand interferes with that.


----------



## zirias@ (Apr 7, 2021)

Every single time I see _funroll-loops_ 


			https://www.shlomifish.org/humour/by-others/funroll-loops/Gentoo-is-Rice.html
		




SirDice said:


> The system already picks the most optimal settings


Depends on what you call "optimal" – it picks _sane_ settings known to build without issues and of course using _sane_ compiler optimizations.

The main thing is, adding all kinds of "funny" (pun intended) flags typically doesn't give even measurable speed improvement. Speed bottlenecks are I/O, of course the kernel (FreeBSD 13 improved _a lot_ here), bad handling of locks with threads, and so on. In the rare cases when processing speed on the CPU is really relevant (e.g. with multimedia/ffmpeg), upstream already uses (well-tested) compiler flags for useful optimizations, or even offers part of the code in assembler.

So, if you really think you have to optimize anything here, the only knob you should ever use is `CPUTYPE`. The benefit of it is questionable as well, but it will be safe. Of course, the drawback is that your binaries won't run on any other machine…


----------



## Argentum (Apr 7, 2021)

ldgc said:


> It would be nice that experienced users shared their make.conf and src.conf to help new users like me
> I know that there are man pages and I read both of them, but real user's configurations are IMHO also helpful!


On my experimental desktop machine I have only one line in /etc/make.conf

`MINITUBE_GOOGLE_API_KEY=<secret_google_api_key>`

That is for building multimedia/minitube


----------



## SirDice (Apr 7, 2021)

Zirias said:


> it picks _sane_ settings known to build without issues and of course using _sane_ compiler optimizations.


I'm calling those the most optimal. It's rather pointless to tweak the compiler settings to such an extend you get really small and/or fast code only to have it become utterly unstable or not even run. In my opinion the best settings are already picked by the port maintainer and/or upstream. There's nothing to gain by mucking with those unless you know what you're doing. Most people, including myself, have no idea what most of those compiler settings actually do. So, after 20 years of building FreeBSD and hundreds, if not thousands of ports, I found it's best to leave them alone.


----------



## Argentum (Apr 7, 2021)

SirDice said:


> I'm calling those the most optimal. It's rather pointless to tweak the compiler settings to such an extend you get really small and/or fast code only to have it become utterly unstable or not even run. In my opinion the best settings


Once I experimented on a server with Haswell architecture and put `CPUTYPE?=haswell` flag in the /etc/make.conf. Compiled kernel and world with that. Everything worked fine, but later thorough *testing revealed* that it was actually a bit slower. Removed that flag and recompiled.


----------



## sidetone (Apr 7, 2021)

Network Administration with FreeBSD 7 has an example for -funroll-loops and -ffast-math through COPTFLAGS in the KERNCONF. This is in my KERNCONF, that pulls in a slimmed down KERNCONF:

```
include TRIM
ident   MY
makeoptions     COPTFLAGS="-O2 -pipe -funroll-loops -ffast-math"
```
After compiling and rebooting, my computer seems to run smoother. I believe something like this can go into make.conf.

funroll-loops compiles a lot (perhaps a few times) longer, more thoroughly, to get every drop out of the processor architecture for the code, and it's meant to get the most out of compiling. Using it for kernel makes sense. These options don't make sense for using it for base or large parts of the ports tree.

The best way to get a faster system, is to not have a program compile with many unnecessary dependencies.


----------



## grahamperrin@ (Jun 26, 2021)

Cross reference: 









						Sharing my make.conf.
					

Against minimalism /etc/make.conf  OPTIONS_SET+=A52 OPTIONS_SET+=AALIB OPTIONS_SET+=AMDGPU OPTIONS_SET+=AMR_NB OPTIONS_SET+=AMR_WB OPTIONS_SET+=AOM OPTIONS_SET+=ASPELL OPTIONS_SET+=ASS OPTIONS_SET+=AVX OPTIONS_SET+=BROTLI OPTIONS_SET+=BS2B OPTIONS_SET+=CACA OPTIONS_SET+=CAIRO OPTIONS_SET+=CAJA...




					forums.freebsd.org


----------



## grahamperrin@ (Dec 23, 2021)

/etc/make.conf

Less substance, now than previously shared editions, which I deleted from this topic.


```
## Citrix Receiver
#
# ICA_CERTS=QuoVadisEuropeEVSSLCAG1.crt


## LLVM
#
# See comments in /usr/local/etc/poudriere.d/make.conf
#
# WITHOUT_LLVM_TARGET_ALL=
 

## LibreOffice
#
# 7.1.1 release call for testing
# <https://lists.freebsd.org/pipermail/freebsd-ports/2021-March/120422.html>
#
# OVERLAYS+=/path/to/freebsd-ports-libreoffice


## Mesa
#
# <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235215#c14>
# ... mesa-dri doesn't use LLVM_DEFAULT. Set
# MESA_LLVM_VER=${LLVM_DEFAULT}
# in your make.conf if you want it to use LLVM_DEFAULT at your own risk.
 
 
## Samba
#
# DEFAULT_VERSIONS+=samba=4.10


## webcamd
#
# See comments in /usr/local/etc/poudriere.d/make.conf
#
WITH_DEBUG_PORTS=multimedia/webcamd
```

/etc/src.conf

I can't recall when `WITHOUT_PORTSNAP` and `WITHOUT_SVNLITE` crept in (then got commented out).

I never use `svnlite` (it's no longer a feature) or portsnap(8), is there much to gain from being without when building?


```
# WITHOUT_PORTSNAP
# WITHOUT_SVNLITE

WITH_MALLOC_PRODUCTION=yes

# <https://forums.freebsd.org/posts/544812>
# KERNCONF=GENERIC-NODEBUG
KERNCONF=GENERIC-NODEBUG GENERIC

# PORTS_MODULES= emulators/virtualbox-ose-kmod graphics/drm-kmod graphics/drm-current-kmod graphics/gpu-firmware-kmod sysutils/openzfs-kmod
PORTS_MODULES= emulators/virtualbox-ose-kmod graphics/drm-kmod graphics/drm-current-kmod graphics/gpu-firmware-kmod
# PORTS_MODULES= emulators/virtualbox-ose-kmod x11/nvidia-driver
# PORTS_MODULES= graphics/drm-devel-kmod graphics/gpu-firmware-kmod
# PORTS_MODULES= graphics/drm-kmod graphics/gpu-firmware-kmod

# <https://reviews.freebsd.org/D27420#614052>
# BOOT_FRAMEBUFFER_MODE=yes

# <https://lists.freebsd.org/archives/freebsd-current/2021-September/000620.html>
# WITH_DETECT_TZ_CHANGES=yes
```

/usr/local/etc/poudriere.d/make.conf


```
## ALLOW_MAKE_JOBS=YES
#
# no influence on the number of processes spawned
# <https://github.com/freebsd/poudriere/issues/867>
#
# MAKE_JOBS_NUMBER=3


## bsdisks
#
# I imagined a debug build, however
# <https://www.freshports.org/sysutils/bsdisks/#config>
# there are no options to configure.


## Citrix Receiver
#
# <https://forums.FreeBSD.org/threads/71438/post-517873>
#
LICENSES_ACCEPTED += commercial
#
# I'm not sure about certification, for example:
#
# > Can't open
# > /usr/local/poudriere/ports/default/distfiles/QuoVadisEuropeEVSSLCAG1.crt
# > for reading, No such file or directory
#
# -- compare with /etc/make.conf and building without poudriere
#
ICA_CERTS=QuoVadisEuropeEVSSLCAG1.crt


## LLVM
#
# WITHOUT_LLVM_TARGET_AARCH64=
# WITHOUT_LLVM_TARGET_ARM=
# WITHOUT_LLVM_TARGET_MIPS=
# WITHOUT_LLVM_TARGET_POWERPC=
# WITHOUT_LLVM_TARGET_SPARC=
# WITHOUT_LLVM_TARGET_X86=
# <https://forums.freebsd.org/threads/share-your-make-conf-and-src-conf.63544/#post-430516>
#
WITHOUT_LLVM_TARGET_ALL=


## poudriere-options(8)
#
# Reminding myself of affected ports:
#
# ls -hl /usr/local/etc/poudriere.d/options
# deskutils/recoll
# emulators/wine
# multimedia_webcamd
# www/firefox


## webcamd
#
# <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252099#c5>
# <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252099#c18>
#
# WITH_DEBUG=yes all ports are built for debugging.


## Wine
#
# Huh?
#
# --with-usb += emulators/wine
# emulators_wine_SET += --with-usb
```


----------



## Alain De Vos (Dec 25, 2021)

My latest make.conf:

```
.if ${.CURDIR:M*/archivers/snappy} || ${.CURDIR:M*/astro/geographiclib} || ${.CURDIR:M*/audio/tempest_for_eliza} || ${.CURDIR:M*/converters/libb64} || ${.CURDIR:M*/devel/arm-none-eabi-gcc*} || ${.CURDIR:M*/devel/cmake} || ${.CURDIR:M*/devel/cppunit} || ${.CURDIR:M*/devel/flatcc} || ${.CURDIR:M*/devel/libindicator} || ${.CURDIR:M*/devel/schilybase} || ${.CURDIR:M*/devel/vc} || ${.CURDIR:M*/deskutil/hr-abtt} || ${.CURDIR:M*/graphics/atril} || ${.CURDIR:M*/graphics/grafx2} || ${.CURDIR:M*/graphics/seexpr} || ${.CURDIR:M*/graphics/opencollada} || ${.CURDIR:M*/graphics/opencolorio} || ${.CURDIR:M*/graphics/synfig*} || ${.CURDIR:M*/lang/gnu-apl} || ${.CURDIR:M*/lang/gcc*} || ${.CURDIR:M*/lang/ponyc} || ${.CURDIR:M*/math/libpoly} || ${.CURDIR:M*/multimedia/dav1d} || ${.CURDIR:M*/multimedia/py-av} || ${.CURDIR:M*/net/fbzmq} || ${.CURDIR:M*/net-mgmt/netdata} || ${.CURDIR:M*/print/harfbuzz*} || ${.CURDIR:M*/security/libssh} || ${.CURDIR:M*/sysutils/slurm*} || ${.CURDIR:M*/textproc/libexttextcat} || ${.CURDIR:M*/textproc/libnumbertext} || ${.CURDIR:M*/textproc/tinyxml*} || ${.CURDIR:M*/science/openbabel} || ${.CURDIR:M*/sysutils/grub2-bhyve} || ${.CURDIR:M*/sysutils/openzfs} || ${.CURDIR:M*/x11/xsel-conrad}
MYFLAGS=""
.else
MYFLAGS="-fno-lto -O2 -pipe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fstack-protector -fno-short-enums -fexceptions -fident -fverbose-asm -frecord-gcc-switches -fvisibility=default -fomit-frame-pointer -fstrict-aliasing"
.endif

.if ${.CURDIR:M*/usr/ports*}
CFLAGS+="${MYFLAGS}"
CXXFLAGS+="${MYFLAGS}"
.endif

BATCH=yes
CCACHE_DIR=/ccache
CPUTYPE?=core-avx-i
DISABLE_LICENSES=yes
MAKE_JOBS_NUMBER=6
MAKE_JOBS_UNSAFE=yes
WITHOUT_MANCOMPRESS=yes
WITH_CCACHE_BUILD=yes
MTREE_FOLLOWS_SYMLINKS= -L

DEFAULT_VERSIONS+=gcc=11
DEFAULT_VERSIONS+=llvm=13
DEFAULT_VERSIONS+=lua5=5.4
DEFAULT_VERSIONS+=lua=5.4
DEFAULT_VERSIONS+=mysql=10.5m
DEFAULT_VERSIONS+=perl5=5.32
DEFAULT_VERSIONS+=perl=5.32
DEFAULT_VERSIONS+=pgsql=13
DEFAULT_VERSIONS+=php=8.0
DEFAULT_VERSIONS+=python3=3.8
DEFAULT_VERSIONS+=python=3.8
DEFAULT_VERSIONS+=ruby2=2.7
DEFAULT_VERSIONS+=ruby=2.7
DEFAULT_VERSIONS+=ssl=openssl
DEFAULT_VERSIONS+=tcltk=8.6

OPTIONS_SET+=BOOTSTRAP
OPTIONS_SET+=FLANG
OPTIONS_SET+=FORTRAN
OPTIONS_SET+=APNG
OPTIONS_SET+=PNG
OPTIONS_SET+=GS_ijs
OPTIONS_SET+=7ZIP
OPTIONS_SET+=A4
OPTIONS_SET+=A52
OPTIONS_SET+=AAC
OPTIONS_SET+=AALIB
OPTIONS_SET+=AES 
OPTIONS_SET+=AMDGPU
OPTIONS_SET+=AMIDI
OPTIONS_SET+=AMR_NB
OPTIONS_SET+=AMR_WB
OPTIONS_SET+=AOM
OPTIONS_SET+=ASPELL
OPTIONS_SET+=ASS
OPTIONS_SET+=AUDIOCD
OPTIONS_SET+=AVX
OPTIONS_SET+=AVX 
OPTIONS_SET+=BLURAY
OPTIONS_SET+=BROTLI
OPTIONS_SET+=BS2B
OPTIONS_SET+=BZIP2
OPTIONS_SET+=CACA
OPTIONS_SET+=CAIRO
OPTIONS_SET+=CAJA
OPTIONS_SET+=CDDA
OPTIONS_SET+=CDIO
OPTIONS_SET+=CDPARANOIA
OPTIONS_SET+=CELT
OPTIONS_SET+=CODEC2
OPTIONS_SET+=COMPFACE
OPTIONS_SET+=CRACKLIB
OPTIONS_SET+=CRYPTO
OPTIONS_SET+=CUPS
OPTIONS_SET+=CUPS 
OPTIONS_SET+=CURL
OPTIONS_SET+=CURSES
OPTIONS_SET+=DBENGINE
OPTIONS_SET+=DCA
OPTIONS_SET+=DEMO
OPTIONS_SET+=DEMOS
OPTIONS_SET+=DIRECTFB
OPTIONS_SET+=DJVU
OPTIONS_SET+=DOCS
OPTIONS_SET+=DV
OPTIONS_SET+=EGL
OPTIONS_SET+=ENCA
OPTIONS_SET+=EPUB
OPTIONS_SET+=EXAMPLES
OPTIONS_SET+=EXTRADOCS
OPTIONS_SET+=FAAC
OPTIONS_SET+=FAAD
OPTIONS_SET+=FDK_AAC
OPTIONS_SET+=FFMPEG
OPTIONS_SET+=FFMPEGTHUMBNAILER
OPTIONS_SET+=FLAC
OPTIONS_SET+=FLTK
OPTIONS_SET+=FREEIPMI
OPTIONS_SET+=FREI0R
OPTIONS_SET+=FRIBIDI
OPTIONS_SET+=GIF
OPTIONS_SET+=GLESV2
OPTIONS_SET+=GMP
OPTIONS_SET+=GOOM
OPTIONS_SET+=GOPLUGIN
OPTIONS_SET+=GRAPHICSMAGICK
OPTIONS_SET+=GRAPHITE
OPTIONS_SET+=GSM
OPTIONS_SET+=GSPELL
OPTIONS_SET+=GSSAPI_NONE
OPTIONS_SET+=GTK
OPTIONS_SET+=GTK3
OPTIONS_SET+=GTKSPELL
OPTIONS_SET+=GZIP
OPTIONS_SET+=HAN
OPTIONS_SET+=HIGHLIGHT
OPTIONS_SET+=HIGHLIGHTING
OPTIONS_SET+=HINTING_FULL
OPTIONS_SET+=HSPELL
OPTIONS_SET+=HTMLDOCS
OPTIONS_SET+=HTMLHELP
OPTIONS_SET+=HTTP_REDIS
OPTIONS_SET+=HUNSPELL
OPTIONS_SET+=IJS
OPTIONS_SET+=ILBC
OPTIONS_SET+=INFLUXDB
OPTIONS_SET+=INSULTS
OPTIONS_SET+=IPC
OPTIONS_SET+=IPV6
OPTIONS_SET+=ISPELL
OPTIONS_SET+=JASPER
OPTIONS_SET+=JPEG
OPTIONS_SET+=JPEG 
OPTIONS_SET+=JPEG2000
OPTIONS_SET+=JSON
OPTIONS_SET+=KATE
OPTIONS_SET+=KVAZAAR
OPTIONS_SET+=LADSPA
OPTIONS_SET+=LAME
OPTIONS_SET+=LAME 
OPTIONS_SET+=LAPACK
OPTIONS_SET+=LDAP
OPTIONS_SET+=LIBCACA
OPTIONS_SET+=LIBMNG
OPTIONS_SET+=LIBRSVG2
OPTIONS_SET+=LIBSSH2
OPTIONS_SET+=LIBVISUAL
OPTIONS_SET+=LIBXML2
OPTIONS_SET+=LIBYAML
OPTIONS_SET+=LSOF
OPTIONS_SET+=LUA
OPTIONS_SET+=LV2
OPTIONS_SET+=LZ4
OPTIONS_SET+=LZMA
OPTIONS_SET+=LZO
OPTIONS_SET+=LZO2
OPTIONS_SET+=MAD
OPTIONS_SET+=MAILDIR
OPTIONS_SET+=MAIL_IMAP
OPTIONS_SET+=MAIL_SMTP
OPTIONS_SET+=MAIL_SSL
OPTIONS_SET+=MAN3
OPTIONS_SET+=MANPAGES
OPTIONS_SET+=MATROSKA
OPTIONS_SET+=MAXIMA
OPTIONS_SET+=MENCODER
OPTIONS_SET+=MJPEGTOOLS
OPTIONS_SET+=MKFONTSCALE
OPTIONS_SET+=MMX
OPTIONS_SET+=MODPLUG
OPTIONS_SET+=MONGO
OPTIONS_SET+=MONGODB
OPTIONS_SET+=MONGOSTAT
OPTIONS_SET+=MONGOTOP
OPTIONS_SET+=MOUNT
OPTIONS_SET+=MP3LAME
OPTIONS_SET+=MP3OGG
OPTIONS_SET+=MPC
OPTIONS_SET+=MPEG2
OPTIONS_SET+=MPEG2DEC
OPTIONS_SET+=MPEG2ENC
OPTIONS_SET+=MPG123
OPTIONS_SET+=MPG321
OPTIONS_SET+=MPLAYER
OPTIONS_SET+=MPV
OPTIONS_SET+=MTPDEV
OPTIONS_SET+=MUPDF
OPTIONS_SET+=MUSEPACK
OPTIONS_SET+=MYSOFA
OPTIONS_SET+=MYSQL
OPTIONS_SET+=MYSQL_JDBC
OPTIONS_SET+=NCURSES
OPTIONS_SET+=NDBM
OPTIONS_SET+=NEON
OPTIONS_SET+=NEWSYSLOG
OPTIONS_SET+=NGINX
OPTIONS_SET+=NONFREE
OPTIONS_SET+=NORMALIZE
OPTIONS_SET+=NOTIFY
OPTIONS_SET+=NOTIFYD
OPTIONS_SET+=NUMPY
OPTIONS_SET+=OCAML 
OPTIONS_SET+=OCTAVE
OPTIONS_SET+=ODBC
OPTIONS_SET+=OGG
OPTIONS_SET+=OGG 
OPTIONS_SET+=OPENAL
OPTIONS_SET+=OPENBLAS
OPTIONS_SET+=OPENCL
OPTIONS_SET+=OPENGL
OPTIONS_SET+=OPENH264
OPTIONS_SET+=OPENJPEG
OPTIONS_SET+=OPENSSL
OPTIONS_SET+=OPUS
OPTIONS_SET+=P7ZIP
OPTIONS_SET+=PANGO
OPTIONS_SET+=PCRE
OPTIONS_SET+=PCRE1
OPTIONS_SET+=PCRE2
OPTIONS_SET+=PDF
OPTIONS_SET+=PGO
OPTIONS_SET+=PGSQL
OPTIONS_SET+=PGSQL_JDBC
OPTIONS_SET+=PIE
OPTIONS_SET+=PLATFORM_WAYLAND
OPTIONS_SET+=PLATFORM_X11
OPTIONS_SET+=PLOTUTILS
OPTIONS_SET+=PLUGINS
OPTIONS_SET+=POPCNT 
OPTIONS_SET+=POPPLER
OPTIONS_SET+=PORTAUDIO
OPTIONS_SET+=POSTGRES
OPTIONS_SET+=POSTPROC
OPTIONS_SET+=PROMETHEUS
OPTIONS_SET+=PSGHOSTSCRIPT
OPTIONS_SET+=PSHYBRID
OPTIONS_SET+=PSMUPDF
OPTIONS_SET+=PSPELL
OPTIONS_SET+=PSPOPPLER
OPTIONS_SET+=PYGMENTS
OPTIONS_SET+=PYTHON
OPTIONS_SET+=QML
OPTIONS_SET+=QT5
OPTIONS_SET+=QTWEBENGINE
OPTIONS_SET+=QTWEBKIT
OPTIONS_SET+=R
OPTIONS_SET+=RABBITMQ
OPTIONS_SET+=RAV1E
OPTIONS_SET+=RCC
OPTIONS_SET+=RE2
OPTIONS_SET+=REDIS
OPTIONS_SET+=REDIS2
OPTIONS_SET+=REGEX
OPTIONS_SET+=RELRO
OPTIONS_SET+=RTMP
OPTIONS_SET+=RUBY
OPTIONS_SET+=RXVT_SCROLLBAR
OPTIONS_SET+=SAGE
OPTIONS_SET+=SCHROEDINGER
OPTIONS_SET+=SCILAB
OPTIONS_SET+=SCIPY
OPTIONS_SET+=SDL
OPTIONS_SET+=SETXKBMAP
OPTIONS_SET+=SHARED
OPTIONS_SET+=SIMD
OPTIONS_SET+=SLANG
OPTIONS_SET+=SNAPPY
OPTIONS_SET+=SNDFILE
OPTIONS_SET+=SNDIO
OPTIONS_SET+=SNMP
OPTIONS_SET+=SOCKS
OPTIONS_SET+=SOURCE
OPTIONS_SET+=SOURCES
OPTIONS_SET+=SOURCE_HIGHLIGHT
OPTIONS_SET+=SOXR
OPTIONS_SET+=SPARSE
OPTIONS_SET+=SPEEDPITCH
OPTIONS_SET+=SPELL
OPTIONS_SET+=SPELLCHECK
OPTIONS_SET+=SPELL_CHECK
OPTIONS_SET+=SPHINX
OPTIONS_SET+=SQL
OPTIONS_SET+=SQLITE
OPTIONS_SET+=SQLITE3
OPTIONS_SET+=SSE
OPTIONS_SET+=SSE2
OPTIONS_SET+=SSE3
OPTIONS_SET+=SSE4_1
OPTIONS_SET+=SSH
OPTIONS_SET+=SSL
OPTIONS_SET+=SSL3
OPTIONS_SET+=SSSE3
OPTIONS_SET+=SSWF
OPTIONS_SET+=SUITESPARSE
OPTIONS_SET+=SVG
OPTIONS_SET+=SVGALIB
OPTIONS_SET+=SVTAV1
OPTIONS_SET+=SWSCALE
OPTIONS_SET+=SYNTAX 
OPTIONS_SET+=SYSTRAY
OPTIONS_SET+=TCL
OPTIONS_SET+=TCLMAN
OPTIONS_SET+=TCLTK
OPTIONS_SET+=TFTP
OPTIONS_SET+=THEMES
OPTIONS_SET+=THEORA
OPTIONS_SET+=THUMBNAILER
OPTIONS_SET+=TIFF
OPTIONS_SET+=TK
OPTIONS_SET+=TKINTER
OPTIONS_SET+=TKMAN
OPTIONS_SET+=TKMIB
OPTIONS_SET+=TOML
OPTIONS_SET+=TOOLAME
OPTIONS_SET+=TOOLBAR
OPTIONS_SET+=TWOLAME
OPTIONS_SET+=UNIXODBC
OPTIONS_SET+=UNZIP
OPTIONS_SET+=URLS
OPTIONS_SET+=UTILS
OPTIONS_SET+=UVMETER
OPTIONS_SET+=VAAPI
OPTIONS_SET+=VCD
OPTIONS_SET+=VDPAU
OPTIONS_SET+=VIDEO_KMSDRM
OPTIONS_SET+=VIDEO_OPENGL
OPTIONS_SET+=VIDEO_WAYLAND
OPTIONS_SET+=VIDEO_X11
OPTIONS_SET+=VIDSTAB
OPTIONS_SET+=VLC
OPTIONS_SET+=VMAF
OPTIONS_SET+=VNC
OPTIONS_SET+=VO_AMRWBENC
OPTIONS_SET+=VPX
OPTIONS_SET+=WAVE
OPTIONS_SET+=WAVPACK
OPTIONS_SET+=WAYLAND
OPTIONS_SET+=WEATHER
OPTIONS_SET+=WEBENGINE
OPTIONS_SET+=WEBKIT
OPTIONS_SET+=WEBP
OPTIONS_SET+=WEBVFX
OPTIONS_SET+=WIDGETS
OPTIONS_SET+=WIDGETS 
OPTIONS_SET+=WMCTRL
OPTIONS_SET+=X
OPTIONS_SET+=X11
OPTIONS_SET+=X264
OPTIONS_SET+=X265
OPTIONS_SET+=XATTR
OPTIONS_SET+=XAUTH
OPTIONS_SET+=XCALC
OPTIONS_SET+=XCLOCK
OPTIONS_SET+=XDOTOOL
OPTIONS_SET+=XDPYINFO
OPTIONS_SET+=XDRIINFO
OPTIONS_SET+=XFCE
OPTIONS_SET+=XFCE4
OPTIONS_SET+=XFT
OPTIONS_SET+=XINE
OPTIONS_SET+=XINERAMA
OPTIONS_SET+=XML
OPTIONS_SET+=XRANDR
OPTIONS_SET+=XSANE
OPTIONS_SET+=XVID
OPTIONS_SET+=XVIDEO
OPTIONS_SET+=XVMC
OPTIONS_SET+=YELP
OPTIONS_SET+=ZEMBEREK
OPTIONS_SET+=ZIMG
OPTIONS_SET+=ZIP
OPTIONS_SET+=ZLIB
OPTIONS_SET+=ZMQ
OPTIONS_SET+=ZSH
OPTIONS_SET+=ZSTANDARD
OPTIONS_SET+=ZSTD
OPTIONS_SET+=ZVBI

OPTIONS_UNSET+=MULTILIB
OPTIONS_UNSET+=SOUNDTOUCH
OPTIONS_UNSET+=ALSA
OPTIONS_UNSET+=AVAHI
OPTIONS_UNSET+=DEBUG
OPTIONS_UNSET+=DBUS 
OPTIONS_UNSET+=GOLD
OPTIONS_UNSET+=GSSAPI
OPTIONS_UNSET+=GSSAPI_BASE
OPTIONS_UNSET+=GSSAPI_HEIMDAL
OPTIONS_UNSET+=GSSAPI_MIT
OPTIONS_UNSET+=IMAGEMAGICK
OPTIONS_UNSET+=IMAGEMAGICK6
OPTIONS_UNSET+=IMAGEMAGICK7
OPTIONS_UNSET+=JACK
OPTIONS_UNSET+=KERBEROS
OPTIONS_UNSET+=KERB_GSSAPI
OPTIONS_UNSET+=LDAPS
OPTIONS_UNSET+=LETTER
OPTIONS_UNSET+=LIGHTDM
OPTIONS_UNSET+=LIRC
OPTIONS_UNSET+=LTO
OPTIONS_UNSET+=MAGICK
OPTIONS_UNSET+=MDNSRESPONDER
OPTIONS_UNSET+=NAS
OPTIONS_UNSET+=NFS
OPTIONS_UNSET+=NLS
OPTIONS_UNSET+=NTLM
OPTIONS_UNSET+=OPENMP
OPTIONS_UNSET+=PGO
OPTIONS_UNSET+=PROFILE
OPTIONS_UNSET+=PROFILING
OPTIONS_UNSET+=PULSE
OPTIONS_UNSET+=PULSEAUDIO
OPTIONS_UNSET+=SID
OPTIONS_UNSET+=SIDPLAY
OPTIONS_UNSET+=SMB
OPTIONS_UNSET+=SUDO
OPTIONS_UNSET+=V4L
OPTIONS_UNSET+=V4L2
OPTIONS_UNSET+=VULKAN
OPTIONS_UNSET+=WEBCAM
OPTIONS_UNSET+=WEBCAMD
OPTIONS_UNSET+=ZBAR
OPTIONS_UNSET+=ZEITGEIST
```


----------



## sidetone (Dec 25, 2021)

Your make.conf has OPTIONS_SET+= and OPTIONS_UNSET+= listed so many times. Each OPTIONS_SET+ and OPTIONS_UNSET+ can be listed once with additional OPTIONS_SET/UNSET without the +, with a space for each option, and listed with a \ at the end for each line to continue that option. It seems like you're trying to keep them organized alphabetically, though that can be done without exact repetitions for OPTIONS.


----------



## grahamperrin@ (Dec 26, 2021)

grahamperrin said:


> ```
> ## bsdisks
> #
> # I imagined a debug build, however
> ...



<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253149#c4> reminds me:



> … Compile the port `WITH_DEBUG=yes`, or …



I'll correct my file (and the copy that's above). *PS* not rushing to make the correction because I'm unsure whether `WITH_DEBUG_PORTS=sysutils/bsdisks` is having the required effect.


----------



## Dan The Man (Nov 5, 2022)

For me:


```
cd /usr/src/sys/amd64/conf
cp GENERIC-NODEBUG MYKERNEL
echo "options         BHYVE_SNAPSHOT" >> MYKERNEL
cd /usr/src
make -j12 buildworld -DWITH_BHYVE_SNAPSHOT -DWITH_MALLOC_PRODUCTION
make -j12 buildkernel KERNCONF=MYKERNEL
```


----------

