unable to build with gcc 10
Brought to you by:
amadvance
Unfortunately I was not able to build AdvanceMAME 3.9 on my amd64 Gentoo Box:
[...] /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/mame/linux/blend/misc.a(cavepgm.o):(.bss+0x450): multiple definition of `pgm_mainram'; obj/mame/linux/blend/igs.a(pgm.o):(.bss+0x48): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/mame/linux/blend/misc.a(cavepgm.o):(.bss+0x448): multiple definition of `pgm_bg_videoram'; obj/mame/linux/blend/igs.a(pgm.o):(.bss+0x40): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/mame/linux/blend/misc.a(cavepgm.o):(.bss+0x438): multiple definition of `pgm_videoregs'; obj/mame/linux/blend/igs.a(pgm.o):(.bss+0x30): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/mame/linux/blend/misc.a(cavepgm.o):(.bss+0x440): multiple definition of `pgm_tx_videoram'; obj/mame/linux/blend/igs.a(pgm.o):(.bss+0x38): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/mame/linux/blend/misc.a(cavepgm.o):(.bss+0x430): multiple definition of `pgm_rowscrollram'; obj/mame/linux/blend/igs.a(pgm.o):(.bss+0x28): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/mame/linux/blend/misc.a(cavepgm.o):(.bss+0x420): multiple definition of `pgm_sprite_a_region_allocate'; obj/mame/linux/blend/igs.a(pgm.o):(.bss+0x10): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/mame/linux/blend/misc.a(cavepgm.o):(.bss+0x428): multiple definition of `pgm_sprite_a_region'; obj/mame/linux/blend/igs.a(pgm.o):(.bss+0x18): first defined here collect2: error: ld returned 1 exit status make: *** [advance/emu.mak:719: obj/mame/linux/blend/advmame] Error 1
Found out there is already a downtream Gentoo bug (https://bugs.gentoo.org/706924). There is a hint the build failures may be specific to gcc 10.x.
I also tried building from current git master (https://github.com/amadvance/advancemame) but got the same issue.
Hi Erhard F.
The latset commit in the github repository should fix it.
Specifically the commit f8688cae05799a30cd5337e626a07fa9f004c0a3
Ciao,
Andrea
Yes, the commit fixes the issue for git-master and for 3.9. Thanks!