compilation error /usr/include/_G_config.h:29: parse error before "__mbstate_t"

V

Vittal

Hello All,

I am trying to compile my application on Red Hat Linux 8 against gcc
3.2.2.

Very first file in application is failing to compile. I tried
compiling my application on Linux 7.2 against gcc 3.1 and it got build
without any problems.
However on against gcc 3.2.2 I hitting this error:

gcc -DNULL="((void *)0)" -O2 -c -fPIC -D_UNIX_ -Dlinux_i32
-Dlinux_ia64 -DNEED_XMU -DX_USEBFUNCS -Dindex=strchr -DULONGDEFINED
-DUNCHARDEFINED -DWIN32_LEAN_AND_MEAN -D_REENTRANT -D_MT -D_BSD_SOURCE
-I/usr/include -I../wininc -I.. -I../include
-I/vobs/windu/win32/../../btiutil -D_INCLUDE_XOPEN_SOURCE_EXTENDED
-D_XOPEN_SOURCE_EXTENDED wuerror.c -o linux_ia64/wuerror.o


In file included from /usr/include/libio.h:32,
from
/usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
from wuerror.c:55:
/usr/include/_G_config.h:29: parse error before "__mbstate_t"
/usr/include/_G_config.h:34: parse error before "__mbstate_t"
In file included from /usr/include/_G_config.h:44,
from /usr/include/libio.h:32,
from
/usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
from wuerror.c:55:
/usr/include/gconv.h:158: parse error before "__mbstate_t"
/usr/include/gconv.h:164: parse error before '}' token
/usr/include/gconv.h:172: field `__data' has incomplete type

However I tried to reproduce the problem in a small C program, but
could not.

Can somebody help me or direct me to the path to solve this problem.

Any help is greatly appreciated.

Thanks
-Vittal
 
D

Derk Gwen

# /usr/include/gconv.h:158: parse error before "__mbstate_t"
# /usr/include/gconv.h:164: parse error before '}' token
# /usr/include/gconv.h:172: field `__data' has incomplete type

Probability that anything in /usr/include is bad is very close to zero. Usually
errors attributed to an included file are really errors before the #include,
such as a missing semicolon or a #define of a name the included file had
reserved unto itself.
 
G

Gordon Burditt

In file included from /usr/include/libio.h:32,
from
/usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
from wuerror.c:55:
/usr/include/_G_config.h:29: parse error before "__mbstate_t"
/usr/include/_G_config.h:34: parse error before "__mbstate_t"
In file included from /usr/include/_G_config.h:44,
from /usr/include/libio.h:32,
from
/usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
from wuerror.c:55:
/usr/include/gconv.h:158: parse error before "__mbstate_t"
/usr/include/gconv.h:164: parse error before '}' token
/usr/include/gconv.h:172: field `__data' has incomplete type

Failure to compile due to syntax errors in system include files
often indicate a failure to include a prerequesite include file
beforehand. The syntax error is often something that should
be a typedef but isn't. __mbstate_t looks like a name for
a typedef. For example, in UNIX programs, you commonly need
to include <sys/types.h> before including anything of the form
<sys/*.h>.

Note that from the file paths given, <stdio.h> is an entirely
different file for the two versions of GCC.


Gordon L. Burditt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top