bug-ncurses
[Top][All Lists]
Advanced

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

Re: test programs build failure


From: Thomas Dickey
Subject: Re: test programs build failure
Date: Sat, 4 Sep 2021 20:12:59 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Sat, Sep 04, 2021 at 02:47:51PM -0400, Thomas Dickey wrote:
> On Sat, Sep 04, 2021 at 07:59:07PM +0200, Sven Joachim wrote:
> > Preparing to update the Debian ncurses packages to the most recent
> > patchlevel, I hit an error when trying to build the test programs, see
> > the log at [1].
> 
> I don't see it in the log, but in last week's update, I made a change
> to filter out repeated -D_XOPEN_SOURCE options (to quiet a redefinition
> warning with NetBSD, which generally needs 500, but for wide-curses needs
> 600 (I'd just make it 600, but NetBSD has other problems...).  That fixed
> the warning, but inspecting the log showed that it wasn't perfect.
> 
> Seeing that -DXPG5 in the log is possibly related.
> 
> (I did see and fix a regression for building ncurses/link_test).
>  
> > The Debian build process is a bit convoluted, but basically we build the
> > libraries with --enable-widec and then configure the test programs
> > separately to link with the just build libraries.  The reason for that
> > is mainly that we need to run "make install" in the test directory.
> > 
> > Up to the 20210821 patchlevel this worked, but it broke in the 20210828
> > patchlevel.  To track down the problem, I compared the corresponding
> > config.log files (not visible at [1], unfortunately) and the culprit
> > seems to be that in the 20210828 patchlevel pkg-config support is
> > disabled, leading to a failure later on because -ltinfo is missing.
> 
> I'll see if I can reproduce this...

I extracted the relevant parts of the log into a script, and ran that from
the ncurses source-directory.  I found that to make it work reliably, I had
to change the assignment to PKG_CONFIG_LIBDIR when building the test programs.

(script is attached)

I think the short answer is that there's a race between the different
builds, and that the build had been working because the files happened
to be present with different timing.
 
> > In the successful 20210821 build I get:
> > 
> > ,----
> > | configure:7997: checking pkg-config for ncursesw
> > | configure:8000: result: yes
> > | configure:8003: checking if the ncursesw package files work
> > | configure:8336: gcc -o conftest -g -O2 
> > -ffile-prefix-map=/tmp/ncurses-6.2+20210821=. -fstack-protector-strong 
> > -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   
> > -I/tmp/ncurses-6.2+20210821/obj-wide/include -D_DEFAULT_SOURCE 
> > -D_XOPEN_SOURCE=600 -L/tmp/ncurses-6.2+20210821/obj-wide/lib -Wl,-z,relro 
> > -Wl,-z,now conftest.c -lncursesw -ltinfo  >&5
> > | configure:8339: $? = 0
> > `----
> > 
> > In the failed 20210828 there is a difference:
> > 
> > ,----
> > | configure:8144: checking pkg-config for ncursesw
> > | configure:8147: result: yes
> > | configure:8150: checking if the ncursesw package files work
> > | configure:8530: gcc -o conftest -g -O2 
> > -ffile-prefix-map=/tmp/ncurses-6.2+20210828=. -fstack-protector-strong 
> > -Wformat -Werror=format-security -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 
> > -L/tmp/ncurses-6.2+20210828/obj-wide/lib -Wl,-z,relro -Wl,-z,now conftest.c 
> > -lncursesw -ltinfo  >&5
> > | configure:8519:10: fatal error: curses.h: No such file or directory

however, I've not been able to reproduce _this_ error
(with the case I found, pkg-config simply doesn't find the package)

> > | compilation terminated.
> 
> yes... that change which I made for _XOPEN_SOURCE would be exercised in this
> part of the configure script.
> 
> > | configure:8533: $? = 1
> > `----
> > 
> > The problem is that -I/tmp/ncurses-6.2+20210828/obj-wide/include is
> > missing from the gcc commandline, along with a few other options.
> > Reverting test/aclocal.m4 to version 1.197 (and autoreconfing) fixes
> > that.
> > 
> > Any ideas?
> > 
> > Cheers,
> >        Sven
> > 
> > 
> > 1. https://salsa.debian.org/joachim-guest/ncurses/-/jobs/1885640
> > 

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: doit
Description: Text document

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]