Summary: | git 9e9c651caceb is too ZFS specific | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | clbuisson | ||||
Component: | misc | Assignee: | Mark Johnston <markj> | ||||
Status: | Closed Overcome By Events | ||||||
Severity: | Affects Only Me | CC: | bz, emaste, grahamperrin | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
clbuisson
2021-11-28 14:57:33 UTC
Let's flesh this out. > 9e9c651caceb <https://cgit.freebsd.org/src/commit/?id=9e9c651caceb9ecd17131e8bb29791ba4cf1cec7> > cddl: fix missing ZFS library dependencies > > In 9fae47666 zfsd got a libspl dependency to avoid undefined references. > However that workaround did not help external consumers of libzfs_core. > > Fix all missing dependencies lld 13 and the rtld complain about. <https://cgit.freebsd.org/src/commit/?id=9fae47666> Created attachment 229765 [details]
proposed pach to build without zfs
Compiling head with
#WITHOUT_CDDL=
WITHOUT_ZFS=
buildworld is stopped by
building shared library libnvpair.so.2
..
ld: error: relocation R_X86_64_PC32 cannot be used against symbol __stderrp; rec
ompile with -fPIC
>>> defined in /home/obj/home/src/amd64.amd64/tmp/lib/libc.so.7
>>> referenced by assert.c
>>> assert.o:(libspl_assertf) in archive /home/obj/home/src/amd64.
amd64/tmp/usr/lib/libspl.a
...
but succeed with
#WITHOUT_ZFS=
I traced the problem to git 9e9c651caceb "cddl: fix missing ZFS library dependencies" (2021/11/15)
builworld succeeds after applying the attached patch
wasn't this fixed in https://cgit.freebsd.org/src/commit/Makefile.inc1?id=7b3642da21cb4b1c301d8c6b6ce0847d19d8a473 Looking at your patch however I wonder if these libraries are really not needed for anything else and if they are not then someone should probably indeed hide them behind more #ifdef. I believe this is already fixed by the commit referenced in comment 5. Please re-open if that does not appear to be the case. Indeed some of the cddl libraries are, I believe, used only when ZFS is enabled. That is, dtrace does not make use of libavl, for instance. I *think* we could disable at least libavl, libnvpair and libuutil when MK_ZFS="no", but I don't have any immediate plan to fix that. |