NetBSD Problem Report #28926

From www@netbsd.org  Mon Jan 10 04:23:20 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 9CD8163B400; Mon, 10 Jan 2005 04:23:20 +0000 (UTC)
Message-Id: <20050110042320.9CD8163B400@narn.netbsd.org>
Date: Mon, 10 Jan 2005 04:23:20 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: dhgutteridge@sympatico.ca
To: gnats-bugs@netbsd.org
Subject: pkg_install's configure script doesn't warn if it can't find libraries to link against
X-Send-Pr-Version: www-1.0

>Number:         28926
>Category:       pkg
>Synopsis:       pkg_install's configure script doesn't warn if it can't find libraries to link against
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    joerg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 10 04:24:00 +0000 2005
>Closed-Date:    Fri Feb 13 01:39:51 +0000 2009
>Last-Modified:  Fri Feb 13 01:39:51 +0000 2009
>Originator:     David H. Gutteridge
>Release:        Varlous
>Organization:
>Environment:
>Description:
The configure script for pkg_install doesn't warn if it can't find ncurses/termcap/etc. (or db1) to link against, causing builds to fail during linking.  I've submitted a proposed patch to configure.ac to fix this.  (I previously submitted this back in May under pkgsrc, I've realized I filed it incorrectly.)  I didn't put an exit statement into the  db1 check, I wasn't sure if that was necessarily fatal.
>How-To-Repeat:
Compile pkg_install from pkgsrc (via bootstrap or on its own) on a machine that doesn't have a relevant ncurses/termcap/etc. linker name symlink available, e.g. Debian Linux, which provides linker names only when pertinent library development packages are installed.
>Fix:
--- configure.ac.orig	Sun Jan  9 20:08:28 2005
+++ configure.ac	Sun Jan  9 20:15:17 2005
@@ -68,8 +68,11 @@
 AC_SUBST(mtree)

 dnl Checks for libraries.
-AC_CHECK_LIB(db1, dbopen)
-AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses])
+AC_CHECK_LIB(db1, dbopen, ,[echo "No db1 library is available to link " \
+	"against."])
+AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses tinfo], ,
+               echo "No curses library is available to link against.  "\
+               "Please install termcap or ncurses or similar library."; exit)

 dnl Checks for header files.
 AC_HEADER_STDC

>Release-Note:

>Audit-Trail:
From: David H.Gutteridge <dhgutteridge@sympatico.ca>
To: <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/28926: pkg_install's configure script doesn't warn if it can't
Date: Sun, 9 Jan 2005 23:33:22 -0500

 This is a multi-part message in MIME format.

 ------=____1105331602388_rBjr6Ok1bf
 Content-Type: text/plain; charset=iso-8859-1
 Content-Transfer-Encoding: 7bit

 I meant to add that I was looking at this in the context of bootstrapping pkgsrc, and I noticed that tnftp and pkg_install are both looking for the same function, but each had one unique library name they queried against in addition to those they shared.  I added to both so they now check against five different library names.  (Those names being: termcap, curses, ncurses, tinfo, and termlib.)
 > > 
 > > From: gnats-admin@netbsd.org
 > > Date: 2005/01/09 Sun PM 11:24:00 EST
 > > To: dhgutteridge@sympatico.ca
 > > Subject: Re: pkg/28926: pkg_install's configure script doesn't warn if it can't find libraries to link against
 > > 
 > > 
 > 
 > 

 ------=____1105331602388_rBjr6Ok1bf
 Content-Transfer-Encoding: base64
 Content-Type: null;
 	name="reply"
 Content-Disposition: inline;
 	filename="reply"

 VGhhbmsgeW91IHZlcnkgbXVjaCBmb3IgeW91ciBwcm9ibGVtIHJlcG9ydC4NCkl0IGhhcyB0
 aGUgaW50ZXJuYWwgaWRlbnRpZmljYXRpb24gYHBrZy8yODkyNicuDQpUaGUgaW5kaXZpZHVh
 bCBhc3NpZ25lZCB0byBsb29rIGF0IHlvdXINCnJlcG9ydCBpczogcGtnLW1hbmFnZXIuIA0K
 DQo+Q2F0ZWdvcnk6ICAgICAgIHBrZw0KPlJlc3BvbnNpYmxlOiAgICBwa2ctbWFuYWdlcg0K
 PlN5bm9wc2lzOiAgICAgICBwa2dfaW5zdGFsbCdzIGNvbmZpZ3VyZSBzY3JpcHQgZG9lc24n
 dCB3YXJuIGlmIGl0IGNhbid0IGZpbmQgbGlicmFyaWVzIHRvIGxpbmsgYWdhaW5zdA0KPkFy
 cml2YWwtRGF0ZTogICBNb24gSmFuIDEwIDA0OjI0OjAwICswMDAwIDIwMDUNCg0K
 ------=____1105331602388_rBjr6Ok1bf--

Responsible-Changed-From-To: pkg-manager->jlam
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Tue, 15 Mar 2005 17:47:32 +0000
Responsible-Changed-Why:
jlam agreed to handle this one.


From: David H.Gutteridge <dhgutteridge@sympatico.ca>
To: <jlam@netbsd.org>, <pkg-manager@netbsd.org>,
	<pkgsrc-bugs@netbsd.org>, <gnats-admin@netbsd.org>,
	<gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/28926
Date: Wed, 30 Mar 2005 22:26:35 -0500

 This is a multi-part message in MIME format.

 ------=____1112239595941_qKxOrqU1RX
 Content-Type: text/plain; charset=iso-8859-1
 Content-Transfer-Encoding: 7bit

 I'm new to autoconf, my suggested patch before wasn't so hot, this one's better.

 Dave

 --- configure.ac.orig	Sun Jan  9 20:18:28 2005
 +++ configure.ac	Wed Mar 30 22:02:46 2005
 @@ -68,8 +68,10 @@
  AC_SUBST(mtree)

  dnl Checks for libraries.
 -AC_CHECK_LIB(db1, dbopen)
 -AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses])
 +AC_CHECK_LIB(db1, dbopen, ,
 +	AC_MSG_ERROR([no db1 library was found to link against.]))
 +AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses tinfo], ,
 +	AC_MSG_ERROR([no relevant curses library was found to link against.]))

  dnl Checks for header files.
  AC_HEADER_STDC

 ------=____1112239595941_qKxOrqU1RX
 Content-Transfer-Encoding: base64
 Content-Type: null;
 	name="replyAll"
 Content-Disposition: inline;
 	filename="replyAll"

 U3lub3BzaXM6IHBrZ19pbnN0YWxsJ3MgY29uZmlndXJlIHNjcmlwdCBkb2Vzbid0IHdhcm4g
 aWYgaXQgY2FuJ3QgZmluZCBsaWJyYXJpZXMgdG8gbGluayBhZ2FpbnN0DQoNClJlc3BvbnNp
 YmxlLUNoYW5nZWQtRnJvbS1UbzogcGtnLW1hbmFnZXItPmpsYW0NClJlc3BvbnNpYmxlLUNo
 YW5nZWQtQnk6IHdpekBuZXRic2Qub3JnDQpSZXNwb25zaWJsZS1DaGFuZ2VkLVdoZW46IFR1
 ZSwgMTUgTWFyIDIwMDUgMTc6NDc6MzIgKzAwMDANClJlc3BvbnNpYmxlLUNoYW5nZWQtV2h5
 Og0KamxhbSBhZ3JlZWQgdG8gaGFuZGxlIHRoaXMgb25lLg0KDQoNCg==
 ------=____1112239595941_qKxOrqU1RX--

Responsible-Changed-From-To: jlam->joerg
Responsible-Changed-By: joerg@NetBSD.org
Responsible-Changed-When: Thu, 12 Feb 2009 00:16:50 +0000
Responsible-Changed-Why:
pkg_install maintainer


State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Thu, 12 Feb 2009 00:16:50 +0000
State-Changed-Why:
The tgetent search is unnecessary. I have removed the reference to that
and the associated search for curses, I don't think it is ever used.
The db case is a bit more special, libnbcompat will provide db if it
doesn't exist. Before pkg_install was disabling the use of bdb internally.

Does your concern still exist?


From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/28926 (pkg_install's configure script doesn't warn if it can't find
 libraries to link against)
Date: Thu, 12 Feb 2009 20:14:52 -0500

 >State-Changed-From-To: open->feedback
 >State-Changed-By: joerg@NetBSD.org
 >State-Changed-When: Thu, 12 Feb 2009 00:16:50 +0000
 >State-Changed-Why:
 >The tgetent search is unnecessary. I have removed the reference to that
 >and the associated search for curses, I don't think it is ever used.
 >The db case is a bit more special, libnbcompat will provide db if it
 >doesn't exist. Before pkg_install was disabling the use of bdb internally.
 >
 >Does your concern still exist?

 Hi Joerg,

 I think you can safely close this ticket, then.  (The old version of
 pkg_install had the file pkg_install/lib/ftpio.c that made use of
 termcap functionality, so I assume that was the reason for the
 inclusion of the check originally.  Now that you've rewritten things,
 that's irrelevant.)

 Thanks,

 Dave


State-Changed-From-To: feedback->closed
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Fri, 13 Feb 2009 01:39:51 +0000
State-Changed-Why:
Supposedly fixed. Thanks for the PR.


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