On Fri, 14 Mar 2014, Martino wrote:
Hello everyone.
I had problems compiling gretl on Arch Linux getting these errors:
> gcc -c -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4
> -I.. -I.. -I../lib/src -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H
> complete.c
> complete.c: In function 'initialize_readline':
> complete.c:129:41: error: 'CPPFunction' undeclared (first use in this
> function)
> rl_attempted_completion_function = (CPPFunction *) gretl_completion;
> ^
> complete.c:129:41: note: each undeclared identifier is reported only once
> for each function it appears in
> complete.c:129:54: error: expected expression before ')' token
> rl_attempted_completion_function = (CPPFunction *) gretl_completion;
> ^
> Makefile:65: set di istruzioni per l'obiettivo "complete.o" non
riuscito
> make[1]: *** [complete.o] Errore 1
> make[1]: uscita dalla directory
> "/tmp/yaourt-tmp-gunther/aur-gretl/src/gretl-1.9.9/cli"
> Makefile:54: set di istruzioni per l'obiettivo "cli" non riuscito
> make: *** [cli] Errore 2
As pointed out here:
http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00003.html (see the
previous message also) the CPPFunction type has been removed as it was
deprecated.
So I just deleted the cast to CPPFunction* in cli/complete.c and now gretl
works fine for me (patch attached). I updated the old package in the AUR
repository for ArchLinux (x86_64 architecture only as of today).
Hope this is someway useful.
Thanks. In fact we've already made a change in gretl CVS to accommodate
building against readline 6.3.
Allin Cottrell