Bug 163990 - Error building with #include <wchar.h> with -D_FORTIFY_SOURCE
Error building with #include <wchar.h> with -D_FORTIFY_SOURCE
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-22 13:14 EDT by Paul Nasrat
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.3.90-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-25 04:32:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Nasrat 2005-07-22 13:14:04 EDT
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 13:17:49 EDT
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 16:40:01 EDT
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 04:32:19 EDT
Should be fixed in glibc-2.3.90-6.

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