Cannot compile xboard (GCC 10.4.0)
Posted: 04 Feb 2023, 19:26
I try to compile xboard and I get an error.
My OS is Linux Mageia 64. My GCC version is 10.4.0.
I downloaded xboard source code here. I clicked on tree and then on snapshot.
Here is the output of make command:
I have encountered that error in many C programs. It seems that latest GCC version is stricter than previous versions. Usually you just have to add extern keyword to fix it.
My OS is Linux Mageia 64. My GCC version is 10.4.0.
I downloaded xboard source code here. I clicked on tree and then on snapshot.
Here is the output of make command:
- Code: Select all
make all-recursive
make[1]: Entering directory '/home/roland/Documents/echecs/sources/xboard/HEAD-efc70b6'
Making all in po
make[2]: Entering directory '/home/roland/Documents/echecs/sources/xboard/HEAD-efc70b6/po'
make[2]: Leaving directory '/home/roland/Documents/echecs/sources/xboard/HEAD-efc70b6/po'
make[2]: Entering directory '/home/roland/Documents/echecs/sources/xboard/HEAD-efc70b6'
CCLD xboard
/usr/bin/ld: book.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: childio.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: gamelist.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: ngamelist.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: moves.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: parser.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: pgntags.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: uci.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: board.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: draw.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: draw.o:(.bss+0x8): multiple definition of `currPvInfo'; backend.o:(.bss+0x8): first defined here
/usr/bin/ld: dialogs.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: engineoutput.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: nengineoutput.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: evalgraph.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: evalgraph.o:(.bss+0x8): multiple definition of `currPvInfo'; backend.o:(.bss+0x8): first defined here
/usr/bin/ld: nevalgraph.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: nevalgraph.o:(.bss+0x8): multiple definition of `currPvInfo'; backend.o:(.bss+0x8): first defined here
/usr/bin/ld: history.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: nhistory.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: menus.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: usystem.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: gtk/xboard.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: gtk/xoptions.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: gtk/xtimer.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
/usr/bin/ld: gtk/xengineoutput.o:(.bss+0x0): multiple definition of `ics_type'; backend.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:846: xboard] Error 1
make[2]: Leaving directory '/home/roland/Documents/echecs/sources/xboard/HEAD-efc70b6'
make[1]: *** [Makefile:1372: all-recursive] Error 1
make[1]: Leaving directory '/home/roland/Documents/echecs/sources/xboard/HEAD-efc70b6'
make: *** [Makefile:715: all] Error 2
I have encountered that error in many C programs. It seems that latest GCC version is stricter than previous versions. Usually you just have to add extern keyword to fix it.