NetBSD Problem Report #45433

From www@NetBSD.org  Thu Oct  6 08:13:21 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 3CAFC63D48C
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  6 Oct 2011 08:13:21 +0000 (UTC)
Message-Id: <20111006081320.5A27463B8B4@www.NetBSD.org>
Date: Thu,  6 Oct 2011 08:13:20 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: security/cyrus-sasl does not compile on Solaris with lang/gcc34
X-Send-Pr-Version: www-1.0

>Number:         45433
>Category:       pkg
>Synopsis:       security/cyrus-sasl does not compile on Solaris with lang/gcc34
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 06 08:15:00 +0000 2011
>Last-Modified:  Mon Oct 10 14:15:03 +0000 2011
>Originator:     Jörn Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
>Description:
On Solaris, using lang/gcc34, security/cyrus-sasl fails to build:

libtool: link: gcc -shared -Wl,-z -Wl,text -Wl,-h -Wl,libsasldb.so.2 -o .libs/libsasldb.so.2.0.25  .libs/sasldb.o .libs/sasldb_init.o .libs/plugin_common.o  -Wl,-z -Wl,allextract ../sasldb/.libs/libsasldb.a -Wl,-z -Wl,defaultextract  -L/pkgsrc/source/pkgsrc/security/cyrus-sasl/work.pkgsrc-i86/.buildlink/gcc34/bin/../lib/gcc/i386-pc-solaris2.10/3.4.6 -L/pkgsrc/source/pkgsrc/security/cyrus-sasl/work.pkgsrc-i86/.buildlink/gcc34/bin/../lib -L/pkgsrc/source/pkgsrc/security/cyrus-sasl/work.pkgsrc-i86/.buildlink/gcc34/lib -L/pkgsrc/source/pkgsrc/security/cyrus-sasl/work.pkgsrc-i86/.buildlink/lib -lresolv -lsocket -lc  -Wl,-R/usr/pkgsrc/20110926/lib  
Text relocation remains                         referenced
    against symbol                  offset      in file
<unknown>                           0x72        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0xa1        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
db_ok                               0xbc        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0xc7        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x104       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x13c       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x180       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x1c3       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x1ea       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x272       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x295       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x2d5       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x313       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x35a       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x370       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x3da       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x410       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x460       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x492       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x4f0       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x50d       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x533       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
db_ok                               0x562       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x578       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x5a1       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
db_ok                               0x5b9       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x5c4       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x5fa       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x63a       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
<unknown>                           0x661       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
_sasldb_alloc_key                   0xf2        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
_sasldb_alloc_key                   0x2c3       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
memcpy                              0x216       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
memcpy                              0x716       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
_xstat                              0xf         ../sasldb/.libs/libsasldb.a(db_ndbm.o)
_lxstat                             0x24        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
_fxstat                             0x39        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
_xmknod                             0x51        ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_open                            0x16e       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_open                            0x348       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_open                            0x629       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_fetch                           0x1ae       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_close                           0x23d       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_close                           0x433       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_close                           0x672       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_close                           0x75d       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_store                           0x3cb       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_delete                          0x401       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
sprintf                             0x513       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
sprintf                             0x539       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_firstkey                        0x6c9       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
dbm_nextkey                         0x6e3       ../sasldb/.libs/libsasldb.a(db_ndbm.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
gmake[2]: *** [libsasldb.la] Error 1

>How-To-Repeat:

>Fix:
Setting SASL_DBTYPE=berkeley and building against databases/db4 works, but version 2.1.23 did compile against the native ndbm.

>Release-Note:

>Audit-Trail:
From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45433: security/cyrus-sasl does not compile on Solaris with
 lang/gcc34
Date: Thu, 06 Oct 2011 10:19:58 +0200

 Correction: A few days ago, I was still able to build cyrus-sasl version 
 2.1.25 using ndbm. Something must have been broken very recently. The 
 package is not even reported as outdated by pkg_chk.

 -- 
   Jörn Clausen                             joern.clausen@uni-bielefeld.de
   Hochschulrechenzentrum                 http://www.uni-bielefeld.de/hrz/
   Universität Bielefeld

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Thu, 06 Oct 2011 11:41:52 +0000
Responsible-Changed-Why:
Problem on Solaris (I have no Solaris environment).


From: Tim Zingelman <zingelman@gmail.com>
To: gnats-bugs@netbsd.org
Cc: joern.clausen@uni-bielefeld.de
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with lang/gcc34)
Date: Thu, 6 Oct 2011 17:25:11 -0500

 It does not appear that the package has been changed since 2 weeks
 ago... my first attempt to reproduce this failed... but I have gcc
 4.4.5 on
 Oracle Solaris 10 9/10 s10x_u9wos_14a X86 (You don't mention your os
 version) I don't think the compiler difference would matter in this
 case.
 (I also did not start with a clean bootstrap, did you?)  any other config steps?
 Any idea what else than pkgsrc might have changed?  if it is only
 pkgsrc can you pinpoint more closely the time when it last worked and
 first failed?

From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: Tim Zingelman <zingelman@gmail.com>, solaris-pkg-people@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with
 lang/gcc34)
Date: Fri, 07 Oct 2011 10:25:41 +0200

 >   It does not appear that the package has been changed since 2 weeks
 >   ago... my first attempt to reproduce this failed... but I have gcc
 >   4.4.5 on
 >   Oracle Solaris 10 9/10 s10x_u9wos_14a X86 (You don't mention your os
 >   version) I don't think the compiler difference would matter in this
 >   case.

 i86: 5.10 Generic_142901-03
 sparc: 5.10 Generic_142900-03

 I'm pretty sure it's the compiler/linker combination, because of "text 
 relocation" problems.

 >   (I also did not start with a clean bootstrap, did you?)  any other config steps?
 >   Any idea what else than pkgsrc might have changed?  if it is only
 >   pkgsrc can you pinpoint more closely the time when it last worked and
 >   first failed?

 The last working version was installed 2011-09-08, the pkgsrc tree was 
 synced around that time as well.

 BTW: Even with "bmake SASL_DBTYPE=berkeley", I can't build the package 
 on sparc. The command lines libtool generates for building 
 libsasldb.so.2.0.25 are identical on both architectures, but on i86 the 
 build succeeds, on sparc it fails. I don't see any differences in the 
 generated config.log files. I suspect a regression in libtool.

 -- 
   Jörn Clausen                             joern.clausen@uni-bielefeld.de
   Hochschulrechenzentrum                 http://www.uni-bielefeld.de/hrz/
   Universität Bielefeld

From: Tim Zingelman <tez@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>, 
	hans@netbsd.org
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with lang/gcc34)
Date: Fri, 7 Oct 2011 17:46:31 -0500

 Please get a new libtool and try again to see if this fixes the
 problem... from the libtool cvs history:

 2011-09-16 17:08:27 by Joerg Sonnenberger | Files touched by this commit (2)
 Log message:
 Revert. Doesn't follow the patch rules for libtool, wasn't discussed
 with the OWNER.

 2011-09-14 18:35:51 by Hans Rosenfeld | Files touched by this commit (2)
 Log message:
 Don't add -z text unconditionally to ld on SunOS. This make
 -mimpure-text work again, which is needed for several packages that use
 assembly optimizations.

 (next prior change is May 2011)

 I'm also cc'ing Hans, so he is aware the change may have broken more
 things than the patch rules for libtool.

  - Tim

From: Hans Rosenfeld <hans@NetBSD.org>
To: Tim Zingelman <tez@NetBSD.org>
Cc: gnats-bugs@NetBSD.org,
        =?iso-8859-1?Q?J=F6rn?= Clausen <joern.clausen@uni-bielefeld.de>
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with lang/gcc34)
Date: Sat, 8 Oct 2011 01:48:25 +0200

 On Fri, Oct 07, 2011 at 05:46:31PM -0500, Tim Zingelman wrote:
 > Please get a new libtool and try again to see if this fixes the
 > problem... from the libtool cvs history:
 >
 > 2011-09-16 17:08:27 by Joerg Sonnenberger | Files touched by this commit (2)
 > Log message:
 > Revert. Doesn't follow the patch rules for libtool, wasn't discussed
 > with the OWNER.
 > 
 > 2011-09-14 18:35:51 by Hans Rosenfeld | Files touched by this commit (2)
 > Log message:
 > Don't add -z text unconditionally to ld on SunOS. This make
 > -mimpure-text work again, which is needed for several packages that use
 > assembly optimizations.
 > 
 > (next prior change is May 2011)
 > 
 > I'm also cc'ing Hans, so he is aware the change may have broken more
 > things than the patch rules for libtool.

 It is unlikely that the libtool change was related to that, and if it
 was, it would be the other way round. The libtool change was supposed to
 allow working around similar bugs that cannot be easily fixed in the
 source.

 Thats what -mimpure-text does, it prevents gcc from adding -z text to
 the linker arguments. Of course that is pretty much useless if libtool
 adds -z text, too, Which is useless in itself as it is the default
 already.

 But I think doing that here could be wrong. I have only taken a quick
 look at the bug, and I would suspect a ndbm to be at fault. It's just a
 wild guess, but maybe it's not built as PIC?


 Hans


 -- 
 %SYSTEM-F-ANARCHISM, The operating system has been overthrown

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with
 lang/gcc34)
Date: Sat, 8 Oct 2011 08:31:41 +0200

 On Fri, Oct 07, 2011 at 11:50:04PM +0000, Hans Rosenfeld wrote:
 >  It is unlikely that the libtool change was related to that, and if it
 >  was, it would be the other way round. The libtool change was supposed to
 >  allow working around similar bugs that cannot be easily fixed in the
 >  source.

 I agree. Does this package use symbol visibility by chance and is
 failing due to that? The real curious part is the missing sprintf.

 Joerg

From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: Filip Hajny <filip@joyent.com>
Cc: gnats-bugs@NetBSD.org, solaris-pkg-people@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with
 lang/gcc34)
Date: Mon, 10 Oct 2011 13:22:35 +0200

 On 10/10/11 12:30 PM, Filip Hajny wrote:
 [...]
 > I was able to work around using CFLAGS.SunOS+=-fPIC.

 Same here. Interesting enough, configure tests for -fPIC, but it is 
 probably not correctly propagated to all subdirectories.

 -- 
   Jörn Clausen                             joern.clausen@uni-bielefeld.de
   Hochschulrechenzentrum                 http://www.uni-bielefeld.de/hrz/
   Universität Bielefeld

From: "Filip Hajny" <filip@joyent.com>
To: <gnats-bugs@NetBSD.org>
Cc: <solaris-pkg-people@NetBSD.org>,
	<gnats-admin@netbsd.org>,
	<pkgsrc-bugs@netbsd.org>,
	<joern.clausen@uni-bielefeld.de>
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with lang/gcc34)
Date: Mon, 10 Oct 2011 12:30:02 +0200

 On 8. 10. 2011, at 8:35, Joerg Sonnenberger wrote:

 > The following reply was made to PR pkg/45433; it has been noted by GNATS.
 >=20
 > From: Joerg Sonnenberger <joerg@britannica.bec.de>
 > To: gnats-bugs@NetBSD.org
 > Cc:=20
 > Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris w=
 ith
 > lang/gcc34)
 > Date: Sat, 8 Oct 2011 08:31:41 +0200
 >=20
 > On Fri, Oct 07, 2011 at 11:50:04PM +0000, Hans Rosenfeld wrote:
 >> It is unlikely that the libtool change was related to that, and if it
 >> was, it would be the other way round. The libtool change was supposed to
 >> allow working around similar bugs that cannot be easily fixed in the
 >> source.
 >=20
 > I agree. Does this package use symbol visibility by chance and is
 > failing due to that? The real curious part is the missing sprintf.
 >=20

 I was just getting something very similar on on pkgsrc-2011Q3, on SmartOS (=
 Illumos-like) and GCC 4.5.2:

 /usr/bin/bash ../libtool   --mode=3Dlink gcc  -Wall -W -O -O2 -module -expo=
 rt-dynamic -rpath /opt/local/lib/sasl2 -version-info 2:25:0 -Wl,-R/opt/loca=
 l/lib -o libsasldb.la  sasldb.lo sasldb_init.lo plugin_common.lo ../sasldb/=
 libsasldb.la   -lresolv  -lsocket
 libtool: link: gcc -shared -Wl,-z -Wl,text -Wl,-h -Wl,libsasldb.so.2 -o .li=
 bs/libsasldb.so.2.0.25  .libs/sasldb.o .libs/sasldb_init.o .libs/plugin_com=
 mon.o  -Wl,-z -Wl,allextract ../sasldb/.libs/libsasldb.a -Wl,-z -Wl,default=
 extract  -L/tmp/pkgsrc/security/cyrus-sasl/work/.buildlink/lib -lresolv -ls=
 ocket -lc  -Wl,-R/opt/local/lib
 Text relocation remains                         referenced
     against symbol                  offset      in file
 .rodata.str1.1 (merged string section) 0xc              ../sasldb/.libs/lib=
 sasldb.a(allockey.o)
 .LC2                                0x300       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 .rodata.str1.4 (section)            0x396       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 .rodata.str1.4 (section)            0x3bc       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 .LC2                                0x405       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 .rodata.str1.1 (merged string section) 0x4fa            ../sasldb/.libs/lib=
 sasldb.a(allockey.o)
 .rodata.str1.4 (section)            0x59c       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 .rodata.str1.4 (section)            0x5ac       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 .rodata.str1.4 (section)            0x5e7       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 .rodata.str1.4 (section)            0x5f4       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 _sasldb_putdata                     0x422       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 _sasldb_getdata                     0x31a       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 __sasldb_internal_list              0x5da       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 _sasldb_parse_key                   0x4e5       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 _sasldb_getkeyhandle                0x455       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 _sasldb_getnextkey                  0x491       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 _sasldb_getnextkey                  0x55c       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 _sasldb_releasekeyhandle            0x583       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 memcpy                              0xed        ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 memcpy                              0x114       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 memcpy                              0x136       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 memcpy                              0x364       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 strncpy                             0x258       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 strncpy                             0x28b       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 strncpy                             0x2b4       ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 printf                              0x23        ../sasldb/.libs/libsasldb.a=
 (allockey.o)
 ld: fatal: relocations remain against allocatable but non-writable sections
 collect2: ld returned 1 exit status
 gmake[2]: *** [libsasldb.la] Error 1
 gmake[2]: Leaving directory `/tmp/pkgsrc/security/cyrus-sasl/work/cyrus-sas=
 l-2.1.25/plugins'
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory `/tmp/pkgsrc/security/cyrus-sasl/work/cyrus-sas=
 l-2.1.25'
 gmake: *** [all] Error 2
 *** Error code 2

 I was able to work around using CFLAGS.SunOS+=3D-fPIC.

 -F=

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45433 (security/cyrus-sasl does not compile on Solaris with
 lang/gcc34)
Date: Mon, 10 Oct 2011 23:13:56 +0900

 On Mon, 10 Oct 2011 20:25:01 +0900, Jörn Clausen <joern.clausen@uni-bielefeld.de> wrote:

 >  Same here. Interesting enough, configure tests for -fPIC, but it is
 >  probably not correctly propagated to all subdirectories.

 For me (NetBSD-5.1), it seems that -fPIC is added by libtool automatically
 at building.

 -- 
 OBATA Akio / obache@NetBSD.org

>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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.