NetBSD Problem Report #49375

From www@NetBSD.org  Fri Nov  7 17:11:23 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3E9ABA65DE
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  7 Nov 2014 17:11:23 +0000 (UTC)
Message-Id: <20141107171121.76C1EA6679@mollari.NetBSD.org>
Date: Fri,  7 Nov 2014 17:11:21 +0000 (UTC)
From: denafcm@gmail.com
Reply-To: denafcm@gmail.com
To: gnats-bugs@NetBSD.org
Subject: bash fails to link with libintl when using clang
X-Send-Pr-Version: www-1.0

>Number:         49375
>Category:       pkg
>Synopsis:       bash fails to link with libintl when using clang
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 07 17:15:00 +0000 2014
>Closed-Date:    Sun Nov 23 00:52:12 +0000 2014
>Last-Modified:  Sat Mar 07 22:45:00 +0000 2015
>Originator:     Dennis Lindroos
>Release:        pkgsrc-2014Q3
>Organization:
>Environment:
FreeBSD 10.1 RC4
>Description:
The -R option doesn't exist in clang(1), atleast on FreeBSD's system compiler 3.4.1 (I have not tested any other versions)..

Bash build tries to use -R to link with libintl and bails out with "clang: error: unknown argument: '-R/usr/pkg/lib'"

I found that patching "configure" does the job, but does it break anything or is there a better way?

Dennis.
>How-To-Repeat:

>Fix:
--- configure.orig	2014-02-11 17:38:00.000000000 +0200
+++ configure	2014-11-07 17:26:35.757195670 +0200
@@ -8837,7 +8837,7 @@
   fi
   if test "X$ltrpathdirs" != "X"; then
             for found_dir in $ltrpathdirs; do
-      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-Wl,-R$found_dir"
     done
   fi


>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49375: bash fails to link with libintl when using clang
Date: Sun, 23 Nov 2014 00:16:10 +0000

 On Fri, Nov 07, 2014 at 05:15:00PM +0000, denafcm@gmail.com wrote:
  > I found that patching "configure" does the job, but does it break
  > anything or is there a better way?
  > 
  > Dennis.
  > >How-To-Repeat:
  > 
  > >Fix:
  > --- configure.orig	2014-02-11 17:38:00.000000000 +0200
  > +++ configure	2014-11-07 17:26:35.757195670 +0200
  > @@ -8837,7 +8837,7 @@
  >    fi
  >    if test "X$ltrpathdirs" != "X"; then
  >              for found_dir in $ltrpathdirs; do
  > -      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
  > +      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-Wl,-R$found_dir"
  >      done
  >    fi

 I believe that should be safe, at least in pkgsrc.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49375 CVS commit: pkgsrc/shells/bash
Date: Sun, 23 Nov 2014 00:43:58 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sun Nov 23 00:43:57 UTC 2014

 Modified Files:
 	pkgsrc/shells/bash: distinfo
 Added Files:
 	pkgsrc/shells/bash/patches: patch-configure

 Log Message:
 Use -Wl,-R instead of just -R to avoid breaking the build on FreeBSD.
 From Dennis Lindroos in PR 49375.


 To generate a diff of this commit:
 cvs rdiff -u -r1.38 -r1.39 pkgsrc/shells/bash/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/shells/bash/patches/patch-configure

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

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 23 Nov 2014 00:52:12 +0000
State-Changed-Why:
committed, thanks


From: "Matthias Scheler" <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49375 CVS commit: [pkgsrc-2014Q3] pkgsrc/shells/bash
Date: Sun, 23 Nov 2014 13:29:31 +0000

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Sun Nov 23 13:29:31 UTC 2014

 Modified Files:
 	pkgsrc/shells/bash [pkgsrc-2014Q3]: distinfo
 Added Files:
 	pkgsrc/shells/bash/patches [pkgsrc-2014Q3]: patch-configure

 Log Message:
 Pullup ticket #4553 - requested by dholland
 shells/bash: build fix

 Revisions pulled up:
 - shells/bash/distinfo                                          1.39
 - shells/bash/patches/patch-configure                           1.1

 ---
    Module Name:	pkgsrc
    Committed By:	dholland
    Date:		Sun Nov 23 00:43:57 UTC 2014

    Modified Files:
    	pkgsrc/shells/bash: distinfo
    Added Files:
    	pkgsrc/shells/bash/patches: patch-configure

    Log Message:
    Use -Wl,-R instead of just -R to avoid breaking the build on FreeBSD.
    >From Dennis Lindroos in PR 49375.


 To generate a diff of this commit:
 cvs rdiff -u -r1.35.2.3 -r1.35.2.4 pkgsrc/shells/bash/distinfo
 cvs rdiff -u -r0 -r1.1.2.2 pkgsrc/shells/bash/patches/patch-configure

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

From: rodent@NetBSD.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49375: bash fails to link with libintl when using clang
Date: Wed, 25 Feb 2015 15:37:57 -0500

 Build on FreeBSD 10.1-STABLE/amd64 is broken still. We missed another one:

 --- configure.orig      2014-02-11 15:38:00.000000000 +0000
 +++ configure
 @@ -8047,7 +8047,7 @@ fi
    fi
    if test "X$ltrpathdirs" != "X"; then
              for found_dir in $ltrpathdirs; do
 -      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
 +      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-Wl,-R$found_dir"
      done
    fi

 @@ -8837,7 +8837,7 @@ fi
 [...]

 Sorry, i'd commit this myself if i were at my dev. station. Could you please
 commit it when you have time? I'm away from dev. station until 2 Mar.

From: "Blue Rats" <rodent@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49375 CVS commit: pkgsrc/shells/bash
Date: Sat, 7 Mar 2015 22:40:48 +0000

 Module Name:	pkgsrc
 Committed By:	rodent
 Date:		Sat Mar  7 22:40:48 UTC 2015

 Modified Files:
 	pkgsrc/shells/bash: distinfo
 	pkgsrc/shells/bash/patches: patch-af patch-ag patch-aj
 	    patch-builtins_ulimit.def patch-configure patch-shell.c
 	    patch-variables.c

 Log Message:
 Apply patch to patch in PR 49375. Defuzz patches.


 To generate a diff of this commit:
 cvs rdiff -u -r1.39 -r1.40 pkgsrc/shells/bash/distinfo
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/shells/bash/patches/patch-af
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/shells/bash/patches/patch-ag \
     pkgsrc/shells/bash/patches/patch-variables.c
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/shells/bash/patches/patch-aj \
     pkgsrc/shells/bash/patches/patch-builtins_ulimit.def \
     pkgsrc/shells/bash/patches/patch-configure \
     pkgsrc/shells/bash/patches/patch-shell.c

 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.