[Bug 293297] PkgBase: FreeBSD-zfs-dev libzfs.h header is useless

[email protected]
Newsgroups gmane.os.freebsd.devel.file-systems
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293297

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from [email protected] ---
This is not a packaged base specific problem. Both libzfs and libzfs_core are
usuable for building against, because FreeBSD fails to install all required
headers.

For libzfs this is kind of intentional because it's a private API that's
supposedly internal to OpenZFS. For libzfs_core it's a clear cut bug because
libzfs_core ist supposed to be the more restrictive stable external API.

To actually use libzfs or even just libzfs_core you need the missing kernel
headers that aren't installed from somewhere in sys/contrib/openzfs (I can't
remember the exact list of directories). Beware that using those headers at
least partially "contaminates" your userland C code with the Solaris
compatibility hacks.

As long as the FreeBSD sources are checked out to /usr/src you can build and
afaik this is the default configuration in poudriere so you can rely on it in a
port.

Here are some previous times people have been bitten by this exact same choice
to withhold the required headers:

 * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193748
 * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251730
 * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257222
 * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289655

Here is an example of how to build against libzfs from outside the base system:
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=263877.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.