Skip to contentSkip to conversation

Getting 'stat64 already defined' type errors when trying to "make" fio on RedHat/Centos 6.3 (linux kernel 2.6.18-308)

DISCUSSION buysell08 2 participants 5 messages Nov 30, 2012 – Dec 3, 2012

lore
Share & tools
lore

buysell08

author
#0 lore raw

I'm getting 'stat64 already defined' type errors when trying to "make" fio on RedHat/Centos 6.3 (linux kernel 2.6.18-308).

I couldn't find anything in the www.spinics.net/lists/fio mailing list archives about it. Has anybody else seen a problem like this?

Quoted 1 line

make

DEP .depend
CC gettime.o
: Assembler messages:
:354: Error: symbol fstatat64' is already defined :388: Error: symbol fstat64' is already defined :418: Error: symbol lstat64' is already defined :448: Error: symbol stat64' is already defined :1704: Error: symbol `pread64' is already defined
make: *** [gettime.o] Error 1

Here's backgound version info from gcc:

Quoted 1 line

gcc -v

Reading specs from /usr/lib64/gcc-4.4.2/gcc/x86_64-unknown-linux-gnu/4.4.2/specs
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc/4.4.2 --enable-threads --enable-shared --enable-languages=c,c++ --disable-multilib --with-mpfr=/usr/local/gcc/4.4.2 --libdir=/usr/lib64/gcc-4.4.2 --with-include=/usr/local/gcc/4.4.2/include --with-gxx-include-dir=/usr/local/gcc/4.4.2/include/g++-v3
Thread model: posix
gcc version 4.4.2 (GCC)

Quoted 1 line

uname -r

2.6.18-308.8.1.el5

Thanks in advance
Ben

#1 lore raw
Quoted 5 lines · On 2012-11-30 19:50, buysell08 wrote:

I'm getting 'stat64 already defined' type errors when trying to "make" fio on RedHat/Centos 6.3 (linux kernel 2.6.18-308).

I couldn't find anything in the www.spinics.net/lists/fio mailing list archives about it. Has anybody else seen a problem like this?

Quoted 1 line

make

Quoted 9 lines

DEP .depend
CC gettime.o
: Assembler messages:
:354: Error: symbol fstatat64' is already defined :388: Error: symbol fstat64' is already defined :418: Error: symbol lstat64' is already defined :448: Error: symbol stat64' is already defined :1704: Error: symbol `pread64' is already defined
make: *** [gettime.o] Error 1

Never seen that before. From what I can tell on similar problems on google, it's an issue with your glibc causing double definitions when programs are compiled with _FILE_OFFSET_BITS= such as fio is.

If you can give me access to your system, I can probably add a work-around for you.

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 16 lines · Jens Axboe
Quoted 5 lines · On 2012-11-30 19:50, buysell08 wrote:

I'm getting 'stat64 already defined' type errors when trying to "make" fio on RedHat/Centos 6.3 (linux kernel 2.6.18-308).

I couldn't find anything in the www.spinics.net/lists/fio mailing list archives about it. Has anybody else seen a problem like this?

Quoted 1 line

make

Quoted 9 lines

DEP .depend
CC gettime.o
: Assembler messages:
:354: Error: symbol fstatat64' is already defined :388: Error: symbol fstat64' is already defined :418: Error: symbol lstat64' is already defined :448: Error: symbol stat64' is already defined :1704: Error: symbol `pread64' is already defined
make: *** [gettime.o] Error 1

Quoted 6 lines

Never seen that before. From what I can tell on similar problems on google, it's an issue with your glibc causing double definitions when programs are compiled with _FILE_OFFSET_BITS= such as fio is.

If you can give me access to your system, I can probably add a work-around for you.

Wait, you write centos 6.3, but it's running kernel 2.6.18. That can't be right, that'd be series 5. Did you mean centos 5.3?

Signature · 1 line
Jens Axboe
author
#3 lore raw

Re: you write centos 6.3, but it's running kernel 2.6.18. That can't be right

Indeed, it is not right. I meant to say Centos 6.3, kernel version 2.6.32. Apologies.

Re: Try adding a <sys/stat.h> include to fio.h

No joy. Same compilation error

But..... I found the web pages:

http://mailman.videolan.org/pipermail/x264-devel/2011-June/008563.html

http://lifecs.likai.org/2009/06/multiple-definition-of-extern-inline.html

which says to add the compiler flag "-fgnu89-inline" (because of an issue where old glibc libraries aren't compatible with "the c99 standard"). I added the compilation flag
(adding it just after the "-std=gnu99" option) and the compilation errors went away.

All done here. Thanks the help.

Ben Slade
Kensington MD

Jens Axboe wrote, On 12/2/2012 2:20 PM:

Quoted 25 lines · Jens Axboe
Quoted 15 lines · On 2012-11-30 19:50, buysell08 wrote:
Quoted 5 lines

I'm getting 'stat64 already defined' type errors when trying to "make" fio on RedHat/Centos 6.3 (linux kernel 2.6.18-308).

I couldn't find anything in the www.spinics.net/lists/fio mailing list archives about it. Has anybody else seen a problem like this?

Quoted 1 line

make

Quoted 9 lines

DEP .depend
CC gettime.o
: Assembler messages:
:354: Error: symbol fstatat64' is already defined :388: Error: symbol fstat64' is already defined :418: Error: symbol lstat64' is already defined :448: Error: symbol stat64' is already defined :1704: Error: symbol `pread64' is already defined
make: *** [gettime.o] Error 1

Quoted 6 lines

Never seen that before. From what I can tell on similar problems on google, it's an issue with your glibc causing double definitions when programs are compiled with _FILE_OFFSET_BITS= such as fio is.

If you can give me access to your system, I can probably add a work-around for you.

Wait, you write centos 6.3, but it's running kernel 2.6.18. That can't be right, that'd be series 5. Did you mean centos 5.3?

#4 lore raw
Quoted 4 lines · On 2012-12-03 17:49, buysell08 wrote:

Re: you write centos 6.3, but it's running kernel 2.6.18. That can't be right

Indeed, it is not right. I meant to say Centos 6.3, kernel version
2.6.32. Apologies.

Did you change the compiler, too? gcc 4.4.2 isn't centos 6.3 stock either.

Quoted 4 lines

Re: Try adding a <sys/stat.h> include to fio.h

No joy. Same compilation error

Quoted 8 lines

But..... I found the web pages:

   http://mailman.videolan.org/pipermail/x264-devel/2011-June/008563.html

   http://lifecs.likai.org/2009/06/multiple-definition-of-extern-inline.html

which says to add the compiler flag "-fgnu89-inline" (because of an issue where old glibc libraries aren't compatible with "the c99 standard"). I added the compilation flag
(adding it just after the "-std=gnu99" option) and the compilation errors went away.

I found that that one, too. So you should be able to make it work by just doing:

$ EXTFLAG="-std=gnu99" make

and not have to edit anything. Not sure I can do too much about this, if it's a largely non-standard setup. It's a bug in your toolchain.

Signature · 1 line
Jens Axboe