Bug 163990

Summary: Error building with #include <wchar.h> with -D_FORTIFY_SOURCE
Product: [Fedora] Fedora Reporter: Paul Nasrat <nobody+pnasrat>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.3.90-6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-25 08:32:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Nasrat 2005-07-22 17:14:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b3) Gecko/20050720 Fedora/1.1-0.2.3.deerpark.alpha2 Firefox/1.0+

Description of problem:
When trying to build RPM which has file 4.1.4 internal build fails:

In file included from file.c:62:
/usr/include/wchar.h:95: error: two or more data types in declaration specifiers

configure test failed:

configure:23159: gcc -c -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables  conftest.c >&5
In file included from /usr/include/wchar.h:840,
                 from conftest.c:55:
/usr/include/bits/wchar2.h:233: error: syntax error before '*' token
/usr/include/bits/wchar2.h:237: error: syntax error before '*' token
/usr/include/bits/wchar2.h:241: error: syntax error before '_G_va_list'
/usr/include/bits/wchar2.h:255: error: syntax error before 'FILE'
/usr/include/bits/wchar2.h:256: error: syntax error before 'FILE'
/usr/include/bits/wchar2.h:261: error: syntax error before 'FILE'
/usr/include/bits/wchar2.h: In function 'fgetws':
/usr/include/bits/wchar2.h:262: error: number of arguments doesn't match prototype
/usr/include/wchar.h:729: error: prototype declaration
/usr/include/bits/wchar2.h:263: error: '__s' undeclared (first use in this function)
/usr/include/bits/wchar2.h:263: error: (Each undeclared identifier is reported only once
/usr/include/bits/wchar2.h:263: error: for each function it appears in.)
/usr/include/bits/wchar2.h:264: error: '__n' undeclared (first use in this function)
/usr/include/bits/wchar2.h:265: error: '__stream' undeclared (first use in this function)

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:

#include <stdlib.h>
#include <wchar.h>

int main() {
    mbstate_t x;
    return sizeof x;
}

gcc -O2 -D_FORTIFY_SOURCE=2 test.c

Actual Results:  Errors

Expected Results:  Builds

Additional info:

Comment 1 Paul Nasrat 2005-07-22 17:17:49 UTC
glibc-headers-2.3.90-4.i386
glibc-2.3.90-4.i686
gcc-4.0.1-4.i386


Comment 2 Robert Scheck 2005-07-23 20:40:01 UTC
Same problem here, but for me it looks like the issue occurred the first time 
with glibc-2.3.90-4 (switching to -5 didn't change anything); independent of the 
used gcc version.

Comment 3 Jakub Jelinek 2005-07-25 08:32:19 UTC
Should be fixed in glibc-2.3.90-6.