NetBSD Problem Report #60225

From jdbaker@consolidated.net  Sat May  2 12:31:11 2026
Return-Path: <jdbaker@consolidated.net>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R12" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B76521A923C
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  2 May 2026 12:31:11 +0000 (UTC)
Message-Id: <20260502121439.19FE513E125@spike.technoskunk.fur>
Date: Sat, 02 May 2026 07:14:39 -0500 (CDT)
From: jdbaker@consolidated.net
Reply-To: jdbaker@consolidated.net
To: gnats-bugs@NetBSD.org
Subject: net/netatalk4 build fails on NetBSD/sparc-11.0_RC3
X-Send-Pr-Version: 3.95
X-From4GNATS: "jdbaker@consolidated.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60225
>Category:       pkg
>Synopsis:       net/netatalk4 build fails on NetBSD/sparc-11.0_RC3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    hauke
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 02 12:35:00 +0000 2026
>Last-Modified:  Thu Jun 11 07:50:01 +0000 2026
>Originator:     John D. Baker
>Release:        NetBSD/sparc-11.0_RC3, pkgsrc-2026Q1
>Organization:
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!   
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645
>Environment:
System: NetBSD oroboros 11.0_RC3 NetBSD 11.0_RC3 (GENERIC) #12: Thu Apr  9 08:24:37 CDT 2026  sysop@plex760.technoskunk.fur:/r0/build/netbsd-11/obj/sparc/sys/arch/sparc/compile/GENERIC sparc
Architecture: sparc
Machine: sparc
>Description:
Attempting to build "net/netatalk4" from pkgsrc-2026Q1 on NetBSD/sparc
11.0_RC3 fails as follows:

[...]
===> Building for netatalk-4.4.1
ninja: Entering directory `output'
[1/59] Linking target etc/afpd/afpd
FAILED: [code=1] etc/afpd/afpd 
gcc  -o etc/afpd/afpd etc/afpd/libafpd.a.p/afp_config.c.o etc/afpd/libafpd.a.p/afp_dsi.c.o etc/afpd/libafpd.a.p/afp_options.c.o etc/afpd/libafpd.a.p/afprun.c.o etc/afpd/libafpd.a.p/appl.c.o etc/afpd/libafpd.a.p/auth.c.o etc/afpd/libafpd.a.p/catsearch.c.o etc/afpd/libafpd.a.p/desktop.c.o etc/afpd/libafpd.a.p/dircache.c.o etc/afpd/libafpd.a.p/directory.c.o etc/afpd/libafpd.a.p/enumerate.c.o etc/afpd/libafpd.a.p/extattrs.c.o etc/afpd/libafpd.a.p/fce_api.c.o etc/afpd/libafpd.a.p/fce_util.c.o etc/afpd/libafpd.a.p/file.c.o etc/afpd/libafpd.a.p/filedir.c.o etc/afpd/libafpd.a.p/fork.c.o etc/afpd/libafpd.a.p/hash.c.o etc/afpd/libafpd.a.p/mangle.c.o etc/afpd/libafpd.a.p/messages.c.o etc/afpd/libafpd.a.p/ofork.c.o etc/afpd/libafpd.a.p/status.c.o etc/afpd/libafpd.a.p/switch.c.o etc/afpd/libafpd.a.p/uam.c.o etc/afpd/libafpd.a.p/unix.c.o etc/afpd/libafpd.a.p/volume.c.o etc/afpd/libafpd.a.p/main.c.o etc/afpd/libafpd.a.p/afp_asp.c.o etc/afpd/libafpd.a.p/acls.c.o -L/usr/pkg/lib -L/usr/lib -I!
 /usr/pkg/
 include -I/usr/include/krb5 -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/db5 -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -Wl,--start-group -lm -Wl,-R/usr/pkg/lib -Wl,-R/usr/lib -O2 -DPNG_NO_ASSEMBLER_CODE -DNO_STATIC_MODULES '-Wl,-rpath,$ORIGIN/../../libatalk:/usr/pkg/lib' -Wl,-rpath-link,/tmp/pkgsrc/net/netatalk4/work/netatalk-netatalk-4-4-1/output/libatalk libatalk/libatalk.so.19.0.0 /usr/pkg/lib/libbstring.so /usr/pkg/lib/libiniparser.so -Wl,-R/usr/pkg/lib /usr/pkg/lib/libgcrypt.so -lwrap -Wl,--end-group -pthread
ld: /usr/lib/libm.so: warning: warning: reference to compatibility cabs()
ld: /usr/lib/libm.so: warning: warning: reference to compatibility cabsf()
ld: etc/afpd/libafpd.a.p/dircache.c.o: in function `dircache_search_by_did':
dircache.c:(.text+0x780): undefined reference to `__sync_add_and_fetch_8'
ld: etc/afpd/libafpd.a.p/dircache.c.o: in function `dircache_search_by_name':
dircache.c:(.text+0xc74): undefined reference to `__sync_add_and_fetch_8'
ld: etc/afpd/libafpd.a.p/dircache.c.o: in function `log_dircache_stat':
dircache.c:(.text+0x1ba0): undefined reference to `__sync_fetch_and_add_8'
ld: dircache.c:(.text+0x1bd8): undefined reference to `__sync_fetch_and_add_8'
ld: etc/afpd/libafpd.a.p/dircache.c.o: in function `dircache_set_validation_params':
dircache.c:(.text+0x26e4): undefined reference to `__sync_lock_test_and_set_8'
ld: etc/afpd/libafpd.a.p/dircache.c.o: in function `dircache_reset_validation_counter':
dircache.c:(.text+0x2820): undefined reference to `__sync_lock_test_and_set_8'
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make[1]: stopped making "all" in /x/pkgsrc/net/netatalk4
*** Error code 1

Stop.
make: stopped making "all" in /x/pkgsrc/net/netatalk4


As shown, netatalk4 was being built in a QEMU guest (SS5, 256MB) running
on amd64.

Previously, "net/netatalk4" from pkgsrc-2025Q4 built without problems
on a real SS5 (110MHz, 256MB) running NetBSD/sparc-11.0_BETA and 11.99.5

>How-To-Repeat:
See above.

>Fix:
Perhaps "devel/libatomic" can help here?  (It's already required for
other packages I routinely build on sparc.)

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->hauke
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sat, 02 May 2026 13:01:51 +0000
Responsible-Changed-Why:
Over to maintainer


From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/60225: net/netatalk4 build fails on NetBSD/sparc-11.0_RC3
Date: Sat, 2 May 2026 16:43:02 -0500 (CDT)

 On Sat, 2 May 2026, Hauke Fath wrote:

 > Can you try including the dependency? Something like

 > [snip]

 Actually, I already tried exactly that and it made no difference.  I
 noticed the "LD_FLAGS.FreeBSD+=-lpthread" in the Makefile and naively
 tried adding:

   LD_FLAGS.NetBSD+=-latomic

 but that didn't help, either.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/60225 (net/netatalk4 build fails on NetBSD/sparc-11.0_RC3)
Date: Wed, 10 Jun 2026 20:54:37 -0500 (CDT)

 With pkgsrc-HEAD in the run-up to the freeze for pkgsrc-2026Q2, adding:

 .include "../../mk/atomic64.mk"

 to the "net/netatalk4" Makefile (down with the other buildlink includes),
 allows netatalk-4.4.2nb1 to build on NetBSD/sparc-11.0_RC4, and will
 likely also address the build (configure) failure on netbsd-11/i386 as
 well.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "Hauke Fath" <hauke@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60225 CVS commit: pkgsrc/net/netatalk4
Date: Thu, 11 Jun 2026 07:49:11 +0000

 Module Name:	pkgsrc
 Committed By:	hauke
 Date:		Thu Jun 11 07:49:11 UTC 2026

 Modified Files:
 	pkgsrc/net/netatalk4: Makefile

 Log Message:
 Fix build error on sparc, patch from John D. Baker (thanks)

 Should fix PR pkg/60225


 To generate a diff of this commit:
 cvs rdiff -u -r1.35 -r1.36 pkgsrc/net/netatalk4/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.