Subject: pkg/28926: pkg_install's configure script doesn't warn if it can't find libraries to link against
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dhgutteridge@sympatico.ca>
List: pkgsrc-bugs
Date: 01/10/2005 04:24:00
>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: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 10 04:24:00 +0000 2005
>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