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>
Status: RESOLVED FIXED    
Severity: normal CC: thomas
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/FreeSpacenav/spacenavd/issues/17
See Also: https://bugs.gentoo.org/show_bug.cgi?id=707734
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: emerge-info.txt
app-misc:spacenavd-0.6:20200128-145525.log
emerge-history.txt
environment
etc.portage.tbz2
temp.tbz2
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:
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 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]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-01-28 18:50:44 UTC
Created attachment 606890 [details]
app-misc:spacenavd-0.6:20200128-145525.log
Comment 3 Toralf Förster gentoo-dev 2020-01-28 18:50:48 UTC
Created attachment 606892 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-01-28 18:50:51 UTC
Created attachment 606894 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-01-28 18:50:54 UTC
Created attachment 606896 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-01-28 18:50:57 UTC
Created attachment 606898 [details]
temp.tbz2
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 https://github.com/FreeSpacenav/spacenavd/issues/17 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 https://github.com/FreeSpacenav/spacenavd/issues/17#issuecomment-580949667 .

Their takes is https://github.com/FreeSpacenav/spacenavd/commit/081182f1675bb69eec58d92698f1ba2f23466d3f 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):

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

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

    app-misc/spacenavd: Support GCC 10
    
    Closes: https://bugs.gentoo.org/706966
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>
    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):

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

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

    app-misc/spacenavd: Support GCC 10
    
    Bug: https://bugs.gentoo.org/706966
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>
    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(-)