Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Oct 2025 08:47:45 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        void <void@f-m.fm>
Cc:        freebsd-pkg@freebsd.org
Subject:   Re: Undefined symbol "setgroups@FBSD_1.8"
Message-ID:  <504EC476-50C6-49EC-85F6-AEB9C104F205@yahoo.com>
In-Reply-To: <aO-iOK4pBzufi8Gv@int21h>
References:  <aO7qm_KW_hTFCzll@int21h> <11DE790B-4E98-4D42-A281-E0B669474C89@yahoo.com> <aO8iH0OI61BCPBn_@int21h> <2EC26A5F-3FEF-4D18-986D-A5106B164C64@yahoo.com> <aO-iOK4pBzufi8Gv@int21h>

index | next in thread | previous in thread | raw e-mail

On Oct 15, 2025, at 06:31, void <void@f-m.fm> wrote:

> On Tue, Oct 14, 2025 at 11:40:26PM -0700, Mark Millard wrote:
>> On Oct 14, 2025, at 21:25, void <void@f-m.fm> wrote:
> 
>>> So, what you're saying makes sense.
>>> But, I cannot install sccache for 13.5 on a stable/15 host.
>> 
>> Yes you can, presuming the usual compat support is included in
>> the kernel.
> 
> Both the stable/15 server and the releng/13.5 poudriere builder
> use unmodified GENERIC. They both have the compat support.

13.5 does not have compat support for 15 (or 14 or 16).

15 can have the compat support related to 13.5 .

As Kyle E. referenced, if a static build of sccache(-overlay)
is possible based on the kernel interface from 13.5 (or before),
that would avoid the bad dynamic binding being involved at all
and would have a kernel interface known to both 13.5 and 15
(15 with compat support).

>> stable/15 can use older @FBSD_1.* symbols that it
>> was designed to also be compatible with since the old interfaces
>> were known at the time 15 was designed and implemented and, so,
>> the compatibility code can be there to be referenced. That
>> includes supporting 13.5 programs and libraries.
> 
> so it seems the compatibility code isn't being referenced
> by sccache(-overlay). A bug in those ports? Or in the compatibility
> code? Both?

Again:

13.5 does not have compat support for 15 (or 14 or 16). That
is a property of 13.5, not of sccache(-overlay).

Execution in the 13.5 jail is execution in a 13.5 context as
far as the world code goes, not 15.

> ccache is also used (ccache4 built with -static), which
> is called/copied from the server to be used internally in the builder.

-static avoids variability in symbol binding by not having
any dynamic binding to libraries involved: no dynamic lookup
of FBSD_1.8 symbols (or other such).

> ccache does not error like this. It was also built on the stable/15 host.

Because it a -static build, it is only dependent on the
kernel interface, not any dynamically bound library code
that would vary between 13.5 and 15.

>> sccache(-overlay) needs to be built to use the @FBSD_1.0 compatible
>> symbol in order to get the old beahvaior that it was designed for.
> 
> This seems to apply to sccache(-overlay) only and I don't understand
> why it is only this or how to overcome it.

You are not using a -static build of the sccache(-overlay).
It is using dynamically bound library code that varies
between 13.5 and 15 in an incompatible way.

If you build ccache non-static, you could have similar
problems with it. (I've no clue if it would use FBSD_1.8
symbols or not.)

> Unless it is/are sccache(-overlay)
> bug(s).

Nope. It is because you built sccache(-overlay) using dynamic
binding to FBSD_1.8 code that is 15 specific and 13.5 has no
compat code for that but the jail is running a 13.5 world.

>> One way to do that is to be built for 13.5 instead of 15.* and
>> to run that 13.5 based code on on 15+ .
> 
> I don't know how and can't find any instructions on how to do this.

Build the package in a 13.5 poudriere jail. Then use the *.pkg file
that results to install that build of the package on 15 instead of
using what you now have installed.

If you can build that as a -static build, as Kyle suggested, that
would be better than building something that uses dynamic binding.

> I can guess, maybe. Build it in the releng/13.5 poudriere jail and install it to stable/15 server?

Yes. I suggest what Kyle suggested: building sccache(-overlay) as
-static if you can.

> I guess I can do this. It seems odd to have to manually do this, though.
> Do I need to revert when the stable/15 builders run?

If 14+, 15+, 16+ has the 13.5 related compat code in place and you
build a static sccache(-overlay) under 13.5, it likely works for
all 13.5, 14+, 15+, and 16+ usage contexts.

Use of the older dynamic binding nstead may be somewhat more likely
to run into problems.

> And why for just these two ports on the host?

2 ports (packages)? You have only reported 1 package with a
binding to a 15+ specific symbol. Most programs probably do
not use any version of that FBSD_1.8 symbol. Most programs
probably do not use any symbols listed in FBSD_1.8 or the
like. But your existing sccache(-overlay) build does.

The only FBSD_1.8 symbols so far are as shown below (from
a main 16 context 14):

# cat /usr/src/lib/libsys/Symbol.sys.map
/*
 * It'd be nice to automatically generate the syscall symbols, but we
 * don't know to what version they will eventually belong to, so for now
 * it has to be manual.
 */
. . .
FBSD_1.8 {
	exterrctl;
	fchroot;
	getgroups;
	getrlimitusage;
	inotify_add_watch_at;
	inotify_rm_watch;
	jail_attach_jd;
	jail_remove_jd;
	kcmp;
	setcred;
	setgroups;
};

I'll note that FBSD_1.6 was created at 13.0-CURRENT and
FBSD_1.7 was created at 14.0-CURRENT. So using a symbol
from FBSD_1.7 would have similar issues relative to
13.5:

FBSD_1.7 {
	fspacectl;
	kqueuex;
	membarrier;
	sched_getcpu;
	swapoff;
	timerfd_create;
	timerfd_gettime;
	timerfd_settime;
};

Again, it is not a large set of symbols and most programs
probably do not bind to any of them.


===
Mark Millard
marklmi at yahoo.com



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?504EC476-50C6-49EC-85F6-AEB9C104F205>