Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546636 - sys-process/lsof: configure script probing of glibc fails w/gcc-5
Summary: sys-process/lsof: configure script probing of glibc fails w/gcc-5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-04-14 22:38 UTC by SpanKY
Modified: 2015-04-14 22:51 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2015-04-14 22:38:19 UTC
building lsof w/gcc-5 fails:
Testing C library type with x86_64-pc-linux-gnu-gcc ... 
./Configure: 2828: ./Configure: arithmetic expression: expecting primary: "   "
 * ERROR: sys-process/lsof-4.88::gentoo failed (configure phase):
 *   (no error message)

it boils down to this code:
$ cat test.c
#include <features.h>
#undef XXX
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
XXX: __GLIBC__ * 100 + __GLIBC_MINOR__
#elif defined(__GLIBC__)
XXX: __GLIBC__ * 100
#endif

$ gcc-4.9.2 -E test.c
...
# 2 "test.c" 2


XXX: 2 * 100 + 21

$ gcc-5.0.0-alpha20150322 -E bash.c
...
# 2 "test.c" 2


XXX: 
# 4 "test.c" 3 4
    2 
# 4 "test.c"
              * 100 + 
# 4 "test.c" 3 4
                      21

passing in the -P flag makes it work for all versions ...