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

Bug 706890

Summary: dev-util/global-6.6.4 : fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Naohiro Aota <naota>
Status: RESOLVED FIXED    
Severity: normal CC: arfrever.fta, jer, morpheusz, sam
Priority: Normal Keywords: PATCH, UPSTREAM
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://lists.gnu.org/archive/html/bug-global/2020-02/msg00002.html
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: emerge-info.txt
dev-util:global-6.6.4:20200128-070248.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2
global-6.6.4-fno-common.patch
global-6.6.4-fno-common.patch

Description Toralf Förster gentoo-dev 2020-01-28 18:32:29 UTC
      |   ^~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../libparser  -I../libutil -I../libdb -I../libglibc -I../libutil -DLID='"no"'   -O2 -pipe -march=native -fno-common -c -o literal.o literal.c
/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -O2 -pipe -march=native -fno-common  -Wl,-O1 -Wl,--as-needed -o global global.o literal.o ../libparser/libgloparser.a ../libutil/libgloutil.a ../libdb/libglodb.a ../libglibc/libgloglibc.a -lltdl 
libtool: link: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fno-common -Wl,-O1 -o global global.o literal.o  -Wl,--as-needed ../libparser/libgloparser.a ../libutil/libgloutil.a ../libdb/libglodb.a ../libglibc/libgloglibc.a //usr/lib64/libltdl.so -ldl -Wl,-rpath -Wl,//usr/lib64
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../libutil/libgloutil.a(args.o):(.bss+0x18): multiple definition of `type'; global.o:(.bss+0x74): 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_desktop_gnome_systemd-libressl-20200125-150902

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

  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.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.40.0 *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.14.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Tue, 28 Jan 2020 06:06:24 +0000

emerge -qpvO dev-util/global
[ebuild  N    ] dev-util/global-6.6.4  USE="-doc -emacs -vim"
Comment 1 Toralf Förster gentoo-dev 2020-01-28 18:32:32 UTC
Created attachment 606376 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-01-28 18:32:35 UTC
Created attachment 606378 [details]
dev-util:global-6.6.4:20200128-070248.log
Comment 3 Toralf Förster gentoo-dev 2020-01-28 18:32:38 UTC
Created attachment 606380 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-01-28 18:32:41 UTC
Created attachment 606382 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-01-28 18:32:44 UTC
Created attachment 606384 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-01-28 18:32:47 UTC
Created attachment 606386 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-01-28 18:32:50 UTC
Created attachment 606388 [details]
temp.tbz2
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-05 17:16:42 UTC
The same Pavel Zhukov submitted his patch upstream[0], and they responded but fixed it differently using static declarations[1].

[0] https://lists.gnu.org/archive/html/bug-global/2020-02/msg00001.html
[1] https://lists.gnu.org/archive/html/bug-global/2020-02/msg00002.html
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-05 17:35:33 UTC
Created attachment 653288 [details]
global-6.6.4-fno-common.patch

From the [URL].
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-05 17:38:28 UTC
Comment on attachment 653288 [details]
global-6.6.4-fno-common.patch

Never mind, that's incomplete.
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-05 17:45:18 UTC
Created attachment 653290 [details, diff]
global-6.6.4-fno-common.patch

This one.
Comment 13 Naohiro Aota gentoo-dev 2020-08-11 14:01:17 UTC
Thank you for the patch. I'll commit the patch.
Comment 14 Larry the Git Cow gentoo-dev 2020-08-11 14:38:11 UTC
The bug has been closed via the following commit(s):

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

commit 7167133559531f56754e11d42e1d1873154fa21b
Author:     Naohiro Aota <naota@gentoo.org>
AuthorDate: 2020-08-11 14:03:54 +0000
Commit:     Naohiro Aota <naota@gentoo.org>
CommitDate: 2020-08-11 14:37:13 +0000

    dev-util/global: add patch to build with gcc-10/-fno-common
    
    Closes: https://bugs.gentoo.org/706890
    Package-Manager: Portage-3.0.2, Repoman-2.3.23
    Signed-off-by: Naohiro Aota <naota@gentoo.org>

 .../global/files/global-6.6.4-fno-common.patch     | 44 ++++++++++++++++++++++
 dev-util/global/global-6.6.4.ebuild                |  7 +++-
 2 files changed, 49 insertions(+), 2 deletions(-)