axboe / fio

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

Failed to make FIO on Ubuntu-20.04 #1170

Closed ethrbh closed 3 years ago

ethrbh commented 3 years ago

Please acknowledge the following before creating a ticket

Description of the bug:

Environment:

Ubuntu-20.04
ethrbh@ethrbh-VmWare:~/Github/fio-3.9((fio-3.9))> uname -a
Linux ethrbh-VmWare 5.4.0-62-generic #70-Ubuntu SMP Tue Jan 12 12:45:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
ethrbh@ethrbh-VmWare:~/Github/fio-3.9((fio-3.9))> 

fio version: Fio 3.9

ethrbh@ethrbh-VmWare:~/Github/fio-3.9((fio-3.9))> git log
commit bb661c4027e5a0482b9fcc1c1b4e7e918650ee72 (HEAD, tag: fio-3.9)
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Sep 6 09:07:55 2018 -0600

    Fio 3.9

    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Reproduction steps

ethrbh@ethrbh-VmWare:~/Github/fio-3.9((fio-3.9))> make
    CC crc/crc32c-arm64.o
In file included from crc/../os/os.h:38,
                 from crc/crc32c-arm64.c:2:
crc/../os/os-linux.h:129:19: error: static declaration of ‘gettid’ follows non-static declaration
  129 | static inline int gettid(void)
      |                   ^~~~~~
In file included from /usr/include/unistd.h:1170,
                 from crc/../os/os.h:8,
                 from crc/crc32c-arm64.c:2:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~
make: *** [Makefile:345: crc/crc32c-arm64.o] Error 1

On another machine where Ubuntu-18.04 is installed, I could do these steps.

batman@bat-image:~/Tools/fio-3.9$ 
batman@bat-image:~/Tools/fio-3.9$ uname -a
Linux bat-image 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
batman@bat-image:~/Tools/fio-3.9$ 
batman@bat-image:~/Tools/fio-3.9$ 
batman@bat-image:~/Tools/fio-3.9$ 
batman@bat-image:~/Tools/fio-3.9$ sudo make
Makefile:19: config-host.mak: No such file or directory
FIO_VERSION = fio-3.9
Running configure ...
Operating system              Linux
CPU                           x86_64
Big endian                    no
Compiler                      gcc
Cross compile                 no

Static build                  no
Wordsize                      64
zlib                          no
Linux AIO support             no
POSIX AIO support             yes
POSIX AIO support needs -lrt  yes
POSIX AIO fsync               yes
POSIX pshared support         yes
Solaris AIO support           no
__sync_fetch_and_add          yes
__sync_synchronize            yes
__sync_val_compare_and_swap   yes
libverbs                      no
rdmacm                        no
asprintf()                    yes
vasprintf()                   yes
Linux fallocate               yes
POSIX fadvise                 yes
POSIX fallocate               yes
sched_setaffinity(3 arg)      yes
sched_setaffinity(2 arg)      no
clock_gettime                 yes
CLOCK_MONOTONIC               yes
CLOCK_MONOTONIC_RAW           yes
CLOCK_MONOTONIC_PRECISE       no
clockid_t                     yes
gettimeofday                  yes
fdatasync                     yes
sync_file_range               yes
EXT4 move extent              yes
Linux splice(2)               yes
GUASI                         no
Fusion-io atomic engine       no
libnuma                       no
strsep                        yes
strcasestr                    yes
strlcat                       no
getopt_long_only()            yes
inet_aton                     yes
socklen_t                     yes
__thread                      yes
RUSAGE_THREAD                 yes
SCHED_IDLE                    yes
TCP_NODELAY                   yes
Net engine window_size        yes
TCP_MAXSEG                    yes
RLIMIT_MEMLOCK                yes
pwritev/preadv                yes
pwritev2/preadv2              yes
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                           yes
libpmem                       no
libpmemblk                    no
PMDK pmemblk engine           no
PMDK dev-dax engine           no
PMDK libpmem engine           no
DDN's Infinite Memory Engine  no
lex/yacc for arithmetic       no
getmntent                     yes
getmntinfo                    no
Static Assert                 yes
bool                          yes
strndup                       yes
Valgrind headers              no
Zoned block device support    yes
march_armv8_a_crc_crypto      no
cuda                          no
mkdir(a, b)                   yes
Build march=native            yes
Consider installing zlib-dev (zlib-devel, some fio features depend on it.
    CC crc/crc16.o
    CC crc/crc32.o
    CC crc/crc32c-arm64.o
    CC crc/crc32c-intel.o
    CC crc/crc32c.o
    CC crc/crc64.o
    CC crc/crc7.o
    CC crc/fnv.o
    CC crc/md5.o
    CC crc/murmur3.o
    CC crc/sha1.o
    CC crc/sha256.o
    CC crc/sha3.o
    CC crc/sha512.o
    CC crc/test.o
    CC crc/xxhash.o
    CC lib/axmap.o
    CC lib/bloom.o
    CC lib/flist_sort.o
    CC lib/gauss.o
    CC lib/getrusage.o
    CC lib/hweight.o
    CC lib/ieee754.o
    CC lib/lfsr.o
    CC lib/memalign.o
    CC lib/memcpy.o
    CC lib/mountcheck.o
    CC lib/num2str.o
    CC lib/output_buffer.o
    CC lib/pattern.o
    CC lib/prio_tree.o
    CC lib/rand.o
    CC lib/rbtree.o
    CC lib/strntol.o
    CC lib/zipf.o
    CC gettime.o
    CC ioengines.o
    CC init.o
    CC stat.o
    CC log.o
    CC time.o
    CC filesetup.o
    CC eta.o
    CC verify.o
    CC memory.o
    CC io_u.o
    CC parse.o
    CC fio_sem.o
    CC rwlock.o
    CC pshared.o
    CC options.o
    CC smalloc.o
    CC filehash.o
    CC profile.o
    CC debug.o
    CC engines/cpu.o
    CC engines/mmap.o
    CC engines/sync.o
    CC engines/null.o
    CC engines/net.o
    CC engines/ftruncate.o
    CC engines/filecreate.o
    CC server.o
    CC client.o
    CC iolog.o
    CC backend.o
    CC libfio.o
    CC flow.o
    CC cconv.o
    CC gettime-thread.o
    CC helpers.o
    CC json.o
    CC idletime.o
    CC td_error.o
    CC profiles/tiobench.o
    CC profiles/act.o
    CC io_u_queue.o
    CC filelock.o
    CC workqueue.o
    CC rate-submit.o
    CC optgroup.o
    CC helper_thread.o
    CC steadystate.o
    CC zone-dist.o
    CC engines/posixaio.o
    CC engines/falloc.o
    CC engines/e4defrag.o
    CC engines/splice.o
    CC oslib/asprintf.o
    CC oslib/strlcat.o
    CC engines/mtd.o
    CC oslib/libmtd.o
    CC oslib/libmtd_legacy.o
    CC zbd.o
    CC diskutil.o
    CC fifo.o
    CC blktrace.o
    CC cgroup.o
    CC trim.o
    CC engines/sg.o
    CC oslib/linux-dev-lookup.o
    CC fio.o
  LINK fio
    CC t/log.o
    CC t/genzipf.o
    CC oslib/strcasestr.o
    CC oslib/strndup.o
  LINK t/fio-genzipf
    CC t/btrace2fio.o
  LINK t/fio-btrace2fio
    CC t/dedupe.o
    CC t/debug.o
    CC t/arch.o
  LINK t/fio-dedupe
    CC t/verify-state.o
  LINK t/fio-verify-state
    CC t/stest.o
  LINK t/stest
    CC t/ieee754.o
  LINK t/ieee754
    CC t/axmap.o
  LINK t/axmap
    CC t/lfsr-test.o
  LINK t/lfsr-test
    CC t/gen-rand.o
  LINK t/gen-rand
batman@bat-image:~/Tools/fio-3.9$ 

Does this mean the tool does not "compatible" with Ubuntu-20.04?

thanks for your help, /Robi

axboe commented 3 years ago

This is fixed in later versions of fio.

sitsofe commented 3 years ago

@ethrbh upstream fio developers only support the latest version of fio (hence https://github.com/axboe/fio/blob/548b363c08875165a018788195e8fd2304c2ce24/REPORTING-BUGS#L36-L38 ). Can you reproduce the issue with fio-3.25 or the master branch version? Thanks!

ethrbh commented 3 years ago

hello,

Oh my bad. Of course I would use the newest version (e.g.: fio-3.25), and not the 3.9 :-(

Thanks for your help. I will close the ticket.

br, /Robi