Bug 260098

Summary: usr.sbin/syslogd ld: error: undefined symbol: iovlist_truncate WITHOUT_<alll> build options
Product: Base System Reporter: Michael Dexter <editor>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: emaste
Priority: ---    
Version: 13.0-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Extended but not complete build output none

Description Michael Dexter 2021-11-29 02:28:40 UTC
If specifying all WITHOUT_* build options in src.conf with the exception of WITHOUT_AUTO_OBJ WITHOUT_UNIFIED_OBJDIR WITHOUT_INSTALLLIB, usr.sbin/syslogd fails with the following message on the 2021-11-24 13.0-STABLE snapshot, built on 13.0-RELEASE:

...
--- all_subdir_usr.bin ---
--- all_subdir_usr.bin/systat ---
--- fetch.o ---
cc -target x86_64-unknown-freebsd13.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp
 -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin  -O2 -pipe -fno-common   -DNDEBUG -M
D  -MF.depend.fetch.o -MTfetch.o -std=gnu99 -Wno-format-zero-length -nobuiltinin
c -idirafter /usr/lib/clang/11.0.1/include -Qunused-arguments   -c /usr/src/usr.
bin/systat/fetch.c -o fetch.o
--- all_subdir_usr.sbin ---
--- all_subdir_usr.sbin/syslogd ---
ld: error: undefined symbol: iovlist_truncate
>>> referenced by syslogd.c
>>>               syslogd.o:(fprintlog_write)
--- all_subdir_usr.bin ---
...

I do not know enough about ld to know where to start but I am happy to run any desired tests such as suspect build options.
Comment 1 Michael Dexter 2021-11-29 02:44:55 UTC
Created attachment 229773 [details]
Extended but not complete build output

Adding build log output
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-11-29 15:12:15 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=23566768d92aed2a59d3e5d9392824cbe83b867f

commit 23566768d92aed2a59d3e5d9392824cbe83b867f
Author:     Artem Khramov <akhramov@pm.me>
AuthorDate: 2021-06-12 17:21:13 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-11-29 15:10:53 +0000

    syslogd: fix WITHOUT_INET builds

    Since 2d82b47 syslogd can't be built with `WITHOUT_INET` or
    `WITHOUT_INET6` build variables set, because `iovlist_truncate` is not
    defined but used.

    This change wraps the problematic `iovlist_truncate` call within ifdef
    directive.  It's compiled out in this situation...

    Pull Request:   https://github.com/freebsd/freebsd-src/pull/475
    Reviewed by:    imp@ (commit message slightly tweaked)

    (cherry picked from commit f06fa6f88733d709a5f9dd3a27b1a08571e49e6b)

    PR:             260098

 usr.sbin/syslogd/syslogd.c | 2 ++
 1 file changed, 2 insertions(+)