NetBSD Problem Report #30601

From www@netbsd.org  Sat Jun 25 19:07:32 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id DFF3363B116; Sat, 25 Jun 2005 19:07:32 +0000 (UTC)
Message-Id: <20050625190732.DFF3363B116@narn.netbsd.org>
Date: Sat, 25 Jun 2005 19:07:32 +0000 (UTC)
From: fvdl@netbsd.org
Reply-To: fvdl@netbsd.org
To: gnats-bugs@netbsd.org
Subject: bash fails to link on Darwin
X-Send-Pr-Version: www-1.0

>Number:         30601
>Category:       pkg
>Synopsis:       bash fails to link on Darwin
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    minskim
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 25 19:08:00 +0000 2005
>Closed-Date:    Fri Jul 01 23:08:30 +0000 2005
>Last-Modified:  Sat Jul 02 00:38:03 +0000 2005
>Originator:     Frank van der Linden
>Release:        pkgsrc 2005-06-21
>Organization:
NetBSD
>Environment:
Darwin frank-van-der-lindens-powerbook-g4-15.local 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10 18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power Macintosh powerpc

>Description:
bash fails to compile in pkgsrc on Darwin:

===> *** No /Volumes/NetBSD/source/pkgsrc/distfiles/pkg-vulnerabilities file found,
===> *** skipping vulnerability checks. To fix, install
===> *** the pkgsrc/security/audit-packages package and run
===> *** '/Volumes/NetBSD/pkg/sbin/download-vulnerability-list'.
===> Building for bash-3.0pl16

          ***********************************************************
          *                                                         *
          * GNU bash, version 3.00.16(1)-release (powerpc-apple-darwin)
          *                                                         *
          ***********************************************************

rm -f bash
gcc -pipe -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob  -L./lib/tilde  -L./lib/sh -L/Volumes/NetBSD/pkg/lib -L/usr/lib    -O2 -I/Volumes/NetBSD/pkg/include -I/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 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 -lsh -lreadline -lhistory -ltermcap -lglob  -ltilde  -lintl /usr/lib/libiconv.dylib /usr/lib/libc.dylib  -ldl -lintl -liconv
/usr/bin/ld: multiple definitions of symbol _tilde_expand
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _tilde_expand
./lib/tilde/libtilde.a(tilde.o) definition of _tilde_expand in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _get_history_event
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _get_history_event
./lib/readline/libhistory.a(histexpand.o) definition of _get_history_event in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_arg_extract
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_arg_extract
./lib/readline/libhistory.a(histexpand.o) definition of _history_arg_extract in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_expand
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_expand
./lib/readline/libhistory.a(histexpand.o) definition of _history_expand in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_expansion_char
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_expansion_char
./lib/readline/libhistory.a(histexpand.o) definition of _history_expansion_char in section (__DATA,__data)
/usr/bin/ld: multiple definitions of symbol _history_no_expand_chars
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_no_expand_chars
./lib/readline/libhistory.a(histexpand.o) definition of _history_no_expand_chars in section (__DATA,__data)
/usr/bin/ld: multiple definitions of symbol _history_subst_char
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_subst_char
./lib/readline/libhistory.a(histexpand.o) definition of _history_subst_char in section (__DATA,__data)
/usr/bin/ld: multiple definitions of symbol _history_tokenize
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_tokenize
./lib/readline/libhistory.a(histexpand.o) definition of _history_tokenize in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _read_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _read_history
./lib/readline/libhistory.a(histfile.o) definition of _read_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _write_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _write_history
./lib/readline/libhistory.a(histfile.o) definition of _write_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _add_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _add_history
./lib/readline/libhistory.a(history.o) definition of _add_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _clear_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _clear_history
./lib/readline/libhistory.a(history.o) definition of _clear_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _current_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _current_history
./lib/readline/libhistory.a(history.o) definition of _current_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_base
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_base
./lib/readline/libhistory.a(history.o) definition of _history_base in section (__DATA,__data)
/usr/bin/ld: multiple definitions of symbol _history_get
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_get
./lib/readline/libhistory.a(history.o) definition of _history_get in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_is_stifled
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_is_stifled
./lib/readline/libhistory.a(history.o) definition of _history_is_stifled in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_set_pos
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_set_pos
./lib/readline/libhistory.a(history.o) definition of _history_set_pos in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_total_bytes
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_total_bytes
./lib/readline/libhistory.a(history.o) definition of _history_total_bytes in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _next_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _next_history
./lib/readline/libhistory.a(history.o) definition of _next_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _previous_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _previous_history
./lib/readline/libhistory.a(history.o) definition of _previous_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _stifle_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _stifle_history
./lib/readline/libhistory.a(history.o) definition of _stifle_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _unstifle_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _unstifle_history
./lib/readline/libhistory.a(history.o) definition of _unstifle_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _using_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _using_history
./lib/readline/libhistory.a(history.o) definition of _using_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _where_history
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _where_history
./lib/readline/libhistory.a(history.o) definition of _where_history in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_search
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_search
./lib/readline/libhistory.a(histsearch.o) definition of _history_search in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_search_pos
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_search_pos
./lib/readline/libhistory.a(histsearch.o) definition of _history_search_pos in section (__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _history_search_prefix
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libreadline.dylib(readline.o_s) definition of _history_search_prefix
./lib/readline/libhistory.a(histsearch.o) definition of _history_search_prefix in section (__TEXT,__text)
/usr/bin/ld: warning multiple definitions of symbol _getenv
./lib/sh/libsh.a(getenv.o) definition of _getenv in section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libc.dylib(getenv.So) definition of _getenv
collect2: ld returned 1 exit status
*** Error code 1

Stop.
bmake: stopped in /Volumes/NetBSD/source/pkgsrc/shells/bash/work/bash-3.0
*** Error code 1

Stop.
bmake: stopped in /Volumes/NetBSD/source/pkgsrc/shells/bash
===> 
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /Volumes/NetBSD/source/pkgsrc/shells/bash/work/.work.log
===> 
*** Error code 1

Stop.
bmake: stopped in /Volumes/NetBSD/source/pkgsrc/shells/bash

>How-To-Repeat:
Try to compile and link bash from pkgsrc on Darwin.

>Fix:
Somehow bash must avoid to link in these duplicate symbols. libreadline must be avoided altogether, though there is also the duplicate getenv symbol.


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->darwin-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sat, 25 Jun 2005 19:11:31 +0000
Responsible-Changed-Why:
Darwin pkgsrc PR.


From: Frank van der Linden <fvdl@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: darwin-pkg-people@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/30601
Date: Sat, 25 Jun 2005 21:38:19 +0200

 I tried adding the following to the Makefile:

 .if ${OPSYS} == "Darwin"
 CONFIGURE_ARGS+=        --with-installed-readline
 .endif

 ..however, this results in:

 checking version of installed readline library... ./configure: line 
 4521: test: too many arguments
 EditLine wrapper
 configure: WARNING: installed readline library is too old to be linked 
 with bash
 configure: WARNING: using private bash version

 - Frank

From: Min Sik Kim <minskim@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/30601 CVS commit: pkgsrc/shells/bash
Date: Fri,  1 Jul 2005 16:14:39 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	minskim
 Date:		Fri Jul  1 16:14:39 UTC 2005

 Modified Files:
 	pkgsrc/shells/bash: Makefile

 Log Message:
 Use devel/readline instead of the included readline library.  Bump
 PKGREVISION due to the added dependency.  This should fix PR pkg/30601.

 While here, set BUILDLINK_DEPMETHOD of dependent libraries to "build"
 when the "static" option is enabled.


 To generate a diff of this commit:
 cvs rdiff -r1.8 -r1.9 pkgsrc/shells/bash/Makefile

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

Responsible-Changed-From-To: darwin-pkg-people->minskim
Responsible-Changed-By: minskim@netbsd.org
Responsible-Changed-When: Fri, 01 Jul 2005 16:25:21 +0000
Responsible-Changed-Why:
I committed a fix.


State-Changed-From-To: open->feedback
State-Changed-By: minskim@netbsd.org
State-Changed-When: Fri, 01 Jul 2005 16:25:21 +0000
State-Changed-Why:
Should be fixed now.  Please try bash-3.0pl16nb1.


State-Changed-From-To: feedback->closed
State-Changed-By: minskim@netbsd.org
State-Changed-When: Fri, 01 Jul 2005 23:08:30 +0000
State-Changed-Why:
Submitter confirmed that it was fixed.


From: Frank van der Linden <fvdl@netbsd.org>
To: minskim@netbsd.org
Cc: darwin-pkg-people@netbsd.org, pkgsrc-bugs@netbsd.org,
	gnats-admin@netbsd.org
Subject: Re: pkg/30601
Date: Sat, 02 Jul 2005 00:47:12 +0200

 Yes, bash now links fine on my Darwin/OS X system, thanks!

 - Frank

>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.