Problem source aur compilation with gcc10

i have a problem with the gcc10
I have problem for example to build AUR polyglot-winboard-git
multiple definition of `pgheader_magic’; book_make …
and in fact it false in the code.
there was no problem with march release to compile same source from AUR.
I need it to plug it with xboard gui because i develop an uci engine. nonetheless i will add winboard protocol :wink: then no dependance.
If someone have an idea …

It is not isolate problem, same with cboard compilation.
After searching i have found the fact in forum
linuxQuestion and it is link with the gcc 10 version.
If it can help.

Please try to better describe the issue and steps taken to get there, e.g.

baph -inN polyglot-winboard-git

command error output

/usr/bin/ld: book_merge.o:(.bss+0x0): multiple definition of `pgheader_magic'; book_make.o:(.bss+0x0): first defined here
/usr/bin/ld: book_merge.o:(.bss+0x8): multiple definition of `pgheader_version'; book_make.o:(.bss+0x8): first defined here
/usr/bin/ld: pgheader.o:(.data.rel.local+0x0): multiple definition of `pgheader_magic'; book_make.o:(.bss+0x0): first defined here
/usr/bin/ld: pgheader.o:(.data.rel.local+0x8): multiple definition of `pgheader_version'; book_make.o:(.bss+0x8): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:305: polyglot] Error 1
make[1]: Leaving directory '/tmp/makepkg/polyglot-winboard-git/src/polyglot'
make: *** [Makefile:211: all] Error 2
==> ERROR: A failure occurred in build().
:: Exited polyglot-winboard-git build early

The issue is an error in the code, not the package. Without some hacks to fix the author’s problems there’s nothing AUR helpers can do about this, it should be flagged as broken and upstream. This seems to be the case going back about 7 years![1] of commits with current gcc. There is another branch in that git repo that seems to be compiling at least. When building from the AUR we have the ability to edit the build files before building, we’ll use this to change the source array in the PKGBUILD[2] to use the learn[1] branch like so

baph -i polyglot-winboard-git
# we want to edit it so yes
:: View/Edit the PKGBUILD for polyglot-winboard-git? [Y/n] y

# in the editor now
# change
# to use #branch=learn

# back in the shell
:: Continue building polyglot-winboard-git? [Y/n] y
# finish install

I have no clue if the branch is stable or what but given that the master branch has a linker error (/usr/bin/ld) can it really be worse?


1 Like

thanks @natemaia
Yes i have change the tittle and some text and i will post more details.
Thanks for your response and with your solution all is fine.
Many many thanks natemaia
Another solution for c program in aur is ot use in the makefile