SQLite User Forum

Build broken for readline "rl_completion_matches"
Login

Build broken for readline "rl_completion_matches"

(1) By userABCD on 2024-10-29 22:48:05 [source]

I get the message: WARNING: readline-style completion disabled due to rl_completion_matches() signature mismatch

The rl_completion_matches test fails due to conflicting options for gcc asking for both for no output and specifying an output file at the same time.

(config.log)
============
Failed: cc -c readline/readline.h -DHAVE_READLINE conftest__.c -o conftest__.o
cc: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated.
child process exited abnormally
============
The failed code was:

             #include <stdio.h>
             #ifdef HAVE_EDITLINE
             #include <editline/readline.h>
             #else
             #include <readline/readline.h>
             #endif
             static char * rcg(const char *z, int i){(void)z; (void)i; return 0;}
             int main(void) {
               char ** x = rl_completion_matches("one", rcg);
               (void)x;
               return 0;
             }
           
============

If I edit auto.def to remove the test for "rl_completion_matches" the build succeeds and rl_completion_matches works fine in the final executable.

(2.1) By Stephan Beal (stephan) on 2024-10-29 23:06:44 edited from 2.0 in reply to 1 [link] [source]

The rl_completion_matches test fails due to conflicting options for gcc asking for both for no output and specifying an output file at the same time.

Thank you for the report. That's an apparent bug in the underlying upstream tool which we'll get reported and fixed ASAP.

Edit: incorrect - it's a misuse of a configure flag causing an extraneous file name to be added to the test's invocation.

(3) By Stephan Beal (stephan) on 2024-10-29 23:06:12 in reply to 1 [link] [source]

I get the message: WARNING: readline-style completion disabled due to rl_completion_matches() signature mismatch

You're apparently using --with-readline-inc=readline/readline.h, which is not the intended semantics for that flag. The previous configure script accepted that formulation but did not really do anything useful with it.

Either leave off --with-readline-inc or pass it a CFLAGS-style argument, not the header file name: --with-readline-inc=-I/usr/local/include. It needs to point to one dir up from readline/readline.h. If your readline is installed in some standard location, you don't need that flag at all.

i will update the configure script to complain loudly if it's passed what appears to be a file name.

(4) By userABCD on 2024-10-29 23:31:40 in reply to 3 [link] [source]

Thank you, your suggestion works well.

Using "--with-readline-inc=-I." instead of "--with-readline-inc=readline/readline.h" fixes the problem.