Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1057381: FTBFS: error: invalid use of incomplete typedef ‘WINDOW’

36 views
Skip to first unread message

Chris Hofstaedtler

unread,
Dec 4, 2023, 4:50:05 AM12/4/23
to
Source: aalib
Version: 1.4p5-50
Severity: serious
Tags: ftbfs

Rebuilding your package in unstable currently fails:


libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -I/usr/include -I/usr/include/ncurses -c aacurses.c -fPIC -DPIC -o .libs/aacurses.o
aacurses.c: In function ‘curses_getsize’:
aacurses.c:80:20: error: invalid use of incomplete typedef ‘WINDOW’ {aka ‘struct _win_st’}
80 | *width = stdscr->_maxx + 1;
| ^~
aacurses.c:81:21: error: invalid use of incomplete typedef ‘WINDOW’ {aka ‘struct _win_st’}
81 | *height = stdscr->_maxy + 1;
| ^~
make[4]: *** [Makefile:726: aacurses.lo] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[3]: *** [Makefile:483: all] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[2]: *** [Makefile:492: all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules:12: override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:6: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2


Best,
Chris

Sven Joachim

unread,
Dec 4, 2023, 12:10:05 PM12/4/23
to
Control: tags -1 + trixie sid patch

On 2023-12-04 10:38 +0100, Chris Hofstaedtler wrote:

> Source: aalib
> Version: 1.4p5-50
> Severity: serious
> Tags: ftbfs
>
> Rebuilding your package in unstable currently fails:
>
>
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wdate-time
> -D_FORTIFY_SOURCE=2 -g -O2
> -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
> -fstack-clash-protection -Wformat -Werror=format-security
> -fcf-protection -I/usr/include -I/usr/include/ncurses -c aacurses.c
> -fPIC -DPIC -o .libs/aacurses.o
> aacurses.c: In function ‘curses_getsize’:
> aacurses.c:80:20: error: invalid use of incomplete typedef ‘WINDOW’ {aka ‘struct _win_st’}
> 80 | *width = stdscr->_maxx + 1;
> | ^~
> aacurses.c:81:21: error: invalid use of incomplete typedef ‘WINDOW’ {aka ‘struct _win_st’}
> 81 | *height = stdscr->_maxy + 1;
> | ^~
> make[4]: *** [Makefile:726: aacurses.lo] Error 1

This has been caused by a recent change in ncurses which makes the
WINDOW structure opaque. Accessing its members directly is no longer
possible, you need to use library functions to obtain window dimensions
and positions. In the current case, this would be getmaxyx(), see the
attached patch.

See the ncurses INSTALL file:

,----
| --enable-opaque-curses
| --enable-opaque-form
| --enable-opaque-menu
| --enable-opaque-panel
| Define symbol in curses.h controlling whether some library structures
| are opaque, meaning that their members are accessible only via the
| documented API. The --enable-opaque-curses option may be overridden
| by the --enable-reentrant option.
|
| Enabling opaque-curses enables opaque for the form, menu, and panel
| libraries. Use their corresponding options to disable the feature
| individually.
|
| NOTE: beginning with ncurses 6.5 this option is enabled by default;
| older versions disable it by default.
`----

While ncurses 6.5 has not been released yet, the change has already been
made in the patchlevel Debian is shipping. From the NEWS file:

,----
| 20231021
| + change defaults for configure opaque and widec options (prompted by
| discussion with Branden Robinson).
`----

Cheers,
Sven (ncurses maintainer in Debian)

0001-Use-getmaxyx-to-obtain-width-and-height.patch
0 new messages