Bug 283653 - sysutils/seatd: multiple unknown type names
Summary: sysutils/seatd: multiple unknown type names
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL: https://reviews.freebsd.org/D48226
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-27 10:51 UTC by Dan Kotowski
Modified: 2024-12-30 10:26 UTC (History)
2 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments
doas poudriere bulk -I -C -j FreeBSD:15:amd64 -p latest sysutils/seatd (42.11 KB, text/plain)
2024-12-27 10:51 UTC, Dan Kotowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kotowski 2024-12-27 10:51:52 UTC
Created attachment 256192 [details]
doas poudriere bulk -I -C -j FreeBSD:15:amd64 -p latest sysutils/seatd

[ 31% 31/38] cc -Iseatd-launch.p -I. -I.. -I../include -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c11 -D_XOPEN_SOURCE=700 -D__BSD_VISIBLE -D_NETBSD_SOURCE '-DSEATD_VERSION="0.9.1"' '-DSEATD_DEFAULTPATH="/var/run/seatd.sock"' '-DSEATD_INSTALLPATH="/usr/local/bin/seatd"' -Wundef -Wunused -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Wstrict-prototypes -Wimplicit-fallthrough -Wmissing-prototypes -Wno-unknown-warning-option -Wno-unused-command-line-argument -Wvla -Wl,--exclude-libs=ALL -D_FORTIFY_SOURCE=2 '-DREL_SRC_DIR="../"' -DCONSOLEKIT2_ENABLED=1 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -MD -MQ seatd-launch.p/seatd-launch_seatd-launch.c.o -MF seatd-launch.p/seatd-launch_seatd-launch.c.o.d -o seatd-launch.p/seatd-launch_seatd-launch.c.o -c ../seatd-launch/seatd-launch.c

FAILED: seatd-launch.p/seatd-launch_seatd-launch.c.o

cc -Iseatd-launch.p -I. -I.. -I../include -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c11 -D_XOPEN_SOURCE=700 -D__BSD_VISIBLE -D_NETBSD_SOURCE '-DSEATD_VERSION="0.9.1"' '-DSEATD_DEFAULTPATH="/var/run/seatd.sock"' '-DSEATD_INSTALLPATH="/usr/local/bin/seatd"' -Wundef -Wunused -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Wstrict-prototypes -Wimplicit-fallthrough -Wmissing-prototypes -Wno-unknown-warning-option -Wno-unused-command-line-argument -Wvla -Wl,--exclude-libs=ALL -D_FORTIFY_SOURCE=2 '-DREL_SRC_DIR="../"' -DCONSOLEKIT2_ENABLED=1 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -MD -MQ seatd-launch.p/seatd-launch_seatd-launch.c.o -MF seatd-launch.p/seatd-launch_seatd-launch.c.o.d -o seatd-launch.p/seatd-launch_seatd-launch.c.o -c ../seatd-launch/seatd-launch.c

In file included from ../seatd-launch/seatd-launch.c:2:
In file included from /usr/include/poll.h:113:
In file included from /usr/include/ssp/poll.h:30:
/usr/include/ssp/ssp.h:93:54: error: unknown type name '__size_t'
   93 | __ssp_overlap(const void *leftp, const void *rightp, __size_t sz)
      |                                                      ^
/usr/include/ssp/ssp.h:95:2: error: unknown type name '__uintptr_t'; did you mean '__uint128_t'?
   95 |         __uintptr_t left = (__uintptr_t)leftp;
      |         ^
note: '__uint128_t' declared here
/usr/include/ssp/ssp.h:95:22: error: use of undeclared identifier '__uintptr_t'
   95 |         __uintptr_t left = (__uintptr_t)leftp;
      |                             ^
/usr/include/ssp/ssp.h:96:2: error: unknown type name '__uintptr_t'; did you mean '__uint128_t'?
   96 |         __uintptr_t right = (__uintptr_t)rightp;
      |         ^
note: '__uint128_t' declared here
/usr/include/ssp/ssp.h:96:23: error: use of undeclared identifier '__uintptr_t'
   96 |         __uintptr_t right = (__uintptr_t)rightp;
      |                              ^
5 errors generated.



root@pkg1:/usr/ports/sysutils/seatd # freebsd-version -ru
15.0-CURRENT
15.0-CURRENT
root@pkg1:/usr/ports/sysutils/seatd # uname -a
FreeBSD pkg1 15.0-CURRENT FreeBSD 15.0-CURRENT 1500029 amd64
Comment 1 Jan Beich freebsd_committer freebsd_triage 2024-12-27 15:38:49 UTC
Probably regressed by base 74ecdf86d8d2. Why _FORTIFY_SOURCE headers aren't self-contained? 

Note, seatd upstream is cheating _XOPEN_SOURCE via __BSD_VISIBLE *but* Linux (glibc, musl, bionic), Solaris, NetBSD, OpenBSD don't hide CMSG_LEN and MSG_DONTWAIT.
Comment 2 Kyle Evans freebsd_committer freebsd_triage 2024-12-27 22:39:02 UTC
This should be sufficient -- it's not even buildworld-tested, I should have some time to test that and seatd this weekend if nobody else can before that:

diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h
index 6856c5ce6961..489f49a90218 100644
--- a/include/ssp/ssp.h
+++ b/include/ssp/ssp.h
@@ -87,6 +87,7 @@ __ssp_redirect_raw_impl(rtype, fun, symbol, args) { \
 #define __ssp_redirect0(rtype, fun, args, call) \
     __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0, __len)
 
+#include <sys/_types.h>
 #include <machine/_limits.h>
 
 __ssp_inline int
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2024-12-28 21:38:47 UTC
Mark independently had a patch in flight, so sending it his way for next steps; keeping jbeich@ in CC, but moving the PR to "Base System" since it's actually a header issue.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-12-29 17:59:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=9ba7351fcfd7ccd6cdb5ca2b774a338ab12b1ee8

commit 9ba7351fcfd7ccd6cdb5ca2b774a338ab12b1ee8
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-12-29 17:57:46 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-12-29 17:57:46 +0000

    ssp: Make ssp.h more self-contained

    Include a header to provide __size_t.

    Fixes:  c10d567ea022 ("include: de-macro __ssp_overlap(), improve semantics and checking")
    PR:             283653
    Reviewed by:    kevans, imp
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D48226

 include/ssp/ssp.h | 1 +
 1 file changed, 1 insertion(+)
Comment 5 Dan Kotowski 2024-12-30 10:26:25 UTC
(In reply to commit-hook from comment #4)

This works