Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928873 - dev-util/cunit-2.1_p3-r1 - Curses.c: error: invalid use of incomplete typedef WINDOW {aka struct _win_st}
Summary: dev-util/cunit-2.1_p3-r1 - Curses.c: error: invalid use of incomplete typedef...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 930805
  Show dependency tree
 
Reported: 2024-04-07 08:43 UTC by Toralf Förster
Modified: 2024-05-02 17:50 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,23.25 KB, text/plain)
2024-04-07 08:43 UTC, Toralf Förster
Details
dev-util:cunit-2.1_p3-r1:20240406-230814.log (dev-util:cunit-2.1_p3-r1:20240406-230814.log,73.67 KB, text/plain)
2024-04-07 08:43 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,140.53 KB, application/x-xz)
2024-04-07 08:43 UTC, Toralf Förster
Details
environment (environment,113.08 KB, text/plain)
2024-04-07 08:43 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.17 KB, application/x-xz)
2024-04-07 08:43 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,65.96 KB, application/x-xz)
2024-04-07 08:43 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,15.12 KB, application/x-xz)
2024-04-07 08:43 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,131.04 KB, application/x-xz)
2024-04-07 08:43 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,33.60 KB, application/x-xz)
2024-04-07 08:43 UTC, Toralf Förster
Details
Curses.i diff (curses.i.diff,7.69 KB, patch)
2024-04-10 00:58 UTC, Eli Schwartz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-04-07 08:43:24 UTC
                 from /usr/include/stdlib.h:26,
                 from Curses.c:49:
/usr/include/features.h:196:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  196 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
Curses.c: In function 'initialize_windows':
Curses.c:259:41: error: invalid use of incomplete typedef 'WINDOW' {aka 'struct _win_st'}
  259 |   f_nLeft = application_windows.pMainWin->_begx;
      |                                         ^~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_mig17to23_spl2mrged-20240323-143215

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 18.1.3
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/18
18.1.3
Python 3.11.9
Available Ruby profiles:
  [1]   ruby31 (with Rubygems)
  [2]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.77.1
  [2]   rust-1.77.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.22_p7 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.10_p7 [openjdk-bin-17]
3)	Eclipse Temurin JDK 21.0.2_p13 [openjdk-bin-21]
*)	Eclipse Temurin JDK 8.402_p06 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17 
  [4]   openjdk-bin-21 

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
go version go1.22.1 linux/amd64

  HEAD of ::gentoo
commit e7e4f5ec24b86b0b47330ec72ca42b2a542bcaab
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Apr 6 21:33:57 2024 +0000

    2024-04-06 21:33:57 UTC

emerge -qpvO dev-util/cunit
[ebuild  N    ] dev-util/cunit-2.1_p3-r1  USE="ncurses -static-libs -test" ABI_X86="(64) -32 (-x32)"
Comment 1 Toralf Förster gentoo-dev 2024-04-07 08:43:25 UTC
Created attachment 889675 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-04-07 08:43:26 UTC
Created attachment 889676 [details]
dev-util:cunit-2.1_p3-r1:20240406-230814.log
Comment 3 Toralf Förster gentoo-dev 2024-04-07 08:43:27 UTC
Created attachment 889677 [details]
emerge-history.txt.xz
Comment 4 Toralf Förster gentoo-dev 2024-04-07 08:43:29 UTC
Created attachment 889678 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-04-07 08:43:29 UTC
Created attachment 889679 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-04-07 08:43:30 UTC
Created attachment 889680 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-04-07 08:43:31 UTC
Created attachment 889681 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2024-04-07 08:43:33 UTC
Created attachment 889682 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2024-04-07 08:43:34 UTC
Created attachment 889683 [details]
temp.tar.xz
Comment 10 jeremy mills 2024-04-09 16:34:51 UTC
Ran into this while setting up a new install. Full ~amd64 keyworded on 23.0 profile. Masking the ~arch keyworded versions of sys-libs/nurses and downgrading to the stable keyworded version of sys-libs/ncurses fixes this (I'm not sure if it will introduce any other problems yet) but it allows cunit to compile successfully
Comment 11 Eli Schwartz gentoo-dev 2024-04-10 00:58:53 UTC
Created attachment 890128 [details, diff]
Curses.i diff

Before and after of Curses.c compiled with save-temps.

This corresponds to /usr/include/curses.h in this section:


#if !NCURSES_OPAQUE
struct ldat;

struct _win_st
{



And diffing the before and after of curses.h installed by each version of ncurses, this jumps out:



 #ifndef NCURSES_INTERNALS
-#define NCURSES_OPAQUE       0
-#define NCURSES_OPAQUE_FORM  0
-#define NCURSES_OPAQUE_MENU  0
-#define NCURSES_OPAQUE_PANEL 0
+#define NCURSES_OPAQUE       1
+#define NCURSES_OPAQUE_FORM  1
+#define NCURSES_OPAQUE_MENU  1
+#define NCURSES_OPAQUE_PANEL 1
 #endif
Comment 12 Eli Schwartz gentoo-dev 2024-04-10 01:04:36 UTC
Hmmm

diff --git a/var/tmp/portage/sys-libs/ncurses-6.4_p20230401/work/ncurses-6.4/configure b/var/tmp/portage/sys-libs/ncurses-6.4_p20240330/work/ncurses-6.4/configure


-  --enable-opaque-curses  make curses WINDOW, etc., "opaque"
-  --enable-opaque-form    make form-library structures "opaque"
-  --enable-opaque-menu    make menu-library structures "opaque"
-  --enable-opaque-panel   make panel-library structures "opaque"
+  --disable-opaque-curses do not make WINDOW, etc., structures opaque
+  --disable-opaque-form   do not make form library structures opaque
+  --disable-opaque-menu   do not make menu library structures opaque
+  --disable-opaque-panel  do not make panel library structures opaque

Changed defaults?
Comment 13 Eli Schwartz gentoo-dev 2024-04-10 01:07:40 UTC
aclocal.m4 differences for cf_dft_opaque_curses



-# ABI 6 defaults:
+# ABI 6 default differences from ABI 5:
 case x$cf_cv_abi_default in
 (x[[6789]])
        cf_dft_chtype=uint32_t
@@ -102,17 +103,18 @@ case x$cf_cv_abi_default in
        cf_dft_filter_syms=yes
        cf_dft_interop=yes
        cf_dft_mmask_t=uint32_t
+       cf_dft_opaque_curses=yes
        cf_dft_tparm_arg=intptr_t
+       cf_dft_widec=yes
        cf_dft_with_lp64=yes
        ;;
 esac
 
-# ABI 7 defaults:
+# ABI 7 default differences from ABI 6:
 case x$cf_cv_abi_default in
 (x[[789]])
        cf_dft_ccharw_max=6
        cf_dft_mmask_t=uint64_t
-       cf_dft_opaque_curses=yes
        cf_dft_ordinate_type=int
        cf_dft_signed_char=yes
        # also: remove the wgetch-events feature in ABI 7
@@ -596,7 +598,7 @@ AC_DEFUN([CF_AWK_BIG_PRINTF],
        esac
 ])dnl
Comment 14 Eli Schwartz gentoo-dev 2024-04-10 02:09:00 UTC
I think that ncurses is broken here.


if test "${enable_opaque_curses+set}" = set; then
  enableval="$enable_opaque_curses"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    enable_opaque_curses=yes
	else

	 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
	 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses

	fi
else
  enableval=no

	 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
	 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses

fi;
+ test set = set
+ enableval=no
+ test no != yes
+ enableval=no
+ test no != no
+ test 1 = 1
+ enable_opaque_curses=yes
+ test 1 = 1


It is simply ignoring any args passed.
Comment 15 Thomas Dickey 2024-04-10 07:43:55 UTC
I overlooked adjusting configure.in in this change:

https://invisible-island.net/ncurses/NEWS.html#index-t20231021

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

The defaults are set in aclocal.m4, but the options have their own defaults as part of the CF_ARG_OPTION macros.

Looks like a small change...
Comment 16 Larry the Git Cow gentoo-dev 2024-04-15 02:03:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7b3889a66553ad455ee778230d11b0d30d8810e

commit d7b3889a66553ad455ee778230d11b0d30d8810e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-15 02:02:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-15 02:03:40 +0000

    sys-libs/ncurses: add 6.4_p20240414
    
    Don't make window and friends opaque for now. Revisit in future with
    a planned migration and tinderboxing.
    
    Closes: https://bugs.gentoo.org/928873
    Closes: https://bugs.gentoo.org/929238
    Closes: https://bugs.gentoo.org/929224
    Closes: https://bugs.gentoo.org/929198
    Closes: https://bugs.gentoo.org/929130
    Closes: https://bugs.gentoo.org/929056
    Closes: https://bugs.gentoo.org/928887
    Closes: https://bugs.gentoo.org/928945
    Closes: https://bugs.gentoo.org/928884
    Closes: https://bugs.gentoo.org/928876
    Closes: https://bugs.gentoo.org/928872
    Closes: https://bugs.gentoo.org/928871
    Closes: https://bugs.gentoo.org/928735
    Closes: https://bugs.gentoo.org/928943
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/ncurses/Manifest                     |   5 +
 sys-libs/ncurses/ncurses-6.4_p20240414.ebuild | 487 ++++++++++++++++++++++++++
 2 files changed, 492 insertions(+)
Comment 17 Larry the Git Cow gentoo-dev 2024-04-15 02:09:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e63eaefbe738901aa916c1a60e8c6b7b0a40d08

commit 7e63eaefbe738901aa916c1a60e8c6b7b0a40d08
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-15 02:04:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-15 02:05:17 +0000

    sys-libs/ncurses: add brief pointer comment wrt opaque
    
    Followup to d7b3889a66553ad455ee778230d11b0d30d8810e.
    
    Bug: https://bugs.gentoo.org/928873
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/ncurses/ncurses-6.4_p20240414.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-15 02:10:50 UTC
Thank you Eli for investigating and thank you Thomas for the fix!