Closed gardotd426 closed 4 years ago
Add -fcommon
to your CFLAGS. That should fix it.
CFLAGS=-fcommon make
cc -Isrc/include `pkg-config --cflags gtk+-3.0` src/*.c src/ss/*.c -o zenmonitor `pkg-config --libs gtk+-3.0` -lm -no-pie -Wall
/usr/bin/ld: /tmp/cc1I06we.o:(.bss+0x0): multiple definition of `display_coreid'; /tmp/ccdYIWOe.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccWhTeye.o:(.bss+0x0): multiple definition of `display_coreid'; /tmp/ccdYIWOe.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccGAfYne.o:(.bss+0x0): multiple definition of `display_coreid'; /tmp/ccdYIWOe.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccfvkBLf.o:(.bss+0x0): multiple definition of `display_coreid'; /tmp/ccdYIWOe.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/cc3YksPd.o:(.bss+0x0): multiple definition of `display_coreid'; /tmp/ccdYIWOe.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:6: build] Error 1
@gardotd426 put -fcommon
on the makefile at the end of the cc command in build section
Maintainer of the AUR package zenmonitor-git
here, I added a patch so it builds again now.
I will however also open a PR in a minute that fixes the issue upstream.
Trying to build this on an up-to-date Arch or Manjaro (or other Arch derivative) will fail, with the following errors:
This is with both the
zenmonitor
andzenmonitor-git
AUR packages, as well as trying to build directly from this repo. The issue is GCC 10, after downgrading to 9.3, the build succeeds and the program works perfectly.