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

Bug 706966

Summary: app-misc/spacenavd-0.6 : fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Sebastian Pipping <sping>
Severity: normal CC: thomas
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: emerge-info.txt
Patch to fix compilation with -fno-common

Description Toralf Förster gentoo-dev 2020-01-28 18:50:38 UTC
      |  ^~~~~~~~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -pedantic -Wall   -fno-strict-aliasing -I./src -I/usr/local/include -O2 -pipe -march=native -fno-common -c src/magellan/smag_detect.c -o src/magellan/smag_detect.o
x86_64-pc-linux-gnu-gcc -pedantic -Wall   -fno-strict-aliasing -I./src -I/usr/local/include -O2 -pipe -march=native -fno-common -c src/magellan/smag_event.c -o src/magellan/smag_event.o
x86_64-pc-linux-gnu-gcc -o spacenavd src/cfgfile.o src/client.o src/dev.o src/dev_serial.o src/dev_usb.o src/dev_usb_darwin.o src/dev_usb_linux.o src/dummy_usb.o src/event.o src/hotplug_darwin.o src/hotplug_linux.o src/kbemu.o src/proto_unix.o src/proto_x11.o src/spnavd.o src/spnavd_win32.o src/xdetect_freebsd.o src/xdetect_linux.o src/serial/sball.o src/serial/sballserial.o src/magellan/smag.o src/magellan/smag_comm.o src/magellan/smag_detect.o src/magellan/smag_event.o -L/usr/local/lib -L/usr/X11/lib -lX11 -Wl,-O1 -Wl,--as-needed
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/dev_usb_linux.o:(.bss+0x0): multiple definition of `verbose'; src/dev.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/dev_usb_linux.o:(.bss+0x20): multiple definition of `cfg'; src/dev.o:(.bss+0x20): first defined here


  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop-libressl-20200125-232521


  Please see the tracker bug for details.

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

clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
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 *
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

==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Tue, 28 Jan 2020 13:26:22 +0000

emerge -qpvO app-misc/spacenavd
[ebuild  N    ] app-misc/spacenavd-0.6  USE="X"
Comment 1 Toralf Förster gentoo-dev 2020-01-28 18:50:41 UTC
Created attachment 606888 [details]
Comment 2 Toralf Förster gentoo-dev 2020-01-28 18:50:44 UTC
Created attachment 606890 [details]
Comment 3 Toralf Förster gentoo-dev 2020-01-28 18:50:48 UTC
Created attachment 606892 [details]
Comment 4 Toralf Förster gentoo-dev 2020-01-28 18:50:51 UTC
Created attachment 606894 [details]
Comment 5 Toralf Förster gentoo-dev 2020-01-28 18:50:54 UTC
Created attachment 606896 [details]
Comment 6 Toralf Förster gentoo-dev 2020-01-28 18:50:57 UTC
Created attachment 606898 [details]
Comment 7 Thomas Albers 2020-01-30 23:56:29 UTC
Created attachment 609508 [details, diff]
Patch to fix compilation with -fno-common

This patch should work. Could someone else test it?
Comment 8 Sebastian Pipping gentoo-dev 2020-01-31 22:16:21 UTC
Let's discuss that with upstream at so that we patch in a way that is future proof.
Comment 9 Sebastian Pipping gentoo-dev 2020-01-31 23:41:54 UTC
(In reply to Thomas Albers from comment #7)
> Created attachment 609508 [details, diff] [details, diff]
> Patch to fix compilation with -fno-common
> This patch should work. Could someone else test it?

Hi Thomas, upstream does not like this direction for a patch, see .

Their takes is which I'll be applying now (so that we don't have to forward-port a patch for every new release).

Still, thank you for making and sharing that patch!
Comment 10 Larry the Git Cow gentoo-dev 2020-01-31 23:43:25 UTC
The bug has been closed via the following commit(s):

commit d59da78d876aba0d7c867ed2083c51489ad80908
Author:     Sebastian Pipping <>
AuthorDate: 2020-01-31 23:36:57 +0000
Commit:     Sebastian Pipping <>
CommitDate: 2020-01-31 23:42:51 +0000

    app-misc/spacenavd: Support GCC 10
    Signed-off-by: Sebastian Pipping <>
    Package-Manager: Portage-2.3.84, Repoman-2.3.20

 app-misc/spacenavd/files/spacenavd-0.7-gcc10.patch | 24 ++++++++++++++++++++++
 app-misc/spacenavd/spacenavd-0.7.ebuild            |  4 ++++
 2 files changed, 28 insertions(+)
Comment 11 Thomas Albers 2020-02-01 18:28:10 UTC
The upstream fix might be applied to spacenavd-0.6 as well, mightn't it?
Comment 12 Sebastian Pipping gentoo-dev 2020-02-01 19:52:11 UTC
(In reply to Thomas Albers from comment #11)
> The upstream fix might be applied to spacenavd-0.6 as well, mightn't it?

I'll take that as an explicit wish, give me a second.

I didn't apply to 0.6 originally, because it is marked as stable, touching stable ebuilds is risky, and making a patch 0.6-r1 seems to have little value while we have 0.7 around and no explicit wish earlier.
Comment 13 Larry the Git Cow gentoo-dev 2020-02-01 19:53:16 UTC
The bug has been referenced in the following commit(s):

commit bff35faa79ba247ccbb7532ed4809035dbe5a22b
Author:     Sebastian Pipping <>
AuthorDate: 2020-02-01 19:51:56 +0000
Commit:     Sebastian Pipping <>
CommitDate: 2020-02-01 19:53:07 +0000

    app-misc/spacenavd: Support GCC 10
    Signed-off-by: Sebastian Pipping <>
    Package-Manager: Portage-2.3.84, Repoman-2.3.20

 app-misc/spacenavd/spacenavd-0.6.ebuild | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)