Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 708546

Summary: sys-block/fio-3.17-r1 : fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: prometheanfire
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=720696
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
sys-block:fio-3.17-r1:20200206-202141.log
temp.tbz2
Patch for gcc with -fno-common
Patch for ebuild

Description Toralf Förster gentoo-dev 2020-02-06 22:28:38 UTC
x86_64-pc-linux-gnu-gcc -o t/dedupe.o -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement   -D_GNU_SOURCE -include config-host.h -O2 -pipe -march=native -fno-common  -Wimplicit-fallthrough -I. -I. -DBITS_PER_LONG=64 -DFIO_VERSION='"fio-3.17"' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL -DFIO_INC_DEBUG -c t/dedupe.c
x86_64-pc-linux-gnu-gcc -o t/debug.o -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement   -D_GNU_SOURCE -include config-host.h -O2 -pipe -march=native -fno-common  -Wimplicit-fallthrough -I. -I. -DBITS_PER_LONG=64 -DFIO_VERSION='"fio-3.17"' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL -DFIO_INC_DEBUG -c t/debug.c
x86_64-pc-linux-gnu-gcc -o t/arch.o -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement   -D_GNU_SOURCE -include config-host.h -O2 -pipe -march=native -fno-common  -Wimplicit-fallthrough -I. -I. -DBITS_PER_LONG=64 -DFIO_VERSION='"fio-3.17"' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL -DFIO_INC_DEBUG -c t/arch.c
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -rdynamic -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement   -D_GNU_SOURCE -include config-host.h -O2 -pipe -march=native -fno-common  -Wimplicit-fallthrough -I. -I. -DBITS_PER_LONG=64 -DFIO_VERSION='"fio-3.17"' -o t/fio-dedupe t/dedupe.o lib/rbtree.o t/log.o fio_sem.o pshared.o smalloc.o gettime.o crc/md5.o lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o t/arch.o crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/crc32c-arm64.o crc/fnv.o -lrt -lz  -lm  -lpthread -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: t/arch.o:(.bss+0x4): multiple definition of `tsc_reliable'; gettime.o:(.bss+0x4): first defined here
collect2: error: ld returned 1 exit status

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no-multilib-test-20200203-215003

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.6
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)

Available Rust versions:
  [1]   rust-1.41.0 *


ghc:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Thu, 06 Feb 2020 19:31:29 +0000

emerge -qpvO sys-block/fio
[ebuild  N    ] sys-block/fio-3.17-r1  USE="zlib -aio -curl -glusterfs -gnuplot -gtk -libressl -numa -python -rbd -rdma (-static) -tcmalloc" PYTHON_TARGETS="python2_7 python3_6"
Comment 1 Toralf Förster gentoo-dev 2020-02-06 22:28:40 UTC
Created attachment 612366 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-02-06 22:28:43 UTC
Created attachment 612368 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-02-06 22:28:46 UTC
Created attachment 612370 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-02-06 22:28:49 UTC
Created attachment 612372 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-02-06 22:28:52 UTC
Created attachment 612374 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-02-06 22:28:55 UTC
Created attachment 612376 [details]
sys-block:fio-3.17-r1:20200206-202141.log
Comment 7 Toralf Förster gentoo-dev 2020-02-06 22:28:58 UTC
Created attachment 612378 [details]
temp.tbz2
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2020-05-02 18:31:53 UTC
Upstream fix is included in v3.19.
Comment 9 Jiří Moravec 2020-05-14 20:16:04 UTC
(In reply to Thomas Deutschmann from comment #8)
> Upstream fix is included in v3.19.

Are you sure? Because fio-3.19 build failed for me.
For successful build it was necessary to modify gfio.c and gfio.h.
Comment 10 Jiří Moravec 2020-05-14 20:17:33 UTC
Created attachment 639090 [details, diff]
Patch for gcc with -fno-common
Comment 11 Jiří Moravec 2020-05-14 20:19:51 UTC
Created attachment 639096 [details, diff]
Patch for ebuild

P.S. *-libmtd.patch is already in 3.19 upstream.