Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: UPDATE: libnfs 7.0.0
To:
Kurt Miller <kurt@intricatesoftware.com>
Cc:
Brad Smith <brad@comstyle.com>, ports@openbsd.org, "Kirill A. Korinsky" <kirill@korins.ky>
Date:
Thu, 20 Aug 2026 14:16:18 +0100

Download raw body.

Thread
On 2026/08/20 12:48, Kurt Miller wrote:
> On Aug 19, 2026, at 7:11 PM, Kirill A. Korinsky <kirill@korins.ky> wrote:
> > 
> > On Wed, 19 Aug 2026 22:11:04 +0200,
> > Kurt Miller <kurt@intricatesoftware.com> wrote:
> >> 
> >> On Aug 8, 2026, at 9:47 PM, Brad Smith <brad@comstyle.com> wrote:
> >>> 
> >>> Here is an update to libnfs 7.0.0.
> >>> 
> >>> All depends build Ok.
> >>> 
> >> 
> >> Working on fio update on sparc64 and I noticed the libnfs.so <http://libnfs.so/> symbol
> >> _null_auth conflicts with _null_auth in libc.so <http://libc.so/>:
> >> 
> >> fio:/usr/lib/libc.so.103.0: /usr/local/lib/libnfs.so.3.0 : WARNING: symbol(_null_auth) size mismatch, relink your program
> >> 
> >> oracle$ objdump -x /usr/lib/libc.so.103.0 | grep _null_auth                                        
> >> 00000000003f61e0 g     O .bss 0000000000000018 _null_auth
> >> oracle$ objdump -x /usr/local/lib/libnfs.so.3.0 | grep _null_auth
> >> 0000000000368070 g     O .bss 0000000000000020 _null_auth
> >> 
> >> I’m not sure what the fix for this should be.
> >> 
> >> -Kurt
> >> 
> > 
> > FWIW I saw almost the same error in qemu at amd64 hosts, but I haven't dig
> > into it.
> 
> Thanks for confirming.

Can we just do this?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libnfs/Makefile,v
diff -u -p -r1.12 Makefile
--- Makefile	10 Aug 2026 10:39:02 -0000	1.12
+++ Makefile	20 Aug 2026 13:08:11 -0000
@@ -4,6 +4,7 @@ DISTNAME=	libnfs-7.0.0pl20260708
 GH_ACCOUNT=	sahlberg
 GH_PROJECT=	libnfs
 GH_COMMIT=	8d4c2f6057acb6a01a316fbb7eea1c05a06e34c6
+REVISION=	0
 CATEGORIES=	devel net
 
 SHARED_LIBS=	nfs	3.0
Index: patches/patch-include_nfsc_libnfs-zdr_h
===================================================================
RCS file: patches/patch-include_nfsc_libnfs-zdr_h
diff -N patches/patch-include_nfsc_libnfs-zdr_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-include_nfsc_libnfs-zdr_h	20 Aug 2026 13:08:11 -0000
@@ -0,0 +1,12 @@
+Index: include/nfsc/libnfs-zdr.h
+--- include/nfsc/libnfs-zdr.h.orig
++++ include/nfsc/libnfs-zdr.h
+@@ -127,7 +127,7 @@ struct opaque_verf {
+         /* GSS */
+         struct gss_ctx_id_struct *gss_context;
+ };
+-extern struct opaque_verf _null_auth;
++extern struct opaque_verf _LIBNFS_null_auth;
+ 
+ struct AUTH {
+ 	struct opaque_cred	ah_cred;
Index: patches/patch-lib_libnfs-zdr_c
===================================================================
RCS file: patches/patch-lib_libnfs-zdr_c
diff -N patches/patch-lib_libnfs-zdr_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_libnfs-zdr_c	20 Aug 2026 13:08:11 -0000
@@ -0,0 +1,12 @@
+Index: lib/libnfs-zdr.c
+--- lib/libnfs-zdr.c.orig
++++ lib/libnfs-zdr.c
+@@ -75,7 +75,7 @@ struct zdr_mem {
+        char buf[1];
+ };
+ 
+-struct opaque_verf _null_auth;
++struct opaque_verf _LIBNFS_null_auth;
+ 
+ bool_t libnfs_zdr_setpos(ZDR *zdrs, uint32_t pos)
+ {
Index: patches/patch-lib_pdu_c
===================================================================
RCS file: patches/patch-lib_pdu_c
diff -N patches/patch-lib_pdu_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_pdu_c	20 Aug 2026 13:08:11 -0000
@@ -0,0 +1,30 @@
+Index: lib/pdu.c
+--- lib/pdu.c.orig
++++ lib/pdu.c
+@@ -1010,7 +1010,7 @@ static int rpc_process_reply(struct rpc_context *rpc, 
+ 	INC_STATS(rpc, num_resp_rcvd);
+ 
+ 	memset(&msg, 0, sizeof(struct rpc_msg));
+-	msg.body.rbody.reply.areply.verf = _null_auth;
++	msg.body.rbody.reply.areply.verf = _LIBNFS_null_auth;
+ 	if (pdu->zdr_decode_bufsize > 0) {
+ 		pdu->zdr_decode_buf = (char *)pdu + PAD_TO_8_BYTES(sizeof(struct rpc_pdu));
+ 	}
+@@ -1288,7 +1288,7 @@ static int rpc_send_error_reply(struct rpc_context *rp
+         res.body.rbody.stat                          = MSG_ACCEPTED;
+         res.body.rbody.reply.areply.reply_data.mismatch_info.low  = min_vers;
+         res.body.rbody.reply.areply.reply_data.mismatch_info.high = max_vers;
+-	res.body.rbody.reply.areply.verf             = _null_auth;
++	res.body.rbody.reply.areply.verf             = _LIBNFS_null_auth;
+ 	res.body.rbody.reply.areply.stat             = err;
+ 
+         if (rpc->is_udp) {
+@@ -1321,7 +1321,7 @@ int rpc_send_reply(struct rpc_context *rpc,
+ 	res.xid                                      = call->xid;
+         res.direction                                = REPLY;
+         res.body.rbody.stat                          = MSG_ACCEPTED;
+-	res.body.rbody.reply.areply.verf             = _null_auth;
++	res.body.rbody.reply.areply.verf             = _LIBNFS_null_auth;
+ 	res.body.rbody.reply.areply.stat             = SUCCESS;
+ 
+         res.body.rbody.reply.areply.reply_data.results.where = reply;

> Brad, when you look into _null_auth can you double check pkg_config 
> for libnfs as well please? I’m seeing this:
> 
> m2$ pkg-config --modversion libnfs                                        
> 17.0.0
> 
> Should that be reporting 7.0.0?

Upstream have set it up to report 17.0.0, normally --modversion would
report the software version number rather than (upstream's wanted) shlib
version, but I think patching to chsnge this would be likely to result
in more problems. IIUC they'd need to bump the release version to above
17.0.0 to fix it at this point.