gnupic: compilation prob.


Previous by date: 29 Aug 2000 16:47:10 -0000 0.20.2 debs and lcd module, Joop Stakenborg
Next by date: 29 Aug 2000 16:47:10 -0000 Re: compilation prob., Garst R. Reese
Previous in thread: 29 Aug 2000 16:47:10 -0000 Re: compilation prob., Garst R. Reese
Next in thread: 29 Aug 2000 16:47:10 -0000 Re: compilation prob., Garst R. Reese

Subject: Re: compilation prob.
From: Scott Dattalo ####@####.####
Date: 29 Aug 2000 16:47:10 -0000
Message-Id: <Pine.LNX.4.21.0008290539380.5210-100000@tempest2.blackhat.net>

Short Story:

I think/hope/believe that I've fixed the readline fiasco. Of course, I'll need
some help from some of you to see if this really is the case. 

http://www.dattalo.com/gnupic/gpsim-0.20.4.tar.gz

contains the alleged fix. 

(I don't have time to do the diffs for patches...)

On Tue, 29 Aug 2000, Garst R. Reese wrote:

> Scott Dattalo wrote:
> 
> > This was the first `4.1' readline library I found. Anyone have suggestions of
> > where I may find a good/bad 4.1?
> > 
> ftp://ftp.gnu.ai.mit.edu/pub/gnu/readline/
> Garst

It turns out that I had down loaded this a while back - but never installed
it. When I did install it, I got the same errors I reported earlier. However,
these errors were due to the fact that the ncurses library is needed by readline
but not specified by gpsim. Apparently, version 3 of the readline library
doesn't have this dependency.

But it was surprisingly easy to get the latest readline library to link in with
gpsim. So something else must be happening. Upon closer inspection of Matt's
attachment, I noticed that the readline library is not specified during
linking. In other words, there should be a ` -lreadline ' along with all those
other -lxxx 's. This means that ./configure is unable to find the readline
library for some reason.

Looking at configure.in, you'll see this check for the readline library:

dnl Replace `main' with a function in -lreadline:
AC_CHECK_LIB(readline, main)

This is a cut-n-paste that I got from somewhere (a long time ago). What it does,
is check for the presence of the function `main' in the readline library. If it
is found, then I presume the -lreadline option is added to one of the
compilation flags.

To test this theory out, I changed the check to:

dnl Replace `main' with a function in -lreadline:
AC_CHECK_LIB(readline, completion_matches)

I know that `completion_matches' is a pointer to a function. Sure enough, the
./configure check fails and I get the EXACT error reported by Matt (and a
thousand other disappointed gpsim users :).

For some reason, the check for `main' is failing on some machines. I don't have
a clue why, perhaps there's a bug in automake somewhere.

----

So I dug deeper and found a more robust way to search for the presence of
readline. Basically, I copied the way NcFTP does it. They create an m4 macro
that can be included into aclocal.m4 . So I've added a new file to gpsim called
gpsim.m4 and placed the macro there. A new configure script for gpsim can then
be built by:

aclocal -I . --verbose
autoconf
automake
./configure

The --verbose will display all of the files that are searched for .m4 macros.

This does the trick for me... but the real test is if it works for everyone
else.

Scott



Previous by date: 29 Aug 2000 16:47:10 -0000 0.20.2 debs and lcd module, Joop Stakenborg
Next by date: 29 Aug 2000 16:47:10 -0000 Re: compilation prob., Garst R. Reese
Previous in thread: 29 Aug 2000 16:47:10 -0000 Re: compilation prob., Garst R. Reese
Next in thread: 29 Aug 2000 16:47:10 -0000 Re: compilation prob., Garst R. Reese


Powered by ezmlm-browse 0.20.