axboe / fio

Flexible I/O Tester
GNU General Public License v2.0
5.2k stars 1.26k forks source link

FIO on AIX 7.2 giving "cc1: unrecognized option `-Wdeclaration-after-statement'" while compiling #967

Closed tdinil closed 4 years ago

tdinil commented 4 years ago

Hello,

I have a requirement to run FIO on AIX 7.2 TL3 SP3(7200-03-03-1914). While compiling the source, i am getting below error. Any help to fix this is appreciated.

/fio-master

Unknown CPU Operating system AIX CPU 00C617704B00 Big endian yes Compiler gcc Cross compile no

Static build no Wordsize 32 zlib yes Linux AIO support no Linux AIO over io_uring no POSIX AIO support no POSIX AIO support needs -lrt no POSIX AIO fsync no POSIX pshared support no pthread_condattr_setclock() no pthread_sigmask() no Solaris AIO support no sync_fetch_and_add no __sync_synchronize no sync_val_compare_and_swap no libverbs no rdmacm no asprintf() no vasprintf() no Linux fallocate no POSIX fadvise no POSIX fallocate no sched_setaffinity(3 arg) no sched_setaffinity(2 arg) no clock_gettime yes CLOCK_MONOTONIC yes CLOCK_MONOTONIC_RAW no CLOCK_MONOTONIC_PRECISE no clockid_t yes gettimeofday yes fdatasync no pipe() no pipe2() no pread() no sync_file_range no EXT4 move extent no Linux splice(2) no GUASI no libnuma no strsep yes strcasestr no strlcat no getopt_long_only() no inet_aton yes socklen_t yes thread no RUSAGE_THREAD yes SCHED_IDLE no TCP_NODELAY yes Net engine window_size yes TCP_MAXSEG yes RLIMIT_MEMLOCK no pwritev/preadv yes pwritev2/preadv2 no IPv6 helpers yes http engine no Rados engine no Rados Block Device engine no setvbuf yes Gluster API engine no s390_z196_facilities no HDFS engine no MTD no libpmem no libpmemblk no PMDK pmemblk engine no PMDK dev-dax engine no PMDK libpmem engine no DDN's Infinite Memory Engine no iscsi engine no NBD engine no lex/yacc for arithmetic no getmntent yes getmntinfo no Static Assert no bool yes strndup no Valgrind headers no Zoned block device support no libzbc engine no march_armv8_a_crc_crypto no cuda no Build march=native no CUnit no kernel_rwf_t no -Wimplicit-fallthrough yes MADV_HUGEPAGE no gettid no statx(2)/libc no statx(2)/syscall no TCMalloc support no /fio-master:

/fio-master: file config-host.mak config-host.mak: commands text /fio-master: cat config-host.mak

Automatically generated by configure - do not modify

Configured with: './configure'

CONFIG_TARGET_OS=AIX CONFIG_32BIT=y CONFIG_BIG_ENDIAN=y CONFIG_ZLIB=y CONFIG_CLOCK_GETTIME=y CONFIG_CLOCK_MONOTONIC=y CONFIG_CLOCKID_T=y CONFIG_GETTIMEOFDAY=y CONFIG_STRSEP=y CONFIG_INET_ATON=y CONFIG_SOCKLEN_T=y CONFIG_RUSAGE_THREAD=y CONFIG_TCP_NODELAY=y CONFIG_NET_WINDOWSIZE=y CONFIG_NET_MSS=y CONFIG_PWRITEV=y CONFIG_IPV6=y CONFIG_SETVBUF=y CONFIG_GETMNTENT=y CONFIG_HAVE_BOOL=y LIBS+=-lz GFIO_LIBS+= CFLAGS+=-D_GNU_SOURCE -include config-host.h -Wimplicit-fallthrough LDFLAGS+= CC=gcc BUILD_CFLAGS= -D_GNU_SOURCE -include config-host.h -Wimplicit-fallthrough INSTALL_PREFIX=/usr/local /fio-master:

FIO_VERSION = fio-3.19 CC crc/crc16.o cc1: unrecognized option `-Wdeclaration-after-statement' gmake: *** [crc/crc16.o] Error 1 [12:16 PM root@s922-aix03 /fio-master]:

Thanks, Dinil

tdinil commented 4 years ago

the issue is seen with "gmake"

FIO_VERSION = fio-3.19 CC crc/crc16.o cc1: unrecognized option `-Wdeclaration-after-statement' gmake: *** [crc/crc16.o] Error 1 [12:16 PM root@s922-aix03 /fio-master]:

axboe commented 4 years ago

Does it build if you just remove -Wdeclaration-after-statment from the Makefile?

tdinil commented 4 years ago

It gives me gmake: *** [crc/crc32c-arm64.o] Error 1

/fio-master]: gmake FIO_VERSION = fio-3.19 CC crc/crc16.o fmt: bad width: 0 CC crc/crc32.o fmt: bad width: 0 CC crc/crc32c-arm64.o In file included from arch/arch-ppc.h:4, from arch/arch.h:43, from crc/crc32c.h:23, from crc/crc32c-arm64.c:1: /usr/include/unistd.h:1062: parse error before '[' token /usr/include/unistd.h:1063: parse error before "rid_t" In file included from /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2/include/stdlib.h:447, from arch/arch-ppc.h:5, from arch/arch.h:43, from crc/crc32c.h:23, from crc/crc32c-arm64.c:1: /usr/include/sys/localedef.h:574: parse error before "cur_locale" In file included from arch/arch.h:43, from crc/crc32c.h:23, from crc/crc32c-arm64.c:1: arch/arch-ppc.h: In function get_cpu_clock': arch/arch-ppc.h:46: warning: asm operand 1 probably doesn't match constraints arch/arch-ppc.h:46: warning: asm operand 1 probably doesn't match constraints arch/arch-ppc.h:46: warning: asm operand 1 probably doesn't match constraints arch/arch-ppc.h:46: warning: asm operand 1 probably doesn't match constraints arch/arch-ppc.h:46: warning: asm operand 1 probably doesn't match constraints arch/arch-ppc.h:46: warning: asm operand 1 probably doesn't match constraints In file included from /usr/include/sys/cred.h:49, from /usr/include/sys/thread.h:42, from /usr/include/sys/ptrace.h:28, from /usr/include/sys/proc.h:42, from /usr/include/sys/pri.h:43, from /usr/include/sys/sched.h:38, from /usr/include/sched.h:51, from /usr/include/pthread.h:63, from os/os.h:7, from crc/crc32c-arm64.c:2: /usr/include/sys/secattr.h: At top level: /usr/include/sys/secattr.h:50: parse error before "rid_t" /usr/include/sys/secattr.h:65: parse error before '}' token /usr/include/sys/secattr.h:70: parse error before "authnum_t" /usr/include/sys/secattr.h:76: parse error before "aroles" /usr/include/sys/secattr.h:77: parse error before '}' token /usr/include/sys/secattr.h:122: fieldsc_attr' has incomplete type /usr/include/sys/secattr.h:123: confused by earlier errors, bailing out gmake: *** [crc/crc32c-arm64.o] Error 1 [/fio-master]:

axboe commented 4 years ago

I don't have access to AIX anymore, so can't really help much there. What compiler are you using? The parse error in system headers seem odd...

tdinil commented 4 years ago

Hello,

Its the xlC

[/fio-master]: lslpp -l | grep "vac.C"; lslpp -l | grep "vacpp.cmp.core"; lslpp -l | grep "xlC.aix*" xlC.aix61.rte 13.1.3.1 COMMITTED IBM XL C++ Runtime for AIX 6.1

sitsofe commented 4 years ago

How did configure get this:

Compiler gcc

? I'm not sure fio has every supported non-gcc like (which I think these days means gcc or clang) compilers though... @axboe?

sitsofe commented 4 years ago

(Mentioning @mperzl for comment because they have mail mentioning fio AIX work)

tdinil commented 4 years ago

The compiler I used on AIX came default with the AIX OS installation. Nothing was done additionally.

sitsofe commented 4 years ago

@tdinil as mentioned, fio only supports compilation with gcc/clang (or compilers that implement a similar enough set of features to them) so if you're trying to force it to run with something else that's not supported. It does look like gcc was found but since you're not sure about this there's not much more help I can give (I've never used AIX and have no access to it).

About the only thing I can suggest is that you look at how Michael Perzl gets fio to compile in his AIX RPM packages. See http://www.perzl.org/aix/ (and for example)ftp://www.oss4aix.org/SPECS/fio-3.15-1.spec which I note references ftp://www.oss4aix.org/patches/fio-3.15-aix.patch ).

Let us know how you get on - if it really doesn't work we should change the documentation to no longer mention AIX...

sitsofe commented 4 years ago

Closing due to lack of reply from reporter. If this issue is still happening with the latest fio (see https://github.com/axboe/fio/releases to find out which version that is) please reopen. Thanks!