Bug 1227314 - host-ncurses 5.9 compiling fails on fedora 22 x86_64 distribution
Summary: host-ncurses 5.9 compiling fails on fedora 22 x86_64 distribution
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ncurses
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-02 12:05 UTC by FENG Haibo
Modified: 2015-06-09 06:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-09 06:21:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
automatically generated lib_gen.c with syntax error (25.19 KB, text/x-csrc)
2015-06-02 12:05 UTC, FENG Haibo
no flags Details
the TEMP file when MKlib_gen.sh executing (19.84 KB, text/x-csrc)
2015-06-02 12:07 UTC, FENG Haibo
no flags Details

Description FENG Haibo 2015-06-02 12:05:00 UTC
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

Comment 1 FENG Haibo 2015-06-02 12:07:13 UTC
Created attachment 1033728 [details]
the TEMP file when MKlib_gen.sh executing

Comment 2 FENG Haibo 2015-06-04 11:40:42 UTC
Any progress? Any help or further information I can provide?

Thanks

Comment 3 Miroslav Lichvar 2015-06-04 11:52:07 UTC
What is host-ncurses and how is it related to the Fedora ncurses package?

Comment 4 FENG Haibo 2015-06-05 04:36:35 UTC
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

Comment 5 Miroslav Lichvar 2015-06-05 05:57:36 UTC
You may want to ask on the ncurses mailing list.

https://lists.gnu.org/mailman/listinfo/bug-ncurses

Comment 6 FENG Haibo 2015-06-05 06:03:47 UTC
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.

Comment 7 FENG Haibo 2015-06-09 03:00:57 UTC
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?

Comment 8 Miroslav Lichvar 2015-06-09 06:21:26 UTC
(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.

Comment 9 FENG Haibo 2015-06-09 06:31:22 UTC
Thank you


Note You need to log in before you can comment on or make changes to this bug.