Closed takase1121 closed 4 years ago
Sorry, that may not be the complete log, this should be it:
==> Making package: xava-git 0.6.2.3.r67.gcc4d03e-1 (Thu 21 May 2020 18:04:05 +08)
==> Checking runtime dependencies...==> Checking buildtime dependencies...
==> Retrieving sources... -> Cloning xava git repo...
Cloning into bare repository '/home/takase/aur/xava-git/xava'...
remote: Enumerating objects: 842, done.
remote: Counting objects: 100% (842/842), done.
remote: Compressing objects: 100% (465/465), done.
remote: Total 3394 (delta 520), reused 674 (delta 372), pack-reused 2552
Receiving objects: 100% (3394/3394), 1.27 MiB | 635.00 KiB/s, done.
Resolving deltas: 100% (2096/2096), done.==> Validating source files with sha1sums...
xava ... Skipped==> Extracting sources...
-> Creating working copy of xava git repo...Cloning into 'xava'...
done.==> Starting pkgver()...
==> Starting build()...-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done-- Detecting C compile features
-- Detecting C compile features - done-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done-- Detecting CXX compile features
-- Detecting CXX compile features - done-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3")
-- Checking for module 'fftw3'
-- Found fftw3, version 3.3.8
-- Not a Windows platform, can use POSIX now!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/takase/aur/xava-git/src/xava/build
Scanning dependencies of target xava
[ 7%] Building C object CMakeFiles/xava.dir/src/input/fifo.c.o
[ 15%] Building C object CMakeFiles/xava.dir/src/output/graphical_sdl.c.o
[ 23%] Building C object CMakeFiles/xava.dir/src/output/graphical_x.c.o
[ 30%] Building C object CMakeFiles/xava.dir/src/input/alsa.c.o
[ 38%] Building C object CMakeFiles/xava.dir/src/input/pulse.c.o
[ 46%] Building C object CMakeFiles/xava.dir/src/input/sndio.c.o
[ 53%] Building C object CMakeFiles/xava.dir/src/input/portaudio.c.o
[ 61%] Building C object CMakeFiles/xava.dir/src/misc/inode_watcher.c.o
[ 69%] Building C object CMakeFiles/xava.dir/src/output/graphical.c.o
[ 76%] Building C object CMakeFiles/xava.dir/src/shared.c.o
[ 84%] Building C object CMakeFiles/xava.dir/src/config.c.o
[ 92%] Building C object CMakeFiles/xava.dir/src/xava.c.o
[100%] Linking C executable xava
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical_x.c.o:(.bss+0x130): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical_x.c.o:(.bss+0x20): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical_x.c.o:(.bss+0x128): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical.c.o:(.bss+0x0): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical.c.o:(.bss+0x108): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical.c.o:(.bss+0x110): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/config.c.o:(.bss+0x0): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/config.c.o:(.bss+0x108): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/config.c.o:(.bss+0x110): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/xava.c.o:(.bss+0x0): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/xava.c.o:(.bss+0x108): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/xava.c.o:(.bss+0x110): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/xava.dir/build.make:269: xava] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/xava.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
It was not the code's problem. I suspect that GCC is behind this. Especially because my GCC seems really new (10? Heck, I thought I use 9.3)
Confirmed that compiling with GCC 9.3.0 works. Maybe someone can do further investigation with this?
Seems to work on 9.3 on mine system as well. Good catch. Am going to test on gcc 10 to see what's going on.
I haven't updated Arch in a while, let's see how this goes....
Yup, issue confirmed and fixed.
Turns out that GCC 10 has placed some restrictions on global variables and it now requires that it is specified by extern
, probably to keep variables shared within a single file but not outside of it.
I installed via AUR (xava-git) and got this linker error. Full log: