Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 545114 - sys-libs/ncurses-5.9 fails to build w/gcc-5: _25540.c:835:22: error: expected ')' before 'int'
Summary: sys-libs/ncurses-5.9 fails to build w/gcc-5: _25540.c:835:22: error: expected...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://lists.gnu.org/archive/html/bu...
Whiteboard:
Keywords:
: 555818 (view as bug list)
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-03-31 04:51 UTC by SpanKY
Modified: 2015-07-24 19:34 UTC (History)
3 users (show)

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


Attachments
build.log (sys-libs:ncurses-5.9-r4:20150331-043030.log,75.95 KB, text/x-log)
2015-03-31 04:51 UTC, SpanKY
Details
emerge --info (emerge-info.log,29.22 KB, text/x-log)
2015-03-31 04:51 UTC, SpanKY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2015-03-31 04:51:26 UTC
Created attachment 400248 [details]
build.log

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../ncurses -I/var/tmp/portage/sys-libs/ncurses-5.9-r4/work/ncurses-5.9/ncurses -DCPPFLAGS_TEST -D_GNU_SOURCE -DXTSTRINGDEFINES -DNDEBUG -I. -I../include -I/var/tmp/portage/sys-libs/nc
urses-5.9-r4/work/ncurses-5.9/ncurses/../include -O2 -march=amdfam10 -pipe -g -frecord-gcc-switches -Wimplicit-function-declaration  --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 -c ../n
curses/lib_gen.c -o ../obj_s/lib_gen.o
_25540.c: In function ‘attr_get’:
_25540.c:55:50: warning: unused parameter ‘z’ [-Wunused-parameter]
_25540.c: In function ‘attr_set’:
_25540.c:73:46: warning: unused parameter ‘z’ [-Wunused-parameter]
_25540.c: In function ‘wattr_get’:
_25540.c:637:64: warning: unused parameter ‘z’ [-Wunused-parameter]
_25540.c: In function ‘wattr_set’:
_25540.c:643:60: warning: unused parameter ‘z’ [-Wunused-parameter]
_25540.c: At top level:
_25540.c:835:22: error: expected ‘)’ before ‘int’
Makefile:798: recipe for target '../obj_s/lib_gen.o' failed
make[1]: *** [../obj_s/lib_gen.o] Error 1
Comment 1 SpanKY gentoo-dev 2015-03-31 04:51:38 UTC
Created attachment 400250 [details]
emerge --info
Comment 2 David Kredba 2015-03-31 18:49:02 UTC
Patch from http://lists.gnu.org/archive/html/bug-ncurses/2015-01/msg00016.html works for me ( -P added to preprocessor):

--- ncurses/Makefile.in.orig    2015-01-21 13:27:02.427199242 +0100
+++ ncurses/Makefile.in 2015-01-21 13:27:11.946311063 +0100
@@ -219,7 +219,7 @@
        sh -e $(srcdir)/run_cmd.sh $(tinfo)/MKfallback.sh $(TERMINFO) 
$(TERMINFO_SRC) $(TIC_PATH) $(FALLBACK_LIST) >$@
 
 ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
-       sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated 
<../include/curses.h >$@
+       sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS) -P" "$(AWK)" generated 
<../include/curses.h >$@
 
 init_keytry.h: make_keys$(BUILD_EXEEXT) keys.list
        ./make_keys$(BUILD_EXEEXT) keys.list > $@
Comment 3 SpanKY gentoo-dev 2015-03-31 21:15:46 UTC
(In reply to David Kredba from comment #2)

upstream merged a different fix, but was referenced from that thread:
http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff;f=ncurses/base/MKlib_gen.sh;h=b91398c740a266f10edbbce19f19c52b9709556f;hp=d8cc3c9751faa157d0c8cb8e16fbe4217703966b;hb=97bb4678dc03e753290b39bbff30ba2825df9517;hpb=762520a7930d7f698d542628d3c04bc201f7dac2

i've added that to the tree now.  thanks for the tip!
Comment 4 SpanKY gentoo-dev 2015-03-31 21:18:06 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add fix from upstream for building w/gcc-5
http://sources.gentoo.org/sys-libs/ncurses/files/ncurses-5.9-gcc-5.patch?rev=1.1
http://sources.gentoo.org/sys-libs/ncurses/ncurses-5.9-r4.ebuild?r1=1.1&r2=1.2
Comment 5 Marek Bartosiewicz 2015-04-17 06:17:53 UTC
Please update also 5.9-r3 (stable) ebuild.
Comment 6 SpanKY gentoo-dev 2015-04-17 17:19:25 UTC
(In reply to Marek Bartosiewicz from comment #5)

that's not how we do things.  if you're trying to use gcc-5, then you better be using ~arch so fixes get pulled in.  trying to use a pre-release compiler w/stable is never supported.
Comment 7 Mike Gilbert gentoo-dev 2015-07-24 19:34:45 UTC
*** Bug 555818 has been marked as a duplicate of this bug. ***