I am getting the following error when I try to build gretl

 

This is my build script:

---------------------------

prefix=$HOME

if [[ ! -d $prefix/gretl ]]

then

    mkdir -p $prefix/gretl || exit 1

fi

 

make distclean

./configure --prefix=$prefix/gretl \

--with-gtk+3-prefix=/usr/local/Cellar/gtk+3/3.24.30_1

--with-gmp-prefix=/usr/local/Cellar/gmp/6.2.1_1

--with-mpfr-prefix=/usr/local/Cellar/mpfr/4.1.0

make

#make check

#make install

-----------------------------------

 

 

This is the error  in make:

-----------------------------------

libtool: link: gcc -dynamiclib -Wl,-flat_namespace -Wl,-undefined -Wl,suppress -o .libs/libgretl-1.0.40.dylib  .libs/adf_kpss.o .libs/addons_utils.o .libs/bhhh_max.o .libs/bootstrap.o .libs/boxplots.o .libs/calendar.o .libs/compare.o .libs/compat.o .libs/csvdata.o .libs/dataio.o .libs/dataset.o .libs/dbread.o .libs/dbwrite.o .libs/describe.o .libs/discrete.o .libs/estimate.o .libs/flow_control.o .libs/forecast.o .libs/geneval.o .libs/genfuncs.o .libs/genlex.o .libs/genmain.o .libs/gensyntax.o .libs/gmm.o .libs/graphing.o .libs/gretl_array.o .libs/gretl_bfgs.o .libs/gretl_btree.o .libs/gretl_bundle.o .libs/gretl_commands.o .libs/gretl_data_io.o .libs/gretl_errors.o .libs/gretl_foreign.o .libs/gretl_func.o .libs/gretl_help.o .libs/gretl_intl.o .libs/gretl_join.o .libs/gretl_list.o .libs/gretl_matrix.o .libs/gretl_cmatrix.o .libs/gretl_midas.o .libs/gretl_model.o .libs/gretl_mt.o .libs/gretl_normal.o .libs/gretl_panel.o .libs/gretl_paths.o .libs/gretl_plot.o .libs/gretl_prn.o .libs/gretl_restrict.o .libs/gretl_string_table.o .libs/gretl_typemap.o .libs/gretl_untar.o .libs/gretl_utils.o .libs/gretl_xml.o .libs/gretl_zip.o .libs/interact.o .libs/kalman.o .libs/libglue.o .libs/libset.o .libs/matrix_extra.o .libs/missing.o .libs/modelprint.o .libs/monte_carlo.o .libs/nls.o .libs/nonparam.o .libs/objstack.o .libs/options.o .libs/plotspec.o .libs/plugins.o .libs/printout.o .libs/printscan.o .libs/pvalues.o .libs/qr_estimate.o .libs/random.o .libs/strutils.o .libs/subsample.o .libs/system.o .libs/texprint.o .libs/transforms.o .libs/tsls.o .libs/usermat.o .libs/uservar.o .libs/var.o .libs/varprint.o .libs/vartest.o .libs/irfboot.o .libs/gretl_www.o .libs/gretl_mpi.o .libs/bdtr.o .libs/btdtr.o .libs/chbevl.o .libs/chdtr.o .libs/const.o .libs/expx2.o .libs/fdtr.o .libs/gamma.o .libs/gdtr.o .libs/igam.o .libs/igami.o .libs/incbet.o .libs/incbi.o .libs/mtherr.o .libs/nbdtr.o .libs/ndtr.o .libs/ndtri.o .libs/pdtr.o .libs/polevl.o .libs/polrt.o .libs/stdtr.o .libs/unity.o .libs/airy.o .libs/hyp2f1.o .libs/hyperg.o .libs/i0.o .libs/i1.o .libs/iv.o .libs/j0.o .libs/j1.o .libs/jn.o .libs/jv.o .libs/k0.o .libs/k1.o .libs/kn.o .libs/psi.o .libs/struve.o .libs/yn.o .libs/kv.o .libs/enorm.o .libs/fdjac2.o .libs/lmder.o .libs/lmdif.o .libs/lmpar.o .libs/qrfac.o .libs/qrsolv.o .libs/lbfgsb.o .libs/check32.o .libs/eqdeg.o .libs/genmtrand.o .libs/mt19937.o .libs/prescr.o .libs/seive.o   -lm -ldl -lz -lxml2 -L/usr/local/Cellar/glib/2.70.2/lib -L/usr/local/opt/gettext/lib -lglib-2.0 -lintl -lgmp -L/usr/local/Cellar/fftw/3.3.10/lib -lfftw3 -lcurl  -msse2 -Wl,-framework -Wl,Accelerate   -install_name  /Users/isaac/gretl/lib/libgretl-1.0.40.dylib -compatibility_version 41 -current_version 41.0 -Wl,-single_module

libtool: link: (cd ".libs" && rm -f "libgretl-1.0.dylib" && ln -s "libgretl-1.0.40.dylib" "libgretl-1.0.dylib")

libtool: link: ( cd ".libs" && rm -f "libgretl-1.0.la" && ln -s "../libgretl-1.0.la" "libgretl-1.0.la" )

make -C cli

mkdir .deps

gcc -c -g -O2 -I.. -I.. -I../lib/src  -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -DLOCALEDIR=\"/Users/isaac/gretl/share/locale\" -DHAVE_CONFIG_H gretlcli.c

gcc -g -O2 -I.. -I.. -I../lib/src  -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -DLOCALEDIR=\"/Users/isaac/gretl/share/locale\" -DHAVE_CONFIG_H -MM gretlcli.c > .deps/gretlcli.d

gcc -c -g -O2 -I.. -I.. -I../lib/src  -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -DLOCALEDIR=\"/Users/isaac/gretl/share/locale\" -DHAVE_CONFIG_H complete.c

complete.c:125:63: error: expected expression

    rl_attempted_completion_function = (rl_completion_func_t *) gretl_completion;

                                                              ^

complete.c:125:41: error: use of undeclared identifier 'rl_completion_func_t'; did you mean 'rl_completion_matches'?

    rl_attempted_completion_function = (rl_completion_func_t *) gretl_completion;

                                        ^~~~~~~~~~~~~~~~~~~~

                                        rl_completion_matches

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/readline/history.h:202:16: note: 'rl_completion_matches' declared here

char           **rl_completion_matches(const char *, rl_compentry_func_t *);

                 ^

2 errors generated.

make[1]: *** [complete.o] Error 1

make: *** [cli] Error 2

--------------------------------------

 

 

If I comment out line 125 in the directory cli/complete.c the make, make test and make install goes through

--------------------------------------

void initialize_readline (void)

{

    /* Allow conditional parsing of the ~/.inputrc file. */

    rl_readline_name = "gretl";

 

    /* Tell the completer that we want a crack first. */

    //rl_attempted_completion_function = (rl_completion_func_t *) gretl_completion;

}

--------------------------------------

 

 

 


This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.