NetBSD Problem Report #47297

From www@NetBSD.org  Sat Dec  8 05:41:37 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 93D5A63E8B0
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  8 Dec 2012 05:41:37 +0000 (UTC)
Message-Id: <20121208054136.5D4C963E8B0@www.NetBSD.org>
Date: Sat,  8 Dec 2012 05:41:36 +0000 (UTC)
From: miyokojiro@gmail.com
Reply-To: miyokojiro@gmail.com
To: gnats-bugs@NetBSD.org
Subject: fonts/ttmkfdir2 fails to build with PKGSRC_COMPILER=clang
X-Send-Pr-Version: www-1.0

>Number:         47297
>Category:       pkg
>Synopsis:       fonts/ttmkfdir2 fails to build with PKGSRC_COMPILER=clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 08 05:45:00 +0000 2012
>Closed-Date:    Sat Aug 08 19:51:46 +0000 2015
>Last-Modified:  Sat Aug 08 19:51:46 +0000 2015
>Originator:     Daniel Loffgren
>Release:        NetBSD 6.99.15 (HEAD as of Dec 6 2012)
>Organization:
>Environment:
NetBSD Maki.local 6.99.15 NetBSD 6.99.15 (VMWARE) #6: Fri Dec  7 15:21:43 UTC 2012  kojiro@Maki.local:/usr/src/sys/arch/i386/compile/VMWARE i386
>Description:
libtool can't determine the intended behavior of clang since it's not being called via gcc, g++, ld, etc., so it needs to be explicitly specified. This problem could possibly arise with other compilers as well, and there should be no harm in being explicit.

>How-To-Repeat:
Have clang
Set PKGSRC_COMPILER=clang
Try to build fonts/ttmkfdir2
>Fix:
This diff (applied to patch-aa, not added separately to patches) adds tags to hint functionality to libtool without changing the behavior of the build.

Index: patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/ttmkfdir2/patches/patch-aa,v
retrieving revision 1.3
diff -r1.3 patch-aa
3c3
< --- Makefile.orig	Wed Nov  6 23:28:44 2002
---
> --- Makefile.orig	2002-11-07 05:28:44.000000000 +0000
27c27
< +	libtool --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $^
---
> +	libtool --tag=CC --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $^
30c30,31qi
<  	libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
---
> -	libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
> +	libtool --tag=LD --mode=link $(CXX) -o $@ $^ $(LDFLAGS)

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/47297: fonts/ttmkfdir2 fails to build with
 PKGSRC_COMPILER=clang
Date: Mon, 10 Dec 2012 12:43:18 +0100

 For this and your other bug report on the same subject:
 Can you please make sure you've compiled libtool with the same settings?

 I.e. pkg_delete libtool*
 cd /usr/pkgsrc/devel/libtool-base
 make install
 (with the same mk.conf you use for building packages)

 Thanks,
  Thomas

 On Sat, Dec 08, 2012 at 05:45:00AM +0000, miyokojiro@gmail.com wrote:
 > >Number:         47297
 > >Category:       pkg
 > >Synopsis:       fonts/ttmkfdir2 fails to build with PKGSRC_COMPILER=clang
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Sat Dec 08 05:45:00 +0000 2012
 > >Originator:     Daniel Loffgren
 > >Release:        NetBSD 6.99.15 (HEAD as of Dec 6 2012)
 > >Organization:
 > >Environment:
 > NetBSD Maki.local 6.99.15 NetBSD 6.99.15 (VMWARE) #6: Fri Dec  7 15:21:43 UTC 2012  kojiro@Maki.local:/usr/src/sys/arch/i386/compile/VMWARE i386
 > >Description:
 > libtool can't determine the intended behavior of clang since it's not being called via gcc, g++, ld, etc., so it needs to be explicitly specified. This problem could possibly arise with other compilers as well, and there should be no harm in being explicit.
 > 
 > >How-To-Repeat:
 > Have clang
 > Set PKGSRC_COMPILER=clang
 > Try to build fonts/ttmkfdir2
 > >Fix:
 > This diff (applied to patch-aa, not added separately to patches) adds tags to hint functionality to libtool without changing the behavior of the build.
 > 
 > Index: patch-aa
 > ===================================================================
 > RCS file: /cvsroot/pkgsrc/fonts/ttmkfdir2/patches/patch-aa,v
 > retrieving revision 1.3
 > diff -r1.3 patch-aa
 > 3c3
 > < --- Makefile.orig	Wed Nov  6 23:28:44 2002
 > ---
 > > --- Makefile.orig	2002-11-07 05:28:44.000000000 +0000
 > 27c27
 > < +	libtool --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $^
 > ---
 > > +	libtool --tag=CC --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $^
 > 30c30,31qi
 > <  	libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
 > ---
 > > -	libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
 > > +	libtool --tag=LD --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
 > 

From: Daniel Loffgren <miyokojiro@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47297: fonts/ttmkfdir2 fails to build with PKGSRC_COMPILER=clang
Date: Mon, 10 Dec 2012 17:10:00 -0800

 That does get them to build without needing explicit tags. However, =
 libtool-base is a dependency of lang/clang in pkgsrc, which creates a =
 sort of chicken and egg issue if you don't have clang to start with, and =
 do build it from source. Additionally, security/nettle already has CC =
 tags added to the libtool lines via pkgsrc patches, but not LD tags. I =
 could be overlooking something, but wouldn't it be better to just be =
 explicit in both cases, and not depend on a libtool that was built =
 with/after whatever compiler you may be using?

 On Dec 10, 2012, at 3:45 AM, Thomas Klausner <wiz@NetBSD.org> wrote:

 > The following reply was made to PR pkg/47297; it has been noted by =
 GNATS.
 >=20
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc:=20
 > Subject: Re: pkg/47297: fonts/ttmkfdir2 fails to build with
 > PKGSRC_COMPILER=3Dclang
 > Date: Mon, 10 Dec 2012 12:43:18 +0100
 >=20
 > For this and your other bug report on the same subject:
 > Can you please make sure you've compiled libtool with the same =
 settings?
 >=20
 > I.e. pkg_delete libtool*
 > cd /usr/pkgsrc/devel/libtool-base
 > make install
 > (with the same mk.conf you use for building packages)
 >=20
 > Thanks,
 >  Thomas
 >=20
 > On Sat, Dec 08, 2012 at 05:45:00AM +0000, miyokojiro@gmail.com wrote:
 >>> Number:         47297
 >>> Category:       pkg
 >>> Synopsis:       fonts/ttmkfdir2 fails to build with =
 PKGSRC_COMPILER=3Dclang
 >>> Confidential:   no
 >>> Severity:       non-critical
 >>> Priority:       low
 >>> Responsible:    pkg-manager
 >>> State:          open
 >>> Class:          sw-bug
 >>> Submitter-Id:   net
 >>> Arrival-Date:   Sat Dec 08 05:45:00 +0000 2012
 >>> Originator:     Daniel Loffgren
 >>> Release:        NetBSD 6.99.15 (HEAD as of Dec 6 2012)
 >>> Organization:
 >>> Environment:
 >> NetBSD Maki.local 6.99.15 NetBSD 6.99.15 (VMWARE) #6: Fri Dec  7 =
 15:21:43 UTC 2012  =
 kojiro@Maki.local:/usr/src/sys/arch/i386/compile/VMWARE i386
 >>> Description:
 >> libtool can't determine the intended behavior of clang since it's not =
 being called via gcc, g++, ld, etc., so it needs to be explicitly =
 specified. This problem could possibly arise with other compilers as =
 well, and there should be no harm in being explicit.
 >>=20
 >>> How-To-Repeat:
 >> Have clang
 >> Set PKGSRC_COMPILER=3Dclang
 >> Try to build fonts/ttmkfdir2
 >>> Fix:
 >> This diff (applied to patch-aa, not added separately to patches) adds =
 tags to hint functionality to libtool without changing the behavior of =
 the build.
 >>=20
 >> Index: patch-aa
 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 >> RCS file: /cvsroot/pkgsrc/fonts/ttmkfdir2/patches/patch-aa,v
 >> retrieving revision 1.3
 >> diff -r1.3 patch-aa
 >> 3c3
 >> < --- Makefile.orig	Wed Nov  6 23:28:44 2002
 >> ---
 >>> --- Makefile.orig	2002-11-07 05:28:44.000000000 +0000
 >> 27c27
 >> < +	libtool --mode=3Dcompile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c =
 $^
 >> ---
 >>> +	libtool --tag=3DCC --mode=3Dcompile $(CXX) $(CPPFLAGS) =
 $(CXXFLAGS) -o $@ -c $^
 >> 30c30,31qi
 >> <  	libtool --mode=3Dlink $(CXX) -o $@ $^ $(LDFLAGS)
 >> ---
 >>> -	libtool --mode=3Dlink $(CXX) -o $@ $^ $(LDFLAGS)
 >>> +	libtool --tag=3DLD --mode=3Dlink $(CXX) -o $@ $^ $(LDFLAGS)
 >>=20
 >=20

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47297: fonts/ttmkfdir2 fails to build with
 PKGSRC_COMPILER=clang
Date: Tue, 11 Dec 2012 05:53:42 +0000

 On Tue, Dec 11, 2012 at 01:15:04AM +0000, Daniel Loffgren wrote:
  >  That does get them to build without needing explicit tags. However, =
  >  libtool-base is a dependency of lang/clang in pkgsrc, which creates a =
  >  sort of chicken and egg issue if you don't have clang to start with, and =
  >  do build it from source. Additionally, security/nettle already has CC =
  >  tags added to the libtool lines via pkgsrc patches, but not LD tags. I =
  >  could be overlooking something, but wouldn't it be better to just be =
  >  explicit in both cases, and not depend on a libtool that was built =
  >  with/after whatever compiler you may be using?

 Well, the short answer is that if you don't rebuild libtool after
 changing the compilation environment, all manner of packages will
 break this way; patching them all is not either feasible or desirable.

 (also, I don't see any references to clang in libtool-base... or the
 other way around, either.)

 -- 
 David A. Holland
 dholland@netbsd.org

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/47297: fonts/ttmkfdir2 fails to build with
 PKGSRC_COMPILER=clang
Date: Tue, 11 Dec 2012 08:36:50 +0100

 On Tue, Dec 11, 2012 at 01:15:04AM +0000, Daniel Loffgren wrote:
 >  That does get them to build without needing explicit tags. However,
 >  libtool-base is a dependency of lang/clang in pkgsrc, which creates a
 >  sort of chicken and egg issue if you don't have clang to start with, and
 >  do build it from source. Additionally, security/nettle already has CC
 >  tags added to the libtool lines via pkgsrc patches, but not LD tags. I
 >  could be overlooking something, but wouldn't it be better to just be
 >  explicit in both cases, and not depend on a libtool that was built
 >  with/after whatever compiler you may be using?

 clang is included in the base system e.g. in OS X and even NetBSD (if
 you compile the world with the right flags) so it also depends how you
 get it installed.

 Using a libtool built for a different might cause other problems as
 well, so you have to rebuild it after a compiler change. Sorry.
  Thomas

State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 08 Aug 2015 19:51:46 +0000
State-Changed-Why:
It has been stated that the use case is invalid and unsupported. Rebuild
libtool after changing compilers.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.