Summary: | sys-libs/ncurses-5.9-r2 mishandles _XOPEN_SOURCE feature test macro | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | William Throwe <wtt6> |
Component: | [OLD] Library | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | arfrever.fta |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://lists.gnu.org/archive/html/bug-ncurses/2011-10/msg00043.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 467786 |
Description
William Throwe
2013-03-17 23:46:17 UTC
that patch is long dead. looking at the latest one and grepping around, i think it boils down to this one change: --- a/include/curses.h.in +++ b/include/curses.h.in @@ -154,7 +154,7 @@ typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t; * conflicting) when _XOPEN_SOURCE is 500 or greater. */ #undef NCURSES_WIDECHAR -#if defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5) +#if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500)) #define NCURSES_WIDECHAR #endif can you confirm this fixes your needs ? Yes, that fixes the problem. should be all set now in the tree; thanks for the report! Commit message: Fix from upstream for handling of the _XOPEN_SOURCE define http://sources.gentoo.org/sys-libs/ncurses/files/ncurses-5.9-xopen-source.patch?rev=1.1 http://sources.gentoo.org/sys-libs/ncurses/ncurses-5.9-r3.ebuild?rev=1.1 sys-libs/ncurses-5.9-r3 fails to build. (sys-libs/ncurses-5.9-r2 still builds correctly.) x86_64-pc-linux-gnu-gcc ../obj_s/tic.o ../obj_s/dump_entry.o ../obj_s/transform.o -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -I../progs -I/var/tmp/portage/sys-libs/ncurses-5.9-r3/work/ncurses-5.9/progs -DHAVE_CONFIG_H -D_GNU_SOURCE -DXTSTRINGDEFINES -DNDEBUG -DTRACE -I. -I../include -I/var/tmp/portage/sys-libs/ncurses-5.9-r3/work/ncurses-5.9/progs/../include -march=native -O2 -pipe --param max-inline-insns-single=1200 -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wwrite-strings -Wdeclaration-after-statement -Wextra -Wno-unknown-pragmas -Wswitch-enum -fPIC -L../lib -lncurses -L../lib -lncurses -o tic ../lib/libncurses.so: undefined reference to `_tracecchar_t2' ../lib/libncurses.so: undefined reference to `_tracecchar_t' collect2: error: ld returned 1 exit status make[1]: *** [tic] Error 1 make[1]: Opuszczenie katalogu `/var/tmp/portage/sys-libs/ncurses-5.9-r3/work/narrowc/progs' make: *** [all] Error 2 emake failed * ERROR: sys-libs/ncurses-5.9-r3 failed (compile phase): * (no error message) (In reply to comment #4) This problem occurs with USE="trace". i've dropped ncurses-5.9-r3 from the tree. the latest upstream code has fundamentally changed how it handles feature defines (it always defines them now and then picks 0 or 1 depending on the enabled status). that minor aspect plays into how this particular code block is written to make sure it does not run at all when ncurses wide is disabled: -#undef NCURSES_WIDECHAR -#if defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5) -#define NCURSES_WIDECHAR +#ifndef NCURSES_WIDECHAR +#if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500)) +#define NCURSES_WIDECHAR 1 +#else +#define NCURSES_WIDECHAR 0 #endif +#endif /* NCURSES_WIDECHAR */ since backporting that fundamental change is not a small patch or straight forward, i'm punting the issue entirely. it'll get fixed in the next upstream release, and you have a pretty easy workaround in the mean time. |