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

Bug 706738

Summary: net-fs/openafs-1.8.2-r1 : fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Adam Feldman <np-hardass>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
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
net-fs:openafs-1.8.2-r1:20200127-175701.log
temp.tbz2

Description Toralf Förster gentoo-dev 2020-01-27 18:03:21 UTC
x86_64-pc-linux-gnu-gcc -fPIC  -Damd64_linux26  -DFSSYNC_BUILD_SERVER -DFSSYNC_BUILD_CLIENT -O2 -pipe -march=native -fno-common   -I/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/src/config -I/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/include -I. -I.      -o physio.o -c physio.c
x86_64-pc-linux-gnu-gcc -fPIC  -Damd64_linux26  -DFSSYNC_BUILD_SERVER -DFSSYNC_BUILD_CLIENT -O2 -pipe -march=native -fno-common   -I/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/src/config -I/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/include -I. -I.      -o salvager.o -c salvager.c
x86_64-pc-linux-gnu-gcc  -Wl,-O1 -Wl,--as-needed -L/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib -L/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib   -Damd64_linux26  -DFSSYNC_BUILD_SERVER -DFSSYNC_BUILD_CLIENT -O2 -pipe -march=native -fno-common   -I/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/src/config -I/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/include -I. -I.      -o salvager vol-salvage.o physio.o salvager.o \
	/var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/libcmd.a vlib.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/util.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/libdir.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/librx.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/libafshcrypto_lwp.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/liblwp.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/libsys.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/libacl.a /var/tmp/portage/net-fs/openafs-1.8.2-r1/work/openafs-1.8.2/lib/libopr.a -lrokenafs -lresolv  
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: vlib.a(ihandle.o):(.bss+0x0): multiple definition of `vol_io_params'; vlib.a(volume.o):(.bss+0x70): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: vlib.a(daemon_com.o):(.bss+0x0): multiple definition of `V_BreakVolumeCallbacks'; vlib.a(fssync-server.o):(.bss+0x8): first defined here

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_hardened-libressl_test-20200126-104546

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

  Please see the tracker bug for details.

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


llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)

Available Rust versions:
  [1]   rust-1.40.0 *


ghc:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Mon, 27 Jan 2020 16:26:19 +0000

emerge -qpvO net-fs/openafs
[ebuild  N    ] net-fs/openafs-1.8.2-r1  USE="namei ncurses pthreaded-ubik supergroups -api -bitmap-later -debug -doc -fuse -kauth -kerberos (-modules) -perl -tsm -ubik-read-while-write"
Comment 1 Toralf Förster gentoo-dev 2020-01-27 18:03:24 UTC
Created attachment 605684 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-01-27 18:03:27 UTC
Created attachment 605686 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-01-27 18:03:29 UTC
Created attachment 605688 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-01-27 18:03:32 UTC
Created attachment 605690 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-01-27 18:03:35 UTC
Created attachment 605692 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-01-27 18:03:37 UTC
Created attachment 605694 [details]
net-fs:openafs-1.8.2-r1:20200127-175701.log
Comment 7 Toralf Förster gentoo-dev 2020-01-27 18:03:40 UTC
Created attachment 605696 [details]
temp.tbz2
Comment 8 Cheyenne Wills 2020-03-20 19:17:58 UTC
Upstream.. I'm working on a master patch to resolve the build issues associated the -fno-common flag.
Comment 9 Cheyenne Wills 2020-03-24 15:12:33 UTC
I've pushed the upstream updates to openafs master to fix the issues found with -fno-common.  The commit is currently in review.  Not sure if it will make it into the upcoming 1.8.6 release or not.
Comment 10 Bernd Feige 2020-05-11 08:44:32 UTC
(In reply to Cheyenne Wills from comment #9)
> I've pushed the upstream updates to openafs master to fix the issues found
> with -fno-common.  The commit is currently in review.  Not sure if it will
> make it into the upcoming 1.8.6 release or not.

Thanks for the patch (https://git.openafs.org/?p=openafs.git;a=commit;h=0e2072ae386d4111bef161eb955964b649c31386)!
I have two issues with it (working with 1.8.6-pre2):

- Patch to src/cf/osconf.m4 does not apply (same for -pre1; fixed by hand)

- In xstat, you removed all definitions of terminationEvent but it is still used in the code. To avoid the collision, I renamed the one in xstat/xstat_cm*.[ch] toterminationEvent_cm and could compile openafs with gcc10.
Comment 11 Cheyenne Wills 2020-05-20 18:52:14 UTC
I just submitted the patch for 1.8.x to fix the -fno-common problem (see gerrit 14217).  Resolves both the issues you mentioned.
Comment 12 Cheyenne Wills 2020-05-21 14:53:24 UTC
Link to the gerrit patch to handle the -fno-common flag

https://gerrit.openafs.org/14217

The patch is currently pending review
Comment 13 Cheyenne Wills 2020-05-22 19:18:14 UTC
(In reply to Cheyenne Wills from comment #12)
> Link to the gerrit patch to handle the -fno-common flag
> 
> https://gerrit.openafs.org/14217
> 
> The patch is currently pending review

There is now a small prereq patch as well https://gerrit.openafs.org/14226 and there is an update to the 14217 patch as the result of feedback.
Comment 14 Cheyenne Wills 2020-07-10 19:14:49 UTC
The patches for building with gcc-10 (and with -fno-common) are now in the upstream openafs-1.8.x branch
Comment 15 Larry the Git Cow gentoo-dev 2020-09-13 09:48:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9e3fbc9f8f1990ab161537c1e0ce3658489f20d

commit d9e3fbc9f8f1990ab161537c1e0ce3658489f20d
Author:     Andrew Savchenko <bircoph@gentoo.org>
AuthorDate: 2020-09-13 09:40:58 +0000
Commit:     Andrew Savchenko <bircoph@gentoo.org>
CommitDate: 2020-09-13 09:47:49 +0000

    net-fs/openafs: update to 1.8.6
    
    - Version bump to 1.8.6, this fixes many bugs,
    - including CVE-2019-1860{1..3}.
    - Update to the latest upstream stable 1_8_x branch, which fixes
      more bugs and bring kernel 5.9 support.
    - Migrate to tmpfiles eclass.
    - Fix build with USE=tsm.
    - Fix systemd unit files, thanks Adrian <adrian@planetcoding.net>
      for suggestion.
    - Fix doxygen dep.
    
    Bug: https://bugs.gentoo.org/719136
    Closes: https://bugs.gentoo.org/680944
    Closes: https://bugs.gentoo.org/686488
    Closes: https://bugs.gentoo.org/706738
    Closes: https://bugs.gentoo.org/736160
    Closes: https://bugs.gentoo.org/740630
    Package-Manager: Portage-3.0.6, Repoman-3.0.1
    Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>

 net-fs/openafs/Manifest             |   3 +
 net-fs/openafs/openafs-1.8.6.ebuild | 343 ++++++++++++++++++++++++++++++++++++
 2 files changed, 346 insertions(+)