mamedev / mame

MAME
https://www.mamedev.org/
Other
8.41k stars 2.04k forks source link

link errors on SUBTARGET=mess or no subtarget #2199

Closed nczempin closed 7 years ago

nczempin commented 7 years ago

On Ubuntu 16.04.04, 64 bit, with GCC 5.4, I'm getting link errors on commit eb043927286cfd2481599cf4dac3ac2246d652bb (current master HEAD). Running with SUBTARGET=arcade works fine, it's only on SUBTARGET=mess and the full build

on tag mame0184 all 3 variants work.

nczempin commented 7 years ago

Linking mame64... ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model1.o): In function model1_state::snd_68k_ready_r(address_space&, unsigned int, unsigned short)': model1.cpp:(.text+0x117): undefined reference tosegam1audio_device::ready_r(address_space&, unsigned int, unsigned short)' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model1.o): In function model1_state::snd_latch_to_68k_w(address_space&, unsigned int, unsigned short, unsigned short)': model1.cpp:(.text+0x1b1): undefined reference tosegam1audio_device::write_fifo(unsigned char)' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model1.o): In function model1_state::model1_interrupt(timer_device&, void*, int)': model1.cpp:(.text+0x49d): undefined reference tosegam1audio_device::check_fifo_irq()' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model1.o): In function construct_machine_config_model1(machine_config&, device_t*, device_t*)': model1.cpp:(.text.unlikely+0x1785): undefined reference toSEGAM1AUDIO' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model1.o): In function construct_machine_config_model1_vr(machine_config&, device_t*, device_t*)': model1.cpp:(.text.unlikely+0x1fa2): undefined reference toSEGAM1AUDIO' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model1.o): In function device_finder<segam1audio_device, true>::findit(bool)': model1.cpp:(.text._ZN13device_finderI18segam1audio_deviceLb1EE6finditEb[_ZN13device_finderI18segam1audio_deviceLb1EE6finditEb]+0x43): undefined reference totypeinfo for segam1audio_device' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model2.o): In function model2_state::model2o_serial_w(address_space&, unsigned int, unsigned int, unsigned int)': model2.cpp:(.text+0x10e7): undefined reference tosegam1audio_device::ready_r(address_space&, unsigned int, unsigned short)' model2.cpp:(.text+0x10fc): undefined reference to segam1audio_device::write_fifo(unsigned char)' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model2.o): In functionmodel2_state::model2_serial_w(address_space&, unsigned int, unsigned int, unsigned int)': model2.cpp:(.text+0x11c9): undefined reference to segam1audio_device::ready_r(address_space&, unsigned int, unsigned short)' model2.cpp:(.text+0x11df): undefined reference tosegam1audio_device::write_fifo(unsigned char)' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model2.o): In function construct_machine_config_model2o(machine_config&, device_t*, device_t*)': model2.cpp:(.text.unlikely+0x6a22): undefined reference toSEGAM1AUDIO' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model2.o): In function construct_machine_config_manxttdx(machine_config&, device_t*, device_t*)': model2.cpp:(.text.unlikely+0x7582): undefined reference toSEGAM1AUDIO' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(model2.o): In function device_finder<segam1audio_device, false>::findit(bool)': model2.cpp:(.text._ZN13device_finderI18segam1audio_deviceLb0EE6finditEb[_ZN13device_finderI18segam1audio_deviceLb0EE6finditEb]+0x23): undefined reference totypeinfo for segam1audio_device' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(stv.o): In function stv_state::batmanfr_sound_comms_w(address_space&, unsigned int, unsigned int, unsigned int)': stv.cpp:(.text+0x1c3): undefined reference toacclaim_rax_device::data_w(address_space&, unsigned int, unsigned short, unsigned short)' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(stv.o): In function construct_machine_config_batmanfr(machine_config&, device_t*, device_t*)': stv.cpp:(.text.unlikely+0x57ea): undefined reference toACCLAIM_RAX' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsega.a(stv.o): In function device_finder<acclaim_rax_device, false>::findit(bool)': stv.cpp:(.text._ZN13device_finderI18acclaim_rax_deviceLb0EE6finditEb[_ZN13device_finderI18acclaim_rax_deviceLb0EE6finditEb]+0x43): undefined reference totypeinfo for acclaim_rax_device' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsony.a(zn.o): In function zn_state::nbajamex_80_w(address_space&, unsigned int, unsigned short, unsigned short)': zn.cpp:(.text+0x8c3): undefined reference toacclaim_rax_device::data_w(address_space&, unsigned int, unsigned short, unsigned short)' ../../../../linux_gcc/bin/x64/Release/mame_mame/libsony.a(zn.o): In function construct_machine_config_nbajamex(machine_config&, device_t*, device_t*)': zn.cpp:(.text.unlikely+0x33ed): undefined reference toACCLAIM_RAX' collect2: error: ld returned 1 exit status mame.make:250: recipe for target '../../../../../mame64' failed make[2]: [../../../../../mame64] Error 1 Makefile:1006: recipe for target 'mame' failed make[1]: [mame] Error 2 makefile:1244: recipe for target 'linux_x64' failed make: *** [linux_x64] Error 2

sry about the broken formatting

rb6502 commented 7 years ago

You need to make clean; mixing objects between different git pulls is not guaranteed to work.

nczempin commented 7 years ago

The error occurred before I ever changed the branch.

It also occurs when I do make clean, and in some cases with REGENIE=1.

The only thing that's helped so far is working from a pristine repo.

nczempin commented 7 years ago

doing git clean -fx also seems to help

startaq commented 7 years ago

Closing this, SUBTARGET=mess isn't guaranteed to work anymore.