I am building gcc version 4.4.2 on centos 32-bit machine. # uname -a Linux rh55-i386 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 EDT 2010 i686 i686 i386 GNU/Linux The build is successful. But my project fails to build using this built gcc. The error (actually warning; we have -Werror set) is: /opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:317: warning: inline function ‘lstat64’ declared but never defined /opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:286: warning: inline function ‘fstatat64’ declared but never defined /opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:255: warning: inline function ‘fstat64’ declared but never defined /opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:250: warning: inline function ‘stat64’ declared but never defined The version of glibc on the system is: # rpm -q glibc glibc-2.5-49 It looks like fixincludes 'fixes' the function declarations as well, converting them to extern inline. Example: this one from <sys/stat.h>: #ifndef __USE_FILE_OFFSET64 /* Get file attributes for FILE and put them in BUF. */ extern int stat (__const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); gets converted to the following in the includes-fixed/sys/stat.h: #ifndef __USE_FILE_OFFSET64 /* Get file attributes for FILE and put them in BUF. */ #ifdef __GNUC_GNU_INLINE__ extern #endif __inline__ int stat (__const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); Similar thing for all the stat/lstat/fstat and stat64/lstat64/fstat64 functions. The fixincludes should fix only the function definitions. Although I've marked it as in Version 4.4.2, apparently this bug is present in the latest code. [Ref: This issue was discussed earlier today in the gcc-help list on this thread: http://gcc.gnu.org/ml/gcc-help/2010-12/msg00197.html]
The glibc is a "little" bit old. Please attach the headerfile.
Created attachment 23187 [details] /usr/include/sys/stat.h from a CentOS 5.5 server.
Sorry for the delay. I was on vacation. I've attached the stat.h header file.