Re: ‘rl_readline_state_t’ undeclared
Sam Steingold <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Ken, > * Ken Brown <[email protected]> [2017-03-06 13:38:58 -0500]: > > You introduced rl_readline_state_t in the following commit: > > changeset: 15750:06790b3788cf > user: Bruno Haible <[email protected]> > date: Sun Feb 26 12:07:24 2017 +0100 > files: modules/readline/config.h.in modules/readline/configure > modules/readline/configure.in modules/readline/readline.lisp src/configure > description: > readline: Update binding to avoid build failure with GNU readline 7.0. > > I'm now getting errors like the following for several of the modules I > build: > > gcc > -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.i686/src/clisp/src > -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.i686/build/gllib > -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.i686/src/clisp/src/gllib > -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.i686/build/gllib > -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.i686/src/clisp/src/gllib > -ggdb -O2 -pipe -Wimplicit-function-declaration -W -Wswitch -Wcomment > -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit > -Wno-sign-compare -Wno-format-nonliteral -O2 -fexpensive-optimizations > -fno-strict-aliasing -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES > -DDLL_EXPORT -DPIC > -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.i686/build/linkkit > -c libsvm.c > libsvm.c:18:6: warning: no previous declaration for ‘svm_destroy_model’ > [-Wmissing-declarations] > void svm_destroy_model (struct svm_model *model){ > svm_free_and_destroy_model(&model); } > ^ > libsvm.c: In function ‘module__libsvm__init_function_1’: > libsvm.c:44:57: error: ‘rl_readline_state_t’ undeclared (first use in > this function) > > register_foreign_inttype("rl_readline_state_t",sizeof(rl_readline_state_t),(rl_readline_state_t)-1<=(rl_readline_state_t)0); Yes, this is an easy to reproduce bug. The reason is that `(def-c-type foo)` (without definition) modifies *c-type-table* and it becomes a part of CLISP base image (because readline is a base module). Now, when writing the C file after compiling FFI forms, CLISP writes register_foreign_inttype for all such types. The solution is probably to write such foreign inttypes into a file-specific table rather than the global one. Thanks for reporting the bug! -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://www.dhimmitude.org http://jij.org http://iris.org.il http://camera.org http://no2bds.org Bug free software merely has random features. ------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel