Originally Posted by mochamame
I'm trying to compile Mame 0.179 on a 64 bit platform under Ubuntu 18.10. I'm trying to do this so I can use it with QMC2.

The above information was very helpful however I'm getting some other errors during the compilation process:

Code
Compiling src/mame/drivers/caswin.cpp...
../../../../../src/mame/drivers/z88.cpp: In member function ‘void z88_state::bankswitch_update(int, uint16_t, int)’:
../../../../../src/mame/drivers/z88.cpp:62:20: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 2 [-Werror=format-overflow=]
  sprintf(bank_tag, "bank%d", bank + 2);
                    ^~~~~~~~
../../../../../src/mame/drivers/z88.cpp:62:20: note: directive argument in the range [-2147483646, 2147483647]
../../../../../src/mame/drivers/z88.cpp:62:9: note: ‘sprintf’ output between 6 and 16 bytes into a destination of size 6
  sprintf(bank_tag, "bank%d", bank + 2);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [acorn.make:425: ../../../../linux_gcc/obj/x64/Release/src/mame/drivers/z88.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Compiling src/mame/video/arcadia.cpp...
../../../../../src/mame/machine/apple2.cpp: In member function ‘void apple2_state::apple2_update_memory()’:
../../../../../src/mame/machine/apple2.cpp:190:19: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 6 [-Werror=format-overflow=]
     sprintf(wbank,"bank%d",bank+1);
                   ^~~~~~~~
../../../../../src/mame/machine/apple2.cpp:190:19: note: directive argument in the range [-2147483647, 2147483647]
../../../../../src/mame/machine/apple2.cpp:190:12: note: ‘sprintf’ output between 6 and 16 bytes into a destination of size 10
     sprintf(wbank,"bank%d",bank+1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
../../../../../src/mame/drivers/nc.cpp: In member function ‘void nc_state::nc_refresh_memory_bank_config(int)’:
../../../../../src/mame/drivers/nc.cpp:306:16: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 6 [-Werror=format-overflow=]
  sprintf(bank1,"bank%d",bank+1);
                ^~~~~~~~
../../../../../src/mame/drivers/nc.cpp:306:16: note: directive argument in the range [-2147483647, 2147483647]
../../../../../src/mame/drivers/nc.cpp:306:9: note: ‘sprintf’ output between 6 and 16 bytes into a destination of size 10
  sprintf(bank1,"bank%d",bank+1);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
../../../../../src/mame/drivers/nc.cpp:307:16: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 6 [-Werror=format-overflow=]
  sprintf(bank5,"bank%d",bank+5);
                ^~~~~~~~
../../../../../src/mame/drivers/nc.cpp:307:16: note: directive argument in the range [-2147483643, 2147483647]
../../../../../src/mame/drivers/nc.cpp:307:9: note: ‘sprintf’ output between 6 and 16 bytes into a destination of size 10
  sprintf(bank5,"bank%d",bank+5);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Compiling src/mame/drivers/big10.cpp...
Compiling src/mame/drivers/forte2.cpp...
Compiling src/mame/drivers/msx.cpp...
Compiling src/mame/drivers/pengadvb.cpp...
../../../../../src/mame/drivers/atom.cpp: In member function ‘void atom_state::motor_w(int)’:
../../../../../src/mame/drivers/atom.cpp:607:20: error: ‘sprintf’ writing a terminating nul past the end of the destination [-Werror=format-overflow=]
   sprintf(devname, "%d", i);
                    ^~~~
../../../../../src/mame/drivers/atom.cpp:607:10: note: ‘sprintf’ output 2 bytes into a destination of size 1
   sprintf(devname, "%d", i);
   ~~~~~~~^~~~~~~~~~~~~~~~~~


Looks like some kind of format overflow? Any ideas how to fix this?

Thanks!


I could be wrong but I see -Werror which can usually be counteracted by adding NOWERROR=1 in your make string. Give that a try.