Source: sqlite3 Version: 3.27.2-1 Severity: normal Tags: patch upstream Dear Maintainer,
When cross-building sqlite3, it fails to detect readline: while actual code wants only <readline/readline.h> (see src/shell.c.in), but configure.ac checks for <readline.h>; When not cross-building, this mismatch is hidden by search for readline.h in {various paths}/include/{,readline/}; it always finds it in /usr/include/readline, adds (useless) -I/usr/include/readline to cflags and enables readline support. When cross-building, this search is disabled, thus sqlite3 shell is (silently) built without readline support. (For comparison, autoconf/configure.ac only checks for readline/readline.h, as it should). Trivial patch attached. -- System Information: Debian Release: 9.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'stable') Architecture: i386 (x86_64) Foreign Architectures: amd64 Kernel: Linux 4.9.0-6-amd64 (SMP w/2 CPU cores) Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R), LANGUAGE=ru_RU.KOI8-R (charmap=KOI8-R) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -- no debconf information
Index: sqlite3-3.26.0+fossilbc891ac6b/configure.ac =================================================================== --- sqlite3-3.26.0+fossilbc891ac6b.orig/configure.ac +++ sqlite3-3.26.0+fossilbc891ac6b/configure.ac @@ -62,7 +62,7 @@ # # This variables define the directory that contain header # files for the readline library. If the compiler is able -# to find <readline.h> on its own, then this can be blank. +# to find <readline/readline.h> on its own, then this can be blank. # # TARGET_EXEEXT # @@ -548,12 +548,12 @@ if test x"$with_readline" != xno; then [with_readline_inc=$withval], [with_readline_inc="auto"]) if test "x$with_readline_inc" = xauto; then - AC_CHECK_HEADER(readline.h, [found="yes"], [ + AC_CHECK_HEADER(readline/readline.h, [found="yes"], [ found="no" if test "$cross_compiling" != yes; then for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do - for subdir in include include/readline; do - AC_CHECK_FILE($dir/$subdir/readline.h, found=yes) + for subdir in include; do + AC_CHECK_FILE($dir/$subdir/readline/readline.h, found=yes) if test "$found" = "yes"; then TARGET_READLINE_INC="-I$dir/$subdir" break