[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#925906: sqlite3: FTCBFS: configure fails to find readline.h



Control: tag -1 - moreinfo

On 25.06.2019 07:03, Helmut Grohne wrote:

> On Thu, Mar 28, 2019 at 01:14:13PM +0300, Yuriy M. Kaminskiy wrote:
>> 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>;
> 
> I am unable to reproduce this issue. The public autobuilder cannot
> reproduce it either: http://crossqa.debian.net/src/sqlite3 This is using
> sbuild for performing the build. How does your build environment differ
> to make sqlite3 fail? Please remove the moreinfo tag when providing an
> answer.

I built for armhf on i386/stretch host with pbuilder.

Relevant lines from
http://crossqa.debian.net/build/sqlite3_3.27.2-3_armhf_20190622023957.log
(with mysteriously successful readline.h detection)

checking for library containing readline... no
checking for library containing tgetent... -lncurses
checking for readline in -lreadline... yes
checking for readline.h... (cached) yes

Relevant lines from my (with failing readline.h detection):

checking for library containing readline... no
checking for library containing tgetent... -ltermcap
checking for readline in -lreadline... yes
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no

I have no idea what triggers difference (why there are no "checking
readline.h (usability|presence)... " [that is expected to be emitted by AC_CHECK_HEADER] in autobuilder log? where that "(cached) yes" comes from?)

FWIW, here are relevant lines from stretch-backports buildd
https://buildd.debian.org/status/fetch.php?pkg=sqlite3&arch=armhf&ver=3.27.2-3%7Ebpo9%2B1&stamp=1560524760&raw=0

(native build, *NOT* cross-compiled)

checking for library containing readline... no
checking for library containing tgetent... -ltermcap
checking for readline in -lreadline... yes
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... yes

(Note: there are /(usability|presence)/ lines here; also note that it also fails to find readline.h, and fallbacks to below code [which is disabled for cross-builds])

>> @@ -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
> 
> From here it becomes irrelevant to cross building. The changed lines
> are not executed during a cross build.

They are still wrong/inconsistent: shell.c wants readline/readline.h,
while they looks for readline.h

>>  				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
>>
> 
> Helmut
> 


Reply to: