14.3-STABLE make installworld error, TMPDIR in /etc/src.conf isn't used?

I'm updating a 14.0-CURRENT system to CURRENT, make buildkernel and make build installworld completed without issue, as did make installkernel.

But make installworld errors out at the very beginning with this error:

Code:
make[2]: "/usr/src/Makefile.inc1" line 596: warning: "MAKEFLAGS= CPUTYPE=dummy make -f /dev/null  -m /usr/src/share/mk MK_AUTO_OBJ=no -V CPUTYPE" returned non-zero status
make[2]: "/usr/src/Makefile.inc1" line 599: CPUTYPE global should be set with ?=.

make[2]: stopped in /usr/src
        0.01 real         0.01 user         0.00 sys
*** [installworld] Error code 1

There is nothing regarding CPUTYPE set in make.conf or src.conf. Does anyone have an idea what is going on here? Thanks!
 
 
'm updating a 14.0-CURRENT system to CURRENT,
Are you sure the source tree on your system is 15.0-CURRENT (alias main), because the warnings do not correspond with the code lines in Makefile.inc1:
Rich (BB code):
make[2]: "/usr/src/Makefile.inc1" line 596: warning: "MAKEFLAGS= CPUTYPE=dummy make -f /dev/null -m /usr/src/share/mk MK_AUTO_OBJ=no -V CPUTYPE" returned non-zero status
make[2]: "/usr/src/Makefile.inc1" line 599: CPUTYPE global should be set with ?=.

. https://cgit.freebsd.org/src/tree/Makefile.inc1#n596
Code:
596 EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/}
597 .endif
598 .if !defined(PKG_VERSION)
599 PKG_VERSION:=   ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g}
 
/etc/src.conf and /etc/make.conf?
make.conf
Code:
FORCE_MAKE_JOBS=YES
MAKE_JOBS_NUMBER=45

#WITH_CCACHE_BUILD=yes
#CCACHE_DIR=/root/.ccache

BATCH=YES

OPTIONS_SET+=IPV6 SSL PERL TCL READLINE\
             PYTHON DOCS THREADS MANPAGES OPENSSL PCRE PTHREAD KQUEUE \
             GSSAPI_NONE

OPTIONS_UNSET+=NLS EXAMPLES DEBUG ASPELL GNUTLS IDN X11 GUI GSSAPI

security_oidentd_UNSET= MASQ
security_oidentd_SET= DEBUG

DEFAULT_VERSIONS+=perl5=5.36
DEFAULT_VERSIONS+=python=3.11 python3=3.11

src.conf
Code:
KERNCONFDIR=/usr/KERNCONF
KERNCONF=[...]

#WITHOUT_SYSTEM_COMPILER=YES
#WITH_LLD_BOOTSTRAP=YES
#WITHOUT_SYSTEM_LINKER=YES

#Don't link dynamically
#WITHOUT_DYNAMICROOT=YES

WITHOUT_SHARED_TOOLCHAIN=YES

#other tmpdir (/tmp is mounted noexec)
TMPDIR=/usr/tmp

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

FORCE_MAKE_JOBS=yes
MAKE_JOBS_NUMBER=45

#don't build 32-bit libs
WITHOUT_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_AT=YES
WITHOUT_ATM=YES
WITHOUT_AUTHPF=YES
WITHOUT_BHYVE=YES
WITHOUT_BLUETOOTH=YES
WITHOUT_BOOTPARAMD=YES
WITHOUT_BOOTPD=YES
WITHOUT_BSDINSTALL=YES
WITHOUT_BSNMP=YES
WITHOUT_CALENDAR=YES
WITHOUT_CCD=YES
WITHOUT_CTM=YES
WITHOUT_FINGER=YES
WITHOUT_FLOPPY=YES
WITHOUT_FORTH=YES
WITHOUT_GSSAPI=YES
WITHOUT_GOOGLETEST=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

#python311 breaks
#WITHOUT_NIS=YES
WITHOUT_NLS=YES
WITHOUT_NLS_CATALOGS=YES
WITHOUT_NS_CACHING=YES
WITHOUT_OFED=YES
WITHOUT_PF=YES
WITHOUT_PPP=YES
WITHOUT_RADIUS_SUPPORT=YES
WITHOUT_RBOOTD=YES
WITHOUT_RCMDS=YES
WITHOUT_RCS=YES
WITHOUT_ROUTED=YES
WITHOUT_SVN=yes
WITHOUT_SVNLITE=YES
WITHOUT_TALK=YES
#WITHOUT_TESTS=YES
WITHOUT_TCP_WRAPPERS=YES
WITHOUT_TFTP=YES
WITHOUT_TIMED=YES
WITHOUT_USB_GADGET_EXAMPLES=YES
WITHOUT_WIRELESS=YES
#WITHOUT_ZFS=YES
WITHOUT_LOADER_ZFS=YES

KERNCONF should it be relevant

Code:
cpu             HAMMER
ident          [...]-SMP-NOMOD

#makeoptions    DEBUG=-g                # Build kernel with gdb(1) debug symbols
#makeoptions    WITH_CTF=1              # Run ctfconvert(1) for DTrace support

# do not make modules
makeoptions     NO_MODULES=yes

# pty for linux compat
device pty

options         ACCEPT_FILTER_HTTP

# filemon for META builds
device filemon

options         SCHED_ULE               # ULE scheduler
options         NUMA                    # Non-Uniform Memory Architecture support
options         PREEMPTION              # Enable kernel thread preemption
#options        VIMAGE                  # Subsystem virtualization, e.g. VNET
options         INET                    # InterNETworking
options         INET6                   # IPv6 communications protocols
options         IPSEC_SUPPORT           # Allow kldload of ipsec and tcpmd5
options         NETLINK                 # netlink(4) support
#options        ROUTE_MPATH             # Multipath routing support
#options        FIB_ALGO                # Modular fib lookups
options         TCP_OFFLOAD             # TCP offload
options         TCP_BLACKBOX            # Enhanced TCP event logging
#options        TCP_HHOOK               # hhook(9) framework for TCP
options         TCP_RFC7413             # TCP Fast Open
#options        SCTP_SUPPORT            # Allow kldload of SCTP
options         KERN_TLS                # TLS transmit & receive offload
options         FFS                     # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
#options        UFS_ACL                 # Support for access control lists
#options        UFS_EXTATTR             # Extended attributes for eg ACLs
#options        UFS_EXTATTR_AUTOSTART   # 
options         UFS_DIRHASH             # Improve performance on big directories
options         UFS_GJOURNAL            # Enable gjournal-based UFS journaling
options         QUOTA                   # Enable disk quotas for UFS
#options        MD_ROOT                 # MD is a potential root device
#options        NFSCL                   # New Network Filesystem Client
#options        NFSD                    # New Network Filesystem Server
#options        NFSLOCKD                # Network Lock Manager
#options        NFS_ROOT                # NFS usable as /, requires NFSCL
options         MSDOSFS                 # MSDOS Filesystem
options         CD9660                  # ISO 9660 Filesystem
options         PROCFS                  # Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         TMPFS                   # Efficient memory filesystem
#options        GEOM_RAID               # Soft RAID functionality.
options         GEOM_LABEL              # Provides labelization
#options        EFIRT                   # EFI Runtime Services support
options         GEOM_ELI                # Disk encryption.
#options        COMPAT_FREEBSD32        # Compatible with i386 binaries
#options        COMPAT_FREEBSD4         # Compatible with FreeBSD4
#options        COMPAT_FREEBSD5         # Compatible with FreeBSD5
#options        COMPAT_FREEBSD6         # Compatible with FreeBSD6
#options        COMPAT_FREEBSD7         # Compatible with FreeBSD7
#options        COMPAT_FREEBSD9         # Compatible with FreeBSD9
options         COMPAT_FREEBSD10        # Compatible with FreeBSD10
options         COMPAT_FREEBSD11        # Compatible with FreeBSD11
options         COMPAT_FREEBSD12        # Compatible with FreeBSD12
options         COMPAT_FREEBSD13        # Compatible with FreeBSD13
options         SCSI_DELAY=1000         # Delay (in ms) before probing SCSI
#options        KTRACE                  # ktrace(1) support
#options        STACK                   # stack(9) support
options         SYSVSHM                 # SYSV-style shared memory
options         SYSVMSG                 # SYSV-style message queues
options         SYSVSEM                 # SYSV-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options         PRINTF_BUFR_SIZE=512    # Prevent printf output being interspersed.
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         HWPMC_HOOKS             # Necessary kernel hooks for hwpmc(4)
options         AUDIT                   # Security event auditing
options         CAPABILITY_MODE         # Capsicum capability mode
options         CAPABILITIES            # Capsicum capabilities
options         MAC                     # TrustedBSD MAC Framework
#options        KDTRACE_FRAME           # Ensure frames are compiled in
#options        KDTRACE_HOOKS           # Kernel DTrace hooks
options         DDB_CTF                 # Kernel ELF linker loads CTF data
options         INCLUDE_CONFIG_FILE     # Include this file in kernel
options         RACCT                   # Resource accounting framework
#options        RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options         RCTL                    # Resource limits

# Debugging support.  Always need this:
options         KDB                     # Enable kernel debugger support.
options         KDB_TRACE               # Print a stack trace for a panic.
# For full debugger support use (turn off in stable branch):
#options         BUF_TRACKING            # Track buffer history
options         DDB                     # Support DDB.
#options         FULL_BUF_TRACKING       # Track more buffer history
#options         GDB                     # Support remote GDB.
#options         DEADLKRES               # Enable the deadlock resolver
#options         INVARIANTS              # Enable calls of extra sanity checking
#options         INVARIANT_SUPPORT       # Extra sanity checks of internal structures, required by INVARIANTS
#options         QUEUE_MACRO_DEBUG_TRASH # Trash queue(2) internal pointers on invalidation
#options         WITNESS                 # Enable checks to detect deadlocks and cycles
#options         WITNESS_SKIPSPIN        # Don't run witness on spinlocks for speed
#options         MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
#options         VERBOSE_SYSINIT=0       # Support debug.verbose_sysinit, off by default

# Kernel Sanitizers
#options        COVERAGE                # Generic kernel coverage. Used by KCOV
#options        KCOV                    # Kernel Coverage Sanitizer
# Warning: KUBSAN can result in a kernel too large for loader to load
#options        KUBSAN                  # Kernel Undefined Behavior Sanitizer
#options        KCSAN                   # Kernel Concurrency Sanitizer

# Kernel dump features.
#options         EKCD                    # Support for encrypted kernel dumps
#options         GZIO                    # gzip-compressed kernel and user dumps
#options         ZSTDIO                  # zstd-compressed kernel and user dumps
#options         DEBUGNET                # debugnet networking
#options         NETDUMP                 # netdump(4) client support
#options         NETGDB                  # netgdb(4) client support

# Make an SMP-capable kernel by default
options         SMP                     # Symmetric MultiProcessor Kernel
options         EARLY_AP_STARTUP

# File descriptor filesystem for bash
device          fdescfs

# Hardware Performance Monitoring Counter support
device          hwpmc

# OpenIPMI compatible IPMI interface driver
#device          ipmi

# Intel ICH watchdog interrupt timer
device          ichwd

# Enable NIC polling
# NICs: bge, igb, ixgb, em, dc, fwe, fwip, fxp, nfe,
#       nge, re, rl, sf, sis, ste, stge, vge, vr, xl
options         DEVICE_POLLING

# Change console text color to green
options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)
options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)
options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)


# Increase scroll-back buffer from default 100 lines
options         SC_HISTORY_SIZE=1000

# remove mouse support in console
#options         SC_NO_SYSMOUSE

# vt options
#options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)
#options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)

# If KDB is compiled in, reboot on panic instead of dropping into debugger
#options         KDB_UNATTENDED

# Enable set-uid directory bit (only when necessary!)
#options                SUIDDIR

# allow watch(8)
device         snp

options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=2000
options         IPFIREWALL_DEFAULT_TO_ACCEPT
#options                IPFIREWALL_NAT
#options                LIBALIAS
#options                DUMMYNET
options         IPDIVERT

options         HZ=1000
#options                IPSTEALTH


# CPU frequency control
device          cpufreq

# Bus support.
device          acpi
#device         smbios
options         IOMMU
device          pci
options         PCI_HP                  # PCI-Express native HotPlug
options         PCI_IOV                 # PCI SR-IOV support

#options        COMPAT_LINUXKPI

# Enable support for the kernel PLL to use an external PPS signal,
# under supervision of [x]ntpd(8)
# More info in ntpd documentation: http://www.eecis.udel.edu/~ntp

options        PPS_SYNC

# Floppy drives
#device         fdc

# ATA controllers
#device         ahci                    # AHCI-compatible SATA controllers
device          ata                     # Legacy ATA/SATA controllers
options         ATA_STATIC_ID           # Static device numbering
#device         mvs                     # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
#device         siis                    # SiliconImage SiI3124/SiI3132/SiI3531 SATA

# ATA/SCSI peripherals
device          scbus                   # SCSI bus (required for ATA/SCSI)
#device         ch                      # SCSI media changers
device          da                      # Direct Access (disks)
#device         sa                      # Sequential Access (tape etc)
device          cd                      # CD
device          pass                    # Passthrough device (direct ATA/SCSI access)
device          ses                     # Enclosure Services (SES and SAF-TE)
#device         ctl                     # CAM Target Layer

# RAID controllers
device          mfi                     # LSI MegaRAID SAS

# NVM Express (NVMe) support
#device         nvme                    # base NVMe driver
#device         nvd                     # expose NVMe namespaces as disks, depends on nvme

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc                  # AT keyboard controller
device          atkbd                   # AT keyboard
#device         psm                     # PS/2 mouse

device          kbdmux                  # keyboard multiplexer

device          vga                     # VGA video card driver
#options        VESA                    # Add support for VESA BIOS Extensions (VBE)

device          splash                  # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device          sc
#options        SC_PIXEL_MODE           # add support for the raster text mode

# vt is the default video console driver
#device         vt
#device         vt_vga
#device         vt_efifb
#device          vt_vbefb

device          agp                     # support several AGP chipsets

# Serial (COM) ports
device          uart                    # Generic UART driver

device          cxgb

# PCI/PCI-X/PCIe Ethernet NICs that use iflib infrastructure
device          iflib
device          em                      # Intel PRO/1000 Gigabit Ethernet Family

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device          miibus                  # MII bus support
device          bce                     # Broadcom BCM5706/BCM5708 Gigabit Ethernet

# Pseudo devices.
device          crypto                  # core crypto support
device          aesni                   # AES-NI OpenCrypto module
device          loop                    # Network loopback
#device         padlock_rng             # VIA Padlock RNG
device          rdrand_rng              # Intel Bull Mountain RNG
device          ether                   # Ethernet support
#device         vlan                    # 802.1Q VLAN support
#device         tun                     # Packet tunnel.
device          md                      # Memory "disks"
#device         gif                     # IPv6 and IPv4 tunneling
device          xz

#firmware is required for cxgb NIC!
device          firmware                # firmware assist module

#trunked network
#device         lagg

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device          bpf                     # Berkeley packet filter

# USB support
#options        USB_DEBUG               # enable debug msgs
device          uhci                    # UHCI PCI->USB interface
#device         ohci                    # OHCI PCI->USB interface
device          ehci                    # EHCI PCI->USB interface (USB 2.0)
#device         xhci                    # XHCI PCI->USB interface (USB 3.0)
device          usb                     # USB Bus (required)
device          ukbd                    # Keyboard
device          umass                   # Disks/Mass storage - Requires scbus and da

# Additonal devices
device          coretemp
device          cpuctl                  # for CPU microcode updates
device          cryptodev               # /dev/crypto for access to Hardware

# Netmap provides direct access to TX/RX rings on supported NICs
device          netmap                  # netmap(4) support

# evdev interface
options         EVDEV_SUPPORT           # evdev support in legacy drivers
device          evdev                   # input event device support
device          uinput                  # install /dev/uinput cdev

# HID support
options         HID_DEBUG               # enable debug msgs
device          hid                     # Generic HID support
options         IICHID_SAMPLING         # Workaround missing GPIO INTR support
 
I appreciate what you're trying to say, but this is a high availability system and updates happen only when needed:

1:49PM up 731 days, 13:24, 15 users, load averages: 1.07, 1.04, 1.01

I'm not simply lazy. This is also the reason for removing as much as possible from the kernel and userland.
 
KERNCONF should it be relevant
The test environment is not exactly 14-CURRENT, but I couldn't reproduce a stable/14 build (on 14.3-R) and upgrade releng/14.1 (in a VM) with the provided src.conf ('KERNCONF=' with a valid name) and KERNCONF ('ident' with a valid name).

installkernel installworld ran fine (however, the created kernel does not boot pass mountroot> command line in the VMs environment).

For the installworld issue, perhaps try a clean room environment:
Code:
# mv  /usr/src  /usr/src-14stable

# cd  /usr/src-14stable
# env -i  make -j X buildworld buildkernel
Make sure stable/14 src is updated.
 
The test environment is not exactly 14-CURRENT, but I couldn't reproduce a stable/14 build (on 14.3-R) and upgrade releng/14.1 (in a VM) with the provided src.conf ('KERNCONF=' with a valid name) and KERNCONF ('ident' with a valid name).

installkernel installworld ran fine (however, the created kernel does not boot pass mountroot> command line in the VMs environment).

For the installworld issue, perhaps try a clean room environment:
Code:
# mv  /usr/src  /usr/src-14stable

# cd  /usr/src-14stable
# env -i  make -j X buildworld buildkernel
Make sure stable/14 src is updated.
I tried this, didn't work unfortunately:

Code:
make[2]: "/usr/src-14stable/Makefile.inc1" line 596: warning: "MAKEFLAGS= CPUTYPE=dummy make -f /dev/null  -m /usr/src-14stable/share/mk MK_AUTO_OBJ=no -V CPUTYPE" returned non-zero status
make[2]: "/usr/src-14stable/Makefile.inc1" line 599: CPUTYPE global should be set with ?=.

make[2]: stopped in /usr/src-14stable
        0.01 real         0.01 user         0.00 sys
*** Error code 1

Stop.
make[1]: stopped in /usr/src-14stable
*** Error code 1

Stop.

Thanks for the suggestion anyway.
 
I suggest installing once with empty src.conf and make.conf, then do another pass.
I'm reluctant to do this, because it is a system that goes years in between updates. That's why I removed as much from the kernel and userland as possible. The less there is, the less it needs updating.

If I install everything, I will have to do a complete sweep to make sure no stuff is lingering around afterwards.
 
I tried commenting out the part from the makefile, and then I hit some other commands returning non-zero status:

Code:
make[2]: "/usr/src/Makefile.inc1" line 1999: warning: "pkg --version </dev/null 2>/dev/null | awk -F. '/^[0-9.]+$/ {print $1 * 10000 + $2 * 100 + $3}'" returned non-zero status
make[2]: "/usr/src/Makefile.inc1" line 3605: warning: "awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $2}'  '/usr/KERNCONF/IDENT-SMP' ; echo" returned non-zero status

So, the issue is not the CPUTYPE, but that the command defining it is failing when run in installworld. When I run the command that is supposedly returning a non-zero status:

"awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $2}' '/usr/KERNCONF/IDENT-SMP' ; echo"

and then an

"echo $?"

I get "0" as output. So the command DOES return a zero status outside of make installworld. Does that maybe give someone an idea of what's happening here?
 
I had some time today and I figured it out:

This does work:
Code:
make TMPDIR=/usr/tmp -jx installworld

It needs this because /tmp is mounted noexec.

However I didn't need to specify this on the commandine in the past, because TMPDIR=/usr/tmp is defined in /etc/src.conf. I also tried adding it to /etc/src-env.conf, but no effect either.

Has the place where I should define the temp dir changed? If so, where do I put it now?

Obviously I only want to use /usr/tmp for installing world, so I don't want to put it in make.conf. Who knows what will use it when I put it there :)

Any advice?

EDIT: in the "build" manpage, the TMPDIR environment variable is mentioned together with KERNCONF and KERNCONFDIR, both of which are also (and only) defined in my /etc/src.conf, and the latter two *are* properly used by "make (build)kernel"... Is the fact that TMPDIR in /etc/src.conf isn't used for "make installworld" perhaps a bug/regression that I should open a PR about?
 
Back
Top