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

Bug 709636

Summary: dev-libs/light-1.2-r1 : fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Aaron Bauman (RETIRED) <bman>
Status: RESOLVED FIXED    
Severity: normal CC: silencly07, zima
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
dev-libs:light-1.2-r1:20200214-023154.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2

Description Toralf Förster gentoo-dev 2020-02-14 18:19:28 UTC
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../include -D_GNU_SOURCE  -W -Wall -Wextra -std=gnu99 -Wno-type-limits -Wno-format-truncation -Wno-unused-parameter -O2 -pipe -march=native -fno-common -c -o impl/light-sysfs.o `test -f 'impl/sysfs.c' || echo './'`impl/sysfs.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../include -D_GNU_SOURCE  -W -Wall -Wextra -std=gnu99 -Wno-type-limits -Wno-format-truncation -Wno-unused-parameter -O2 -pipe -march=native -fno-common -c -o impl/light-util.o `test -f 'impl/util.c' || echo './'`impl/util.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../include -D_GNU_SOURCE  -W -Wall -Wextra -std=gnu99 -Wno-type-limits -Wno-format-truncation -Wno-unused-parameter -O2 -pipe -march=native -fno-common -c -o impl/light-razer.o `test -f 'impl/razer.c' || echo './'`impl/razer.c
x86_64-pc-linux-gnu-gcc -W -Wall -Wextra -std=gnu99 -Wno-type-limits -Wno-format-truncation -Wno-unused-parameter -O2 -pipe -march=native -fno-common  -Wl,-O1 -Wl,--as-needed -o light light-main.o light-light.o light-helpers.o impl/light-sysfs.o impl/light-util.o impl/light-razer.o  
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: light-light.o:(.bss+0x0): multiple definition of `light_loglevel'; light-main.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: light-helpers.o:(.bss+0x0): multiple definition of `light_loglevel'; light-main.o:(.bss+0x0): first defined here

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-libressl-20200209-121610

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

  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 Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.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
ghc:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Fri, 14 Feb 2020 01:07:27 +0000

emerge -qpvO dev-libs/light
[ebuild  N    ] dev-libs/light-1.2-r1  USE="udev"
Comment 1 Toralf Förster gentoo-dev 2020-02-14 18:19:32 UTC
Created attachment 613784 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-02-14 18:19:36 UTC
Created attachment 613786 [details]
dev-libs:light-1.2-r1:20200214-023154.log
Comment 3 Toralf Förster gentoo-dev 2020-02-14 18:19:38 UTC
Created attachment 613788 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-02-14 18:19:41 UTC
Created attachment 613790 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-02-14 18:19:44 UTC
Created attachment 613792 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-02-14 18:19:47 UTC
Created attachment 613794 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-02-14 18:19:50 UTC
Created attachment 613796 [details]
temp.tbz2
Comment 8 Arfrever Frehtes Taifersar Arahesis 2020-06-23 09:11:13 UTC
*** Bug 729272 has been marked as a duplicate of this bug. ***
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-02 17:47:51 UTC
*** Bug 739898 has been marked as a duplicate of this bug. ***
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-02 18:00:16 UTC
Patch in attachment #657758 [details, diff] was added to duplicate bug #739898. Seems to work.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-02 18:01:59 UTC
Do note that, incredibly, upstream went for an -fcommon hack[0].



[0] https://github.com/haikarainen/light/commit/e5ab260265d8954af30229f78f2d3567488a6739
Comment 12 Petr Zima 2020-09-02 19:25:34 UTC
I'm sorry for reporting the dupe. I haven't reported the patch upstream, feel free to do so. Btw. it's really bewildering that upstream chose workaround for such a trivial problem :)
Comment 13 Larry the Git Cow gentoo-dev 2020-09-02 20:59:03 UTC
The bug has been closed via the following commit(s):

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

commit 05d1a1775a435dc675e5073c242b67ef11f9507c
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2020-09-02 20:56:31 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2020-09-02 20:58:57 +0000

    dev-libs/light: fix multiple bugs
    
    * Add patch to fix meaning of USE udev
    * Fix file collisions
    * Fix fno-fcommon build issue
    
    Closes: https://bugs.gentoo.org/673520
    Closes: https://bugs.gentoo.org/709636
    Closes: https://bugs.gentoo.org/739896
    
    Reported-by: Petr Zima <zima@matfyz.cz>
    Signed-off-by: Aaron Bauman <bman@gentoo.org>

 dev-libs/light/Manifest                        |  1 +
 dev-libs/light/files/light-1.2.2-fcommon.patch | 22 +++++++++++++++++
 dev-libs/light/light-1.2.2.ebuild              | 33 ++++++++++++++++++++++++++
 3 files changed, 56 insertions(+)