Created attachment 1033726 [details] automatically generated lib_gen.c with syntax error Description of problem: I used buildroot to do cross compiling, one package is to compile the ncurses 5.9 for host PC, the compiling ran well on Fedora 21, but after I just upgraded to Fedora 22, the compiling will fail, and I got the following error: >>> host-ncurses 5.9 Building _19107.c:835:22: error: expected ‘)’ before ‘int’ Makefile:795: recipe for target '../obj_s/lib_gen.o' failed make[3]: *** [../obj_s/lib_gen.o] Error 1 make[3]: *** Waiting for unfinished jobs.... _19107.c:835:22: error: expected ‘)’ before ‘int’ Makefile:1653: recipe for target '../objects/lib_gen.o' failed make[3]: *** [../objects/lib_gen.o] Error 1 Makefile:307: recipe for target '../lib/libncurses.so' failed make[2]: *** [../lib/libncurses.so] Error 2 package/pkg-generic.mk:164: recipe for target '/home/haibo/dev/perforce/lnx_wks/OTV_OS/Opentv5/DEVELOP/tbc_phase1/otvtarg/hc7583_uclibc_bc/sdk_tbc_dta_phase1/build/host-ncurses-5.9/.stamp_built' failed make[1]: *** [/home/haibo/dev/perforce/lnx_wks/OTV_OS/Opentv5/DEVELOP/tbc_phase1/otvtarg/hc7583_uclibc_bc/sdk_tbc_dta_phase1/build/host-ncurses-5.9/.stamp_built] Error 2 Makefile:19: recipe for target 'all' failed make: *** [all] Error 2 As I checked, the error seems to be because automatically generated lib_gen.c has some syntax error like: NCURSES_EXPORT(int) (attroff) (int z) { T((T_CALLED("attroff(%s)"), _traceattr2(0,(chtype)z))); returnCode(wattr_off(stdscr, (attr_t)(z), # 39 "_19107.c" 3 4 ((void *)0) # 39 "_19107.c" )); } But in an old fedora version compiling, the line "# 39 "_19107.c"" doesn't exist. This file is generated by a shell in ncurses, named MKlib_gen.sh Please kindly help to check this issue as it breaks my daily coding Version-Release number of selected component (if applicable): How reproducible: On fedora 22 host, tried to compile host-ncurses from buildroot
Created attachment 1033728 [details] the TEMP file when MKlib_gen.sh executing
Any progress? Any help or further information I can provide? Thanks
What is host-ncurses and how is it related to the Fedora ncurses package?
Hi Miroslav: Thanks a lot for looking this issue. There is no relationship between host-ncurses and the Fedora ncurses package. I downloaded ncurses official release 5.9 and compiled on Fedora 22. The problem happens when MKlib_gen.sh in ncurses official release 5.9 trying to create lib_gen.c file. lib_gen.sh calls Fedora 22's awk and sed, I think the problem happens in Fedora 22's awk and sed packages - incompatibility or bug. Unfortunately awk and sed are not my area, so I didn't look into it further. Regards
You may want to ask on the ncurses mailing list. https://lists.gnu.org/mailman/listinfo/bug-ncurses
While my previous fedora 21 works well, and my code tree never change. The only thing I did is to use fedup to upgrade to Fedora 22 final release version. It didn't work even I clean all and recompile, I got the same error. I just checked the awk and sed versions are the same on fedora 21 and 22 - all updated to the latest. Just have no idea.
The issue is resolved by apply patch from: http://invisible-island.net/ncurses/NEWS.html#t20141206 We can resolve this ticket now. While I am just wondering why this issue didn't observed in Fedora 22 release package compilation?
(In reply to FENG Haibo from comment #7) > While I am just wondering why this issue didn't observed in Fedora 22 > release package compilation? The Fedora 22 ncurses package is based on 5.9-20150214 and includes the change from 20141206.
Thank you