zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: <zsh-workers@sunsite.dk>
Cc: Peter Whaite <peta@cortexmachina.com>
Subject: PATCH: Re: comptest* failed to load module: zsh/termcap
Date: Mon, 30 Apr 2001 17:16:05 +0000	[thread overview]
Message-ID: <1010430171605.ZM9038@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.SV4.4.33.0104302044140.13810-100000@itsrm2.mow.siemens.ru>

On Apr 30,  8:47pm, Andrej Borsenkow wrote:
} Subject: Re: comptest* failed to load module: zsh/termcap
}
} On Mon, 30 Apr 2001, Bart Schaefer wrote:
} 
} > Modules/termcap.o: In function `scantermcap':
} > Modules/termcap.o(.text+0x450): undefined reference to `boolcodes'
} >
} > So the problem is that configure.in is still missing the AC_SEARCH_LIBS
} > call to find the ncurses libraries (it does one only for tgetent, which
} > finds old termcap first).
} 
} But it should not find the above variables then and should not try use
} them (or use local static placeholders). So, the question is - why
} configure sets HAVE_BOOLCODES and others at all? I believe, we finally
} cleaned this up ... are you sure you are using the lates CVS?

Yes, I did a "cvs up -d -P" immediately before buiding.

Checking config.log, it turns out that even without -lcurses in the link,
AC_TRY_LINK is succeeding for boolcodes et al. -- possibly gcc is doing
an optimization and throwing out the `test' variable because it's not
used, and therefore not actually trying to find boolcodes at link time:

configure:3112: checking if boolcodes is available
configure:3124: gcc -o conftest  -Wall -Wno-implicit -Wmissing-prototypes -O2 -D _LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  conftest.c -ltermcap -lm  -lc 1>&5
configure: In function `main':
configure:3120: warning: initialization discards qualifiers from pointer target type
configure:3120: warning: unused variable `test'

The compilation then succeeds and goes on to the next thing.  On my RH5.2
system at home, there's a link failure at this point.

Sure enough, if I change configure.in to:

#include <term.h>], [char **test = boolcodes; printf(*test);],

(so that `test' is used), then AC_TRY_LINK fails and all is well.  We've
been bitten by an overoptimizing compiler.

Index: configure.in
===================================================================
--- configure.in	2001/04/27 05:21:54	1.4
+++ configure.in	2001/04/30 17:13:21
@@ -533,36 +533,36 @@
 AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
 #include <curses.h>
 #endif
-#include <term.h>], [char **test = boolcodes;],
+#include <term.h>], [char **test = boolcodes; printf(*test);],
 AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
 AC_MSG_RESULT($boolcodes)
 AC_MSG_CHECKING(if numcodes is available)
 AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
 #include <curses.h>
 #endif
-#include <term.h>], [char **test = numcodes;],
+#include <term.h>], [char **test = numcodes; printf(*test);],
 AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
 AC_MSG_RESULT($numcodes)
 AC_MSG_CHECKING(if strcodes is available)
 AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
 #include <curses.h>
 #endif
-#include <term.h>], [char **test = strcodes;],
+#include <term.h>], [char **test = strcodes; printf(*test);],
 AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
 AC_MSG_RESULT($strcodes)
 AC_MSG_CHECKING(if boolnames is available)
 AC_TRY_LINK([#include <curses.h>
-#include <term.h>], [char **test = boolnames;],
+#include <term.h>], [char **test = boolnames; printf(*test);],
 AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no)
 AC_MSG_RESULT($boolnames)
 AC_MSG_CHECKING(if numnames is available)
 AC_TRY_LINK([#include <curses.h>
-#include <term.h>], [char **test = numnames;],
+#include <term.h>], [char **test = numnames; printf(*test);],
 AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no)
 AC_MSG_RESULT($numnames)
 AC_MSG_CHECKING(if strnames is available)
 AC_TRY_LINK([#include <curses.h>
-#include <term.h>], [char **test = strnames;],
+#include <term.h>], [char **test = strnames; printf(*test);],
 AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
 AC_MSG_RESULT($strnames)
 

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2001-04-30 17:16 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-27 19:54 Peter Whaite
2001-04-28  6:10 ` Bart Schaefer
2001-04-28  8:55   ` Andrej Borsenkow
2001-04-30 15:44     ` Peter Whaite
2001-04-30 16:30       ` Bart Schaefer
2001-04-30 16:47         ` Andrej Borsenkow
2001-04-30 17:16           ` Bart Schaefer [this message]
2001-04-30 18:54         ` Peter Whaite
2001-04-30 19:12           ` Bart Schaefer
2001-04-30 15:32   ` Peter Whaite
  -- strict thread matches above, loose matches on Subject: below --
1997-01-31 10:47 history-search-backward Peter Stephenson
1997-01-31 12:16 ` history-search-backward Zefram
1997-01-31 12:42   ` history-search-backward Peter Stephenson
1997-01-31 15:02     ` history-search-backward Bart Schaefer
1997-01-31 15:23       ` history-search-backward Vinnie Shelton
1997-01-31 19:02     ` history-search-backward Zoltan Hidvegi
1997-01-31 19:13 ` history-search-backward Wayne Davison
1996-12-13  2:30 fifo configure check Zoltan Hidvegi
1996-10-31 14:41 Parameter expansion bug? Anthony Heading
1996-10-31 15:13 ` Hrvoje Niksic
1996-10-31 16:12 ` Zoltan Hidvegi
1996-10-31 20:49   ` Anthony Heading
     [not found] <17651.199607222123@stone.dcs.warwick.ac.uk>
1996-07-23 14:08 ` Bug in case stmt with '(' Zoltan Hidvegi
1996-07-23 16:25   ` Bart Schaefer
1996-06-22 20:12 BUG: useheap in doexpandhist() Bart Schaefer
1996-06-02 17:59 Builtin append() and prepend() to PATH, CDPATH, etc Fung-Chai Lim
1996-06-02 21:26 ` Zoltan Hidvegi
     [not found]   ` <1062.199606041027@stone.dcs.warwick.ac.uk>
1996-04-10 10:31 History file locking? Russell Senior
1996-04-10 12:12 ` Zefram
1996-04-10 12:41   ` Zoltan Hidvegi
1996-04-10 12:50     ` Zefram
1996-04-10 21:21       ` Zoltan Hidvegi
     [not found]       ` <A.Main@dcs.warwick.ac.uk>
1996-04-10 16:26         ` Barton E. Schaefer
1996-04-10 17:08           ` Anthony Heading
     [not found]             ` <aheading@jpmorgan.com>
1996-04-10 17:12               ` Barton E. Schaefer
1996-04-10 18:03                 ` Anthony Heading
1996-06-05 21:25         ` Builtin append() and prepend() to PATH, CDPATH, etc Bart Schaefer
     [not found]           ` <schaefer@candle.brasslantern.com>
1996-06-10 19:22             ` Clinton Bunch
1996-06-10 19:54               ` Bart Schaefer
1996-06-10 20:24                 ` Hrvoje Niksic
1996-06-10 20:58             ` Clinton Bunch
1996-06-24 18:26             ` BUG: useheap in doexpandhist() Barton E. Schaefer
1996-06-24 19:11               ` Zoltan Hidvegi
1996-06-24 21:20                 ` Barton E. Schaefer
1996-06-25  0:01                   ` Zoltan Hidvegi
1996-06-25  0:22                     ` Barton E. Schaefer
1996-07-23 20:01             ` Bug in case stmt with '(' Morris M. Siegel
1996-07-23 21:55               ` Bart Schaefer
1996-07-24  8:29                 ` Zefram
1996-07-24  9:52                 ` Peter Stephenson
1996-07-24 11:10         ` Bart Schaefer
1996-07-24 14:16           ` Zoltan Hidvegi
1996-03-12 19:03 Buffered stderr on Linux Zoltan Hidvegi
1996-03-12 19:24 ` Bart Schaefer
1996-03-12 20:26   ` Zoltan Hidvegi
1996-03-12 23:17   ` Zoltan Hidvegi
1996-03-13  0:16     ` Steven L Baur
     [not found]     ` <hzoli@cs.elte.hu>
1996-03-16 18:46       ` Bart Schaefer
1996-04-10 21:41       ` History file locking? Barton E. Schaefer
1996-04-10 22:16         ` Daniel Dignam
1996-06-26 13:51       ` Use of qualifiers without glob pattern? Bart Schaefer
1996-06-26 14:01         ` Regression tests Bas V. de Bakker
1996-06-26 14:52         ` Use of qualifiers without glob pattern? Zoltan Hidvegi
1996-06-26 15:54           ` Bart Schaefer
1996-06-27  1:03             ` Zoltan Hidvegi
1996-10-31 16:55       ` Parameter expansion bug? Bart Schaefer
1996-10-31 16:57         ` Hrvoje Niksic
1996-10-31 17:04         ` Zoltan Hidvegi
1996-10-31 17:47           ` Bart Schaefer
1996-12-13  3:37       ` fifo configure check Bart Schaefer
1996-12-13  8:58         ` fifo configure check (seems to work here: Solaris 2.4) C. v. Stuckrad
1996-12-13 14:44         ` fifo configure check Zefram
1996-12-13 17:33           ` Zoltan Hidvegi
     [not found]       ` <wayne@clari.net>
1997-01-31 22:01         ` history-search-backward Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010430171605.ZM9038@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=peta@cortexmachina.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).