From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#7642: Build failure on NetBSD 5.0.2 on IA-32 Date: Fri, 17 Dec 2010 22:32:17 +0800 Message-ID: <87ipys1nda.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1292597851 14150 80.91.229.12 (17 Dec 2010 14:57:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Dec 2010 14:57:31 +0000 (UTC) Cc: enami tsugutomo , 7642@debbugs.gnu.org, 6190@debbugs.gnu.org To: "Nelson H. F. Beebe" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 17 15:57:26 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTbkL-0001Tc-PJ for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Dec 2010 15:57:26 +0100 Original-Received: from localhost ([127.0.0.1]:35516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTbkL-0001nP-8E for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Dec 2010 09:57:25 -0500 Original-Received: from [140.186.70.92] (port=43160 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTbfv-0007X1-9f for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2010 09:52:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTbft-00052I-TW for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2010 09:52:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTbft-000520-41 for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2010 09:52:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PTbGw-0006ES-LD; Fri, 17 Dec 2010 09:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Dec 2010 14:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7642 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7642-submit@debbugs.gnu.org id=B7642.129259597023873 (code B ref 7642); Fri, 17 Dec 2010 14:27:02 +0000 Original-Received: (at 7642) by debbugs.gnu.org; 17 Dec 2010 14:26:10 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PTbG5-0006Cz-35 for submit@debbugs.gnu.org; Fri, 17 Dec 2010 09:26:09 -0500 Original-Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PTbFz-0006Cb-4m; Fri, 17 Dec 2010 09:26:05 -0500 Original-Received: from furball (bb121-6-218-24.singnet.com.sg [121.6.218.24]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id oBHEWLjG019576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 17 Dec 2010 09:32:23 -0500 Original-Received: by furball (Postfix, from userid 1000) id 969F3161F1E; Fri, 17 Dec 2010 09:32:17 -0500 (EST) In-Reply-To: (Nelson H. F. Beebe's message of "Thu, 16 Dec 2010 10:03:57 -0700 (MST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 17 Dec 2010 09:27:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42590 Archived-At: "Nelson H. F. Beebe" writes: > % make distclean > % env LDFLAGS='-Wl,-rpath,/usr/X11R7/lib -L/usr/X11R7/lib' ./configure > --without-xaw3d > % make > ... > ld: cannot find -lterminfo > % ls /usr/lib/libterm* > /usr/lib/libtermcap.a /usr/lib/libtermlib.a > ... > > That is another error: -lterminfo is hard-coded into src/Makefile. The problem here is that in src/s/netbsd.h, we define #ifdef HAVE_TERM_H #define TERMINFO #define LIBS_TERMCAP -lterminfo #else #define LIBS_TERMCAP -ltermcap #endif Judging by this report, the existence of term.h does not imply that terminfo is available. So, we should go back to the prescription originally given in Bug#6190. Something like the following patch---Nelson, does it fix this problem? === modified file 'configure.in' *** configure.in 2010-12-10 17:46:40 +0000 --- configure.in 2010-12-17 14:29:37 +0000 *************** *** 2372,2377 **** --- 2372,2386 ---- # than to expect to find it in ncurses. AC_CHECK_LIB(ncurses, tparm) + case "$opsys" in + netbsd) + AC_SEARCH_LIBS(tputs, [ncurses terminfo termcap]); + if test $ac_cv_search_tputs = -lterminfo; then + AC_DEFINE(TERMINFO, 1, [Define to 1 if you use terminfo instead of termcap.]); + fi + ;; + esac + # Do we have res_init, for detecting changes in /etc/resolv.conf? resolv=no === modified file 'src/s/netbsd.h' *** src/s/netbsd.h 2010-05-21 04:06:34 +0000 --- src/s/netbsd.h 2010-12-17 14:29:31 +0000 *************** *** 45,52 **** #define LIBS_DEBUG /* -lutil is not needed for NetBSD >0.9. */ /* #define LIBS_SYSTEM -lutil */ ! #ifdef HAVE_TERM_H ! #define TERMINFO #define LIBS_TERMCAP -lterminfo #else #define LIBS_TERMCAP -ltermcap --- 45,51 ---- #define LIBS_DEBUG /* -lutil is not needed for NetBSD >0.9. */ /* #define LIBS_SYSTEM -lutil */ ! #ifdef TERMINFO #define LIBS_TERMCAP -lterminfo #else #define LIBS_TERMCAP -ltermcap === modified file 'configure' *** configure 2010-12-10 17:46:40 +0000 --- configure 2010-12-17 14:30:05 +0000 *************** *** 11833,11838 **** --- 11833,11904 ---- fi + case "$opsys" in + netbsd) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 + $as_echo_n "checking for library containing tputs... " >&6; } + if test "${ac_cv_search_tputs+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char tputs (); + int + main () + { + return tputs (); + ; + return 0; + } + _ACEOF + for ac_lib in '' ncurses terminfo termcap; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_tputs=$ac_res + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_tputs+set}" = set; then : + break + fi + done + if test "${ac_cv_search_tputs+set}" = set; then : + + else + ac_cv_search_tputs=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 + $as_echo "$ac_cv_search_tputs" >&6; } + ac_res=$ac_cv_search_tputs + if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + ; + if test $ac_cv_search_tputs = -lterminfo; then + + $as_echo "#define TERMINFO 1" >>confdefs.h + ; + fi + ;; + esac + # Do we have res_init, for detecting changes in /etc/resolv.conf? resolv=no