Menu

Error compiling on Linux Mint 21

2022-07-20
2022-07-21
  • Joao Luiz Carvalho

    I got the following when trying to compile AdvanceMAME on a fresh install of Linux Mint 21 (beta):

    obj/mame/linux/blend/machine/pit8253.o
    obj/mame/linux/blend/machine/scsicd.o
    obj/mame/linux/blend/machine/scsihd.o
    obj/mame/linux/blend/machine/segacrpt.o
    obj/mame/linux/blend/machine/smc91c9x.o
    obj/mame/linux/blend/machine/ticket.o
    obj/mame/linux/blend/machine/timekpr.o
    obj/mame/linux/blend/machine/tmp68301.o
    obj/mame/linux/blend/machine/z80ctc.o
    obj/mame/linux/blend/machine/z80pio.o
    obj/mame/linux/blend/machine/z80sio.o
    obj/mame/linux/blend/vidhrdw/crtc6845.o
    obj/mame/linux/blend/vidhrdw/avgdvg.o
    obj/mame/linux/blend/vidhrdw/poly.o
    obj/mame/linux/blend/vidhrdw/res_net.o
    obj/mame/linux/blend/vidhrdw/tlc34076.o
    obj/mame/linux/blend/vidhrdw/tms34061.o
    obj/mame/linux/blend/vidhrdw/voodoo.o
    src/vidhrdw/voodoo.c: In function register_r:
    src/vidhrdw/voodoo.c:3679:9: warning: this if clause does not guard... [-Wmisleading-indentation]
     3679 |         if (regnum == cmdFifoRdPtr)
          |         ^~
    src/vidhrdw/voodoo.c:3682:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the if
     3682 |                 if (logit)
          |                 ^~
    src/vidhrdw/voodoo.c: In function add_rasterizer:
    src/vidhrdw/voodoo.c:4781:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     4781 |                                 (UINT32)info->callback,
          |                                 ^
    obj/mame/linux/blend/shared.a
    obj/mame/linux/blend/advmame
    /usr/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/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/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/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/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/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/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
    

    This is the first time I'm trying to compile AdvanceMAME on Linux Mint 21, but I have successfully compiled it on this computer on Lubuntu 18.04, and on other computers, on Linux Mint 20.

    I wonder if it has something to do with the Ubuntu 22.04 base using a newer libSDL, compared with Ubuntu 20.04 and earlier (I also had issues with Retropie on Linux Mint 21, and apparently it was related with this newer libSDL).

     
  • Andrea Mazzoleni

    Which gcc version is used ?

    You can get it with gcc --version

     
    • Joao Luiz Carvalho

      gcc 11.2.0

       
  • Andrea Mazzoleni

    It's something that should be fixed in the git code. You can get it from: https://github.com/amadvance/advancemame/

    Ciao,
    Andrea

     
  • Joao Luiz Carvalho

    That worked!! Thanks a bunch! :)

     

Log in to post a comment.