bug-ncurses
[Top][All Lists]
Advanced

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

Unusual content in lib_gen.c and compile failure?


From: Jeffrey Walton
Subject: Unusual content in lib_gen.c and compile failure?
Date: Sat, 21 Oct 2017 08:37:46 -0400

Hi Everyone,

I'm catching a compile failure on Ubuntu 17, x86_64 and GCC 6.2.0.
I've been able to duplicate it under 5.8, 5.9 and 6.0. Its unusual and
I have not seen it before:

gcc -DHAVE_CONFIG_H -I../ncurses -I. -I/usr/local/include -DNDEBUG
-fPIC -D_GNU_SOURCE -DNDEBUG -I. -I../include
-I/usr/local/include/ncurses -m64 -march=native  --param
max-inline-insns-single=1200 -c ../ncurses/./base/lib_hline.c -o
../objects/lib_hline.o
In file included from ../ncurses/curses.priv.h:283:0,
                 from ../ncurses/lib_gen.c:19:
_13515.c:835:15: error: expected ‘)’ before ‘int’
../include/curses.h:1594:56: note: in definition of macro ‘mouse_trafo’
 #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
                                                        ^
Makefile:785: recipe for target '../objects/lib_gen.o' failed
make[1]: *** [../objects/lib_gen.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/jwalton/Build-Scripts/ncurses-5.8/ncurses'
Makefile:109: recipe for target 'all' failed

Now here's the weird thing. Around line 1300 it looks like
preprocessed source is injected into the file:

$ cat ncurses-5.8/ncurses/lib_gen.c
/*
 * DO NOT EDIT THIS FILE BY HAND!
 * It is generated by ./base/MKlib_gen.sh generated.
...

NCURSES_EXPORT(int) (getpary) (const WINDOW * z)
{
        T((T_CALLED("getpary(%p)"), (const void *)z)); returnCode(((z)
? (z)->_pary : (-1)));
}

NCURSES_EXPORT(WINDOW *) (wgetparent) (const WINDOW * z)
{
        T((T_CALLED("wgetparent(%p)"), (const void *)z));
returnWin(((z) ? (z)->_parent : 0));
}

# 757 "_13515.c" 3 4
NCURSES_BOOL
# 757 "_13515.c"
NCURSES_EXPORT() (is_cleared) (const WINDOW * z)
{
        T((T_CALLED("is_cleared(%p)"), (const void *)z));
returnBool(((z) ? (z)->_clear : 0));
}

# 763 "_13515.c" 3 4
NCURSES_BOOL
# 763 "_13515.c"
NCURSES_EXPORT() (is_idcok) (const WINDOW * z)
{
        T((T_CALLED("is_idcok(%p)"), (const void *)z));
returnBool(((z) ? (z)->_idcok : 0));
}

Here is the config.log: https://pastebin.com/jwP9UA0d.

The problem is limited to this machine and this package. Other
machines build ncurses fine (5.8 through 6.0), and this machines build
20 or 30 other packages fine.

Does anyone know what might be going wrong here?

Thanks in advance,

Jeff



reply via email to

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