Compiling Firenzina with gcc10

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

pferd
Posts: 134
Joined: Thu Jul 24, 2014 2:49 pm

Compiling Firenzina with gcc10

Post by pferd »

I am running Ubuntu 21.04 here. When I try to compile Firenzina (https://github.com/Censor/Firenzina) with the default gcc-10 I get a ton of linker errors (around 2300 int total)

They look like:

Code: Select all

(.text+0x0): multiple definition of `ExtendInCheck'; main.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: utility.o (symbol from plugin): in function `log_filename':
(.text+0x0): multiple definition of `CountLimit'; main.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: utility.o (symbol from plugin): in function `log_filename':
(.text+0x0): multiple definition of `AspirationWindow'; main.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: utility.o (symbol from plugin): in function `log_filename':
(.text+0x0): multiple definition of `BulkName'; main.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: utility.o (symbol from plugin): in function `log_filename':
(.text+0x0): multiple definition of `BulkDirectory'; main.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: utility.o (symbol from plugin): in function `log_filename':
(.text+0x0): multiple definition of `TripleMaxUsage'; main.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: utility.o (symbol from plugin): in function `log_filename':
When I tried the old gcc-9 it compiles just fine. Is there an easy way to get it compile with gcc-10, so I can remove gcc-9 again?

Best regards
mar
Posts: 2559
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Compiling Firenzina with gcc10

Post by mar »

well, you can try and fix the code. how could gcc-9 even allow that to link is beyond me (probably the linker merged the globals?)

fire.h contains lot of globals and is included from multiple c files => should have been declared extern and defined in a single .c file
Martin Sedlak
pferd
Posts: 134
Joined: Thu Jul 24, 2014 2:49 pm

Re: Compiling Firenzina with gcc10

Post by pferd »

That was the answer I was expecting. Reworking the code is no option for me and I will just keep my compile for the future.

At least I learned something from this.
Ras
Posts: 2488
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Compiling Firenzina with gcc10

Post by Ras »

pferd wrote: Sat Jun 12, 2021 12:00 pmWhen I tried the old gcc-9 it compiles just fine. Is there an easy way to get it compile with gcc-10, so I can remove gcc-9 again?
The proper way would be fixing the broken code, but the quick and dirty workaround is adding "-fcommon" to your compiler options.
Rasmus Althoff
https://www.ct800.net