NetBSD Problem Report #45087

From www@NetBSD.org  Mon Jun 20 17:58:11 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 43CFC63BC12
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 20 Jun 2011 17:58:11 +0000 (UTC)
Message-Id: <20110620175810.0797863BA51@www.NetBSD.org>
Date: Mon, 20 Jun 2011 17:58:10 +0000 (UTC)
From: tcort@minix3.org
Reply-To: tcort@minix3.org
To: gnats-bugs@NetBSD.org
Subject: databases/db4 support systems without shared libraries
X-Send-Pr-Version: www-1.0

>Number:         45087
>Category:       pkg
>Synopsis:       databases/db4 support systems without shared libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 20 18:00:01 +0000 2011
>Closed-Date:    Sat Sep 07 17:37:03 +0000 2019
>Last-Modified:  Sat Sep 07 17:37:03 +0000 2019
>Originator:     Thomas Cort
>Release:        N/A
>Organization:
Minix3
>Environment:
Minix 192.168.122.210 3.2.0 i686
>Description:
The db4 PLIST includes a few shared libraries. Since minix
doesn't support shared libraries at the moment, they aren't
built. Since they aren't built and they appear in the PLIST,
bmake install fails.

The patch below is modelled after some code in 
security/openssl/Makefile. If an operating system specific
PLIST exists, then it is included in PLIST_SRC, else
${PKGDIR}/PLIST.shlib is included. In both cases PLIST.common
is included. 

>How-To-Repeat:

>Fix:
The full patch is over 500KB and is located here:
http://www.tomcort.com/minix/db4.patch

In addition to the changes below, the patch
renames PLIST to PLIST.common and removes 6 lines
from PLIST.common (those lines were moved to PLIST.shlib).


diff --git a/databases/db4/Makefile b/databases/db4/Makefile
index 7eab0ca..dc41d28 100644
--- a/databases/db4/Makefile
+++ b/databases/db4/Makefile
@@ -43,6 +43,15 @@ CONFIGURE_ENV+=		LIBSO_LIBS=${LIBSO_LIBS:Q}
 PTHREAD_OPTS+=		native
 .include "../../mk/pthread.buildlink3.mk"

+PLIST_OPSYS?=		${PKGDIR}/PLIST.${LOWER_OPSYS:C/([.0-9]*)$//}
+.if exists(${PLIST_OPSYS})
+PLIST_SHLIB=		${PLIST_OPSYS}
+.else
+PLIST_SHLIB=		${PKGDIR}/PLIST.shlib
+.endif
+PLIST_SRC=		${PLIST_SHLIB}
+PLIST_SRC+=		${PKGDIR}/PLIST.common
+
 INSTALLATION_DIRS=	include/db4 lib share/doc/db4

 post-install:
diff --git a/databases/db4/PLIST.minix b/databases/db4/PLIST.minix
new file mode 100644
index 0000000..f79c3e5
--- /dev/null
+++ b/databases/db4/PLIST.minix
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+@comment Minix doesn't support shared libraries
diff --git a/databases/db4/PLIST.shlib b/databases/db4/PLIST.shlib
new file mode 100644
index 0000000..950719b
--- /dev/null
+++ b/databases/db4/PLIST.shlib
@@ -0,0 +1,6 @@
+lib/libdb4-4.8.la
+lib/libdb4-4.so
+lib/libdb4.so
+lib/libdb4_cxx-4.8.la
+lib/libdb4_cxx-4.so
+lib/libdb4_cxx.so

>Release-Note:

>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45087: databases/db4 support systems without shared libraries
Date: Tue, 21 Jun 2011 10:57:01 +0900

 For *.so files, as PR#45046, you should set _OPSYS_SHLIB_TYPE=none instead of "a.out"
 in pkgsrc/mk/platform/Minix.mk.
 But I don't know why *.la files are not installed on Minix.

From: Thomas Cort <tcort@minix3.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45087: databases/db4 support systems without shared
 libraries
Date: Tue, 21 Jun 2011 07:26:31 -0400

 > you should set _OPSYS_SHLIB_TYPE=none instead of "a.out"
 > in pkgsrc/mk/platform/Minix.mk.

 Good catch! I made this change and reverted the patch above.
 It doesn't complain about the *.so files any more, but it still
 complains about the *.la files.

 ===> Building binary package for db4-4.8.30
 => Creating binary package /usr/pkgsrc/packages/3.2.0/i386/All/db4-4.8.30.tgz
 can't stat `/usr/tmp/work/databases/db4/work/.destdir/usr/pkg/lib/libdb4-4.8.la'
 can't stat `/usr/tmp/work/databases/db4/work/.destdir/usr/pkg/lib/libdb4_cxx-4.8.la'
 pkg_create: lstat failed for file lib/libdb4-4.8.la: No such file or directory
 *** Error code 2

 > But I don't know why *.la files are not installed on Minix.

 db-4.8.30/build_unix/Makefile has this in it (*.la are part of libso):

 ---
 libdb_base=     libdb4
 libdb=          $(libdb_base).a
 libdb_version=  $(libdb_base)-$(LIBVERSION).a
 libso=          $(libdb_base)-$(LIBVERSION).so
 libso_target=   $(libdb_base)-$(LIBVERSION).la
 libso_default=  $(libdb_base).so
 libso_major=    $(libdb_base)-$(LIBMAJOR).so
 ---

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sat, 07 Sep 2019 17:37:03 +0000
State-Changed-Why:
wontfix because minix now has shared libraries :)


>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.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.