NetBSD Problem Report #59515
From www@netbsd.org Mon Jul 7 19:37:44 2025
Return-Path: <www@netbsd.org>
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)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 58A0C1A923C
for <gnats-bugs@gnats.NetBSD.org>; Mon, 7 Jul 2025 19:37:44 +0000 (UTC)
Message-Id: <20250707193743.10FB51A923E@mollari.NetBSD.org>
Date: Mon, 7 Jul 2025 19:37:43 +0000 (UTC)
From: simmonds@polymorphism.ca
Reply-To: simmonds@polymorphism.ca
To: gnats-bugs@NetBSD.org
Subject: bash-5.3 fails to build on Darwin due to Readline version mismatch
X-Send-Pr-Version: www-1.0
>Number: 59515
>Category: pkg
>Synopsis: bash-5.3 fails to build on Darwin due to Readline version mismatch
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 07 19:40:01 +0000 2025
>Closed-Date: Mon Jul 07 19:43:40 +0000 2025
>Last-Modified: Mon Jul 07 19:45:00 +0000 2025
>Originator: Colin Simmonds
>Release: pkgsrc latest from git as of today
>Organization:
>Environment:
Darwin ctsimmonds-mac 23.6.0 Darwin Kernel Version 23.6.0: Thu Apr 24 20:29:29 PDT 2025; root:xnu-10063.141.1.705.2~1/RELEASE_ARM64_T6020 arm64 arm Darwin
>Description:
Building bash-5.3 on a Mac, it fails with a link error:
clang -L./builtins -L/opt/pkg/lib -L/opt/pkg/lib -L./lib/glob -L./lib/tilde -L./lib/sh -L/opt/pkg/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/lib -O2 -I/opt/pkg/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o bashline.o list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o -lbuiltins -lglob -lsh -lreadline -lhistory -ltermcap -ltilde -L/opt/pkg/lib -lintl -liconv -R/opt/pkg/lib -Wl,-framework -Wl,CoreFoundation -liconv -ldl
ld: warning: ignoring duplicate libraries: '-liconv'
Undefined symbols for architecture arm64:
"_rl_completion_rewrite_hook", referenced from:
_initialize_readline in bashline.o
_attempt_shell_completion in bashline.o
_bashline_set_filename_hooks in bashline.o
_bashline_reset in bashline.o
"_rl_full_quoting_desired", referenced from:
_pcomp_set_readline_variables in pcomplete.o
"_rl_macro_display_hook", referenced from:
_print_unix_command_map in bashline.o
"_rl_print_keybinding", referenced from:
_bind_builtin in libbuiltins.a[4](bind.o)
_bind_builtin in libbuiltins.a[4](bind.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Looking online, it appears that these are new symbols in the very latest release of readline (8.3) which is bundled by default inside bash <https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00004.html>.
But on a Mac, the pkgsrc bash package tries to use the packaged readline:
# Use "readline" package on Darwin to avoid link erros.
.if ${OPSYS} == "Darwin"
CONFIGURE_ARGS+= --with-installed-readline
BUILDLINK_API_DEPENDS.readline+= readline>=7.0
.include "../../devel/readline/buildlink3.mk"
.endif
which is still currently at version 8.2 and thus lacking the new symbols.
>How-To-Repeat:
$ cd shells/bash
$ sudo bmake update
>Fix:
There are two possible fixes:
-one would be to upgrade the pkgsrc readline package to 8.3
-the other would be to remove the check for Darwin from the bash Makefile
I tried commenting out the Darwin-specific check, and bash built successfully without a link error, and seems to run fine. So perhaps whatever problem that was added to solve is no longer applicable, and this can be safely removed from the bash Makefile.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 07 Jul 2025 19:43:40 +0000
State-Changed-Why:
Fixed, thanks for the analysis and suggestion!
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59515 CVS commit: pkgsrc/shells/bash
Date: Mon, 7 Jul 2025 19:43:20 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Mon Jul 7 19:43:20 UTC 2025
Modified Files:
pkgsrc/shells/bash: Makefile
Log Message:
bash: remove Darwin workaround hard-coding the readline package
Fixes PR 59515 by Colin Simmonds.
To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 pkgsrc/shells/bash/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.