NetBSD Problem Report #33467

From www@netbsd.org  Fri May 12 09:15:08 2006
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id BD1F863BB08; Fri, 12 May 2006 09:15:08 +0000 (UTC)
Message-Id: <20060512091508.BD1F863BB08@narn.netbsd.org>
Date: Fri, 12 May 2006 09:15:08 +0000 (UTC)
From: frederic.touboul@gmail.com
Reply-To: frederic.touboul@gmail.com
To: gnats-bugs@netbsd.org
Subject: [Solaris] C++ shared library compilation is skipped when building databases/db4
X-Send-Pr-Version: www-1.0

>Number:         33467
>Category:       pkg
>Synopsis:       [Solaris] C++ shared library compilation is skipped when building databases/db4
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    solaris-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 12 09:20:01 +0000 2006
>Closed-Date:    Sun Jan 07 09:52:15 +0000 2007
>Last-Modified:  Sun Jan 07 09:52:15 +0000 2007
>Originator:     Frederic Touboul
>Release:        
>Organization:
>Environment:
SunOS basp 5.9 Generic_118558-26 sun4u sparc SUNW,Ultra-250
>Description:
When trying to install Sleepycat Berkley DB 4.4.20 on Solaris 9, using
the Sun studio 11 compiler, the build fails, with the following error message:

-----
===> Installing for db4-4.4.20
Installing DB include files: /usr/pkg/include/db4 ...
Installing DB library: /usr/pkg/lib ...
cp -p .libs/libdb4-4.4.so.4.0.20 /usr/pkg/lib/libdb4-4.4.so.4.0.20
(cd /usr/pkg/lib && { ln -s -f libdb4-4.4.so.4.0.20 libdb4-4.4.so.4 ||
{ rm -f libdb4-4.4.so.4 && ln -s libdb4-4.4.so.4.0.20 libdb4-4.4.so.4;
}; })
(cd /usr/pkg/lib && { ln -s -f libdb4-4.4.so.4.0.20 libdb4-4.4.so || {
rm -f libdb4-4.4.so && ln -s libdb4-4.4.so.4.0.20 libdb4-4.4.so; }; })
chmod +x /usr/pkg/lib/libdb4-4.4.so.4.0.20
cp -p .libs/libdb4-4.4.lai /usr/pkg/lib/libdb4-4.4.la
cp -p .libs/libdb4_cxx-4.4.so /usr/pkg/lib/libdb4_cxx-4.4.so
cp: cannot access .libs/libdb4_cxx-4.4.so
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/databases/db4/work/db-4.4.20/build_unix
*** Error code 1

[...]
-----

It seems the compilation didn't push through with the C++ shared
library file.

If I compile Berkeley DB 4.4.20 outside pkgsrc it succeeds to produce the C++ libraries, including the problematic libdb4_cxx-4.4.so file. To do so, the following commands are executed:

-----
/usr/bin/sh ./libtool --mode=link CC -avoid-version -O -rpath
/usr/local/BerkeleyDB.4.4/lib -o libdb_cxx-4.4.la [all object files]

CC -G -hlibdb_cxx-4.4.so -o .libs/libdb_cxx-4.4.so [all object files]

CC -xar -o .libs/libdb_cxx-4.4.a [all object files]
-----

The second line in the output above seems to produce
libdb4_cxx-4.4.so. With pkgsrc, this part of the compilation is
different:

-----
/usr/pkgsrc/databases/db4/work/.tools/bin/sh ./libtool --mode=link CC
-avoid-version -O -I/usr/include -rpath /usr/pkg/lib -L/usr/lib
-Wl,-R/usr/lib -Wl,-R/usr/pkg/lib  -o libdb4_cxx-4.4.la [all object
files]

ar cru .libs/libdb4_cxx-4.4.a [all object files]
-----

The first line seems to be roughly the same, but the second one is
missing with pkgsrc.

Using pkgsrc-current (as found in ftp://ftp.netbsd.org/pub/NetBSD/packages).
>How-To-Repeat:
Try to build and install databases/db4 on Solaris 9, using the Sun studio 11 compiler.
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Fri, 12 May 2006 17:01:34 +0000
Responsible-Changed-Why:
Solaris pkgsrc problem.


State-Changed-From-To: open->feedback
State-Changed-By: dmcmahill@netbsd.org
State-Changed-When: Fri, 15 Dec 2006 11:30:53 +0000
State-Changed-Why:
Should be addressed with libtool-base-1.5.22nb4.  You will also have to 
update mk/wrapper/wrapper.sh to rev 1.11 or newer.


From: Dan McMahill <dmcmahill@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/33467 CVS commit: pkgsrc/devel
Date: Fri, 15 Dec 2006 11:28:52 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	dmcmahill
 Date:		Fri Dec 15 11:28:52 UTC 2006

 Modified Files:
 	pkgsrc/devel/libtool: distinfo
 	pkgsrc/devel/libtool-base: Makefile
 	pkgsrc/devel/libtool/patches: manual-libtool.m4 patch-ab patch-ad

 Log Message:
 In the libtool configure script, the basename of the compiler is used
 to make decisions about which compiler is being used (gcc, SunPro, etc).
 To make this function "correctly" in the presence of the compiler wrapper
 scripts, we need to extract the actual compiler command from the wrapper
 frame work.  So adapt the section in the configure script which already
 attempts to deal with some other compiler wrappers to deal with the pkgsrc
 wrappers.

 This should address PR pkg/33467 and PR pkg/34581.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -r1.68 -r1.69 pkgsrc/devel/libtool/distinfo
 cvs rdiff -r1.79 -r1.80 pkgsrc/devel/libtool-base/Makefile
 cvs rdiff -r1.19 -r1.20 pkgsrc/devel/libtool/patches/manual-libtool.m4
 cvs rdiff -r1.57 -r1.58 pkgsrc/devel/libtool/patches/patch-ab
 cvs rdiff -r1.29 -r1.30 pkgsrc/devel/libtool/patches/patch-ad

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

From: Frederic Touboul <frederic.touboul@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/33467 ([Solaris] C++ shared library compilation is skipped
	when building databases/db4)
Date: Sun, 07 Jan 2007 10:26:16 +0100

 Greetings,

 I noticed that, as of the current version of pkgsrc, this problem is
 solved (at least for me).

 Regards,
 Frederic.

 On Fri, 2006-12-15 at 11:30 +0000, dmcmahill@netbsd.org wrote:
 > Synopsis: [Solaris] C++ shared library compilation is skipped when building databases/db4
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: dmcmahill@netbsd.org
 > State-Changed-When: Fri, 15 Dec 2006 11:30:53 +0000
 > State-Changed-Why:
 > Should be addressed with libtool-base-1.5.22nb4.  You will also have to 
 > update mk/wrapper/wrapper.sh to rev 1.11 or newer.
 > 
 > 
 > 

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@netbsd.org
State-Changed-When: Sun, 07 Jan 2007 09:52:15 +0000
State-Changed-Why:
Frederic Touboul reports the problem is fixed.
Thanks for the feedback!


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