I downloaded ganc-0.6 and tried to compile it. The configure script went through without a hitch, but when I tried to run make, it exited with an error code. Here is what it gave me:
That means you don't have the GNU readline libraries.
I think you found a bug in the autoconf configuration for ganc because the configure script should realize readline is not present and complain about it.
If you want to run ganc you need to download and install GNU readline. It is a pretty standard library, it's used by many common programs such as 'bash'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems you found a bug in the autoconf scripts for ganc.
I looked into it and I actually tried ganc in a computer that reproduces the error you're having.
When you run './configure' you probably get a line like this:
checking for readline in -lreadline... no
And it continues running happily (in the CVS version it stops complaining).
That means the autoconf test for readline fails.
I looked into 'config.log' and found the line about the readline test and I found the following errors:
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libreadline.so: undefined reference to `tgetnum'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libreadline.so: undefined reference to `tgoto'
.........
That means readline in your machine depends on some other library. These functions that readline seems to need in the example above are part of 'termcap'.
So we have to add 'termcap' to the bunch of libraries that we need to include.
I recomend you take a look at your 'config.log' and try to find out what libraries readline depends on on your machine, because it may not be termcap.
We'll fix this in CVS but it may take some time. If you want to do a quick fix to the copy in your machine you just have to edit 'configure.in' and add this:
Forget my last post. That wasn't the problem. The problem is that there are two identical calls to AC_CHECK_LIB
The quick solution by now is to make the second call a little bit different, i.e. ask for another function inside readline. For example, change the second call to:
I downloaded ganc-0.6 and tried to compile it. The configure script went through without a hitch, but when I tried to run make, it exited with an error code. Here is what it gave me:
collect2: ld returned 1 exit status
make[2]: *** [ganc] Error 1
make[2]: Leaving directory `~/ganc-0.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `~/ganc-0.6'
make: *** [all] Error 2
--------
I also tried the CVS version, but the configure script complained that I don't have the readline libraries installed (I do).
That means you don't have the GNU readline libraries.
I think you found a bug in the autoconf configuration for ganc because the configure script should realize readline is not present and complain about it.
If you want to run ganc you need to download and install GNU readline. It is a pretty standard library, it's used by many common programs such as 'bash'
Actually, I do have readline installed. Here is the output of "rpm -qa | grep readline":
readline2.2.1-2.2.1-4
readline-debuginfo-4.3-5
readline-devel-4.3-5
readline41-4.1-16
readline-4.3-5
It seems you found a bug in the autoconf scripts for ganc.
I looked into it and I actually tried ganc in a computer that reproduces the error you're having.
When you run './configure' you probably get a line like this:
checking for readline in -lreadline... no
And it continues running happily (in the CVS version it stops complaining).
That means the autoconf test for readline fails.
I looked into 'config.log' and found the line about the readline test and I found the following errors:
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libreadline.so: undefined reference to `tgetnum'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libreadline.so: undefined reference to `tgoto'
.........
That means readline in your machine depends on some other library. These functions that readline seems to need in the example above are part of 'termcap'.
So we have to add 'termcap' to the bunch of libraries that we need to include.
I recomend you take a look at your 'config.log' and try to find out what libraries readline depends on on your machine, because it may not be termcap.
We'll fix this in CVS but it may take some time. If you want to do a quick fix to the copy in your machine you just have to edit 'configure.in' and add this:
AC_CHECK_LIB(termcap, tgetnum, [], [
echo "termcap couldn't be found"
exit -1
])
AC_CHECK_LIB(readline, readline, [], [
echo "GNU readline couldn't be found"
exit -1
], -ltermcap)
Then run:
aclocal
autoconf
automake -a
and everything should work fine. I assumed you need termcap as in this computer I'm playing with now. If not change the code to what you need.
I added those lines to the end of configure.in and ran the three commands. When I ran ./configure, the last three lines read:
checking for tgetnum in -ltermcap... yes
checking for readline in -lreadline... (cached) no
GNU readline couldn't be found
Then after running make, the last few lines read:
gcc -g -O2 -o ganc main.o support.o interface.o callbacks.o reader_stuff.o evaluate.o myterminal_stuff.o syntax.o parser_stuff.o -pthread -Wl,--export-dynamic -L/usr/X11R6/lib -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lxml2 -lz -lgnomecanvas-2 -lgnome-2 -lpangoft2-1.0 -lbonobo-2 -lgconf-2 -lgnomevfs-2 -lbonobo-activation -lORBit-2 -llinc -lgthread-2.0 -lzvt-2.0 -lutil -lgtk-x11-2.0 -lart_lgpl_2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
reader_stuff.o(.text+0xa): In function `run_reader_process':
~/ganc-0.6/src/reader_stuff.c:59: undefined reference to `using_history'
reader_stuff.o(.text+0x18):~/ganc-0.6/src/reader_stuff.c:62: undefined reference to `readline'
reader_stuff.o(.text+0x5a):~/ganc-0.6/src/reader_stuff.c:72: undefined reference to `add_history'
collect2: ld returned 1 exit status
make[2]: *** [ganc] Error 1
make[2]: Leaving directory `~/ganc-0.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `~/ganc-0.6'
make: *** [all] Error 2
Did you mean for me to use this in the CVS version?
It seems like autoconf is using some cached information instead or running the actual test. Try and delete the cache file and run again.
The cache file should be 'config.cache'. If you can't find it, just delete everything and start from scratch.
By the way, I corrected 'configure.in' in CVS so it should run fine for you now, without addind any stuff.
Forget my last post. That wasn't the problem. The problem is that there are two identical calls to AC_CHECK_LIB
The quick solution by now is to make the second call a little bit different, i.e. ask for another function inside readline. For example, change the second call to:
AC_CHECK_LIB([readline], [rl_getc], [], readline_found=no, $readline_lib)
This should be already fixed in CVS. However, commit changes to CVS take a little while to update (don't ask me why)
The CVS version compiles just fine now. Thanks.