#63254 - 07/08/10 10:01 AM
Re: How to build SDLMESS 0.137 and later
[Re: R. Belmont]
|
Very Senior Member
Registered: 05/29/08
Posts: 3032
Loc: Germany
|
FWIW, I've had no problems on openSUSE 11.2 x64, GCC 4.4.1.
_________________________
We're searching for QMC2 translators & support for existing translations. Interested? See here!
|
|
Top
|
|
|
|
#63256 - 07/08/10 10:46 AM
Re: How to build SDLMESS 0.137 and later
[Re: R. Belmont]
|
Senior Member
Registered: 03/19/08
Posts: 138
Loc: Italy
|
I've successfully built u3 on ubuntu 10.04 (gcc 4.4), so it is definitely a problem related to 4.2. On the other hand, I can't build ldplayer, as the linker fails:
Linking ldplayer...
obj/sdl/ldplayer/libemu.a(ldpr8210.o): In function `global constructors keyed to pr8210_interface':
ldpr8210.c:(.text+0x4f3): undefined reference to `I8049'
ldpr8210.c:(.text+0x501): undefined reference to `I8748'
obj/sdl/ldplayer/libemu.a(ldv1000.o): In function `global constructors keyed to ldv1000_interface':
ldv1000.c:(.text+0x63): undefined reference to `Z80'
obj/sdl/ldplayer/libemu.a(ldvp931.o): In function `global constructors keyed to vp931_interface':
ldvp931.c:(.text+0xc3): undefined reference to `I8049'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device_config::z80ctc_device_config(machine_config const&, char const*, device_config const*, unsigned int)':
z80ctc.c:(.text+0x96b): undefined reference to `device_config_z80daisy_interface::device_config_z80daisy_interface(machine_config const&, device_config&)'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device_config::z80ctc_device_config(machine_config const&, char const*, device_config const*, unsigned int)':
z80ctc.c:(.text+0x9eb): undefined reference to `device_config_z80daisy_interface::device_config_z80daisy_interface(machine_config const&, device_config&)'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device::z80ctc_device(running_machine&, z80ctc_device_config const&)':
z80ctc.c:(.text+0xa53): undefined reference to `device_z80daisy_interface::device_z80daisy_interface(running_machine&, device_config const&, device_t&)'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device::z80ctc_device(running_machine&, z80ctc_device_config const&)':
z80ctc.c:(.text+0xc23): undefined reference to `device_z80daisy_interface::device_z80daisy_interface(running_machine&, device_config const&, device_t&)'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device_config::alloc_device(running_machine&) const':
z80ctc.c:(.text+0xfed): undefined reference to `device_z80daisy_interface::device_z80daisy_interface(running_machine&, device_config const&, device_t&)'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device_config::static_alloc_device_config(machine_config const&, char const*, device_config const*, unsigned int)':
z80ctc.c:(.text+0x12e6): undefined reference to `device_config_z80daisy_interface::device_config_z80daisy_interface(machine_config const&, device_config&)'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device_config::~z80ctc_device_config()':
z80ctc.c:(.text._ZN20z80ctc_device_configD1Ev[z80ctc_device_config::~z80ctc_device_config()]+0x32): undefined reference to `device_config_z80daisy_interface::~device_config_z80daisy_interface()'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device::~z80ctc_device()':
z80ctc.c:(.text._ZN13z80ctc_deviceD1Ev[z80ctc_device::~z80ctc_device()]+0x32): undefined reference to `device_z80daisy_interface::~device_z80daisy_interface()'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device::~z80ctc_device()':
z80ctc.c:(.text._ZN13z80ctc_deviceD0Ev[z80ctc_device::~z80ctc_device()]+0x32): undefined reference to `device_z80daisy_interface::~device_z80daisy_interface()'
obj/sdl/ldplayer/libemu.a(z80ctc.o): In function `z80ctc_device_config::~z80ctc_device_config()':
z80ctc.c:(.text._ZN20z80ctc_device_configD0Ev[z80ctc_device_config::~z80ctc_device_config()]+0x32): undefined reference to `device_config_z80daisy_interface::~device_config_z80daisy_interface()'
obj/sdl/ldplayer/libemu.a(z80ctc.o):(.rodata._ZTI13z80ctc_device[typeinfo for z80ctc_device]+0x28): undefined reference to `typeinfo for device_z80daisy_interface'
obj/sdl/ldplayer/libemu.a(z80ctc.o):(.rodata._ZTI20z80ctc_device_config[typeinfo for z80ctc_device_config]+0x28): undefined reference to `typeinfo for device_config_z80daisy_interface'
collect2: ld returned 1 exit status
I really can't figure out why.
_________________________
Master of Sarcastic Wit Linux User #182984
|
|
Top
|
|
|
|
#63268 - 07/08/10 01:21 PM
Re: How to build SDLMESS 0.137 and later
[Re: wallyweek]
|
Very Senior Member
Registered: 03/17/01
Posts: 13177
Loc: USA
|
ldplayer isn't buildable on anything in u3, as far as I know.
|
|
Top
|
|
|
|
#63274 - 07/08/10 02:34 PM
Re: How to build SDLMESS 0.137 and later
[Re: R. Belmont]
|
Senior Member
Registered: 03/19/08
Posts: 138
Loc: Italy
|
Ok, I'll strip it off from tools distribution until it builds again. Thanks! 
_________________________
Master of Sarcastic Wit Linux User #182984
|
|
Top
|
|
|
|
#63329 - 07/09/10 10:30 PM
Re: How to build SDLMESS 0.137 and later
[Re: etabeta78]
|
Member
Registered: 07/09/10
Posts: 2
|
Hello MAMErs!
i tried to build the new mame 0138u3 under FreeBSD 8.0, but have no luck - the following error occurred after compiling some seconds:
Compiling src/mame/mamedriv.c... In file included from src/emu/emu.h:76, from src/mame/mamedriv.c:18: src/emu/diimage.h:237: error: expected unqualified-id before '!' token src/emu/diimage.h:237: error: expected `)' before '!' token gmake: *** [obj/sdl/mame/mame/mamedriv.o] Error 1
So i looked into the source-files. In line 237 in src/emu/diimage.h i found the following
<snip> int feof() { check_for_file(); return core_feof(m_file); } </snip>
which seems ok to me, but i don't see the offending '!'. Maybe the preprocessor did something wrong, so i looked at the preprocessor-output, the corresponding line shows the following
<snip> int (!__isthreaded ? ((()->_flags & 0x0020) != 0) : (feof)()) { check_for_file(); return core_feof(m_file); } </snip>
which doesn't look right to me (but with a '!'). Wtf is going on here? I double-checked that i applied the patches correctly and my mame 0.138u3 tree is ok. Maybe there is something wrong with FreeBSDs gcc 4.2.1, so i tried it also with gcc 4.4.5 and 4.5.1 build from the ports, but with the same result. I don't think that my compiler-setup is broken, so here I'm lost...
Please help. Best regards, andi
|
|
Top
|
|
|
|
#63330 - 07/09/10 11:58 PM
Re: How to build SDLMESS 0.137 and later
[Re: _andi_]
|
Very Senior Member
Registered: 01/27/06
Posts: 3300
Loc: Trondheim, Norway
|
iirc, the problem is that feof is reserved in FreeBSD. the necessary fix will be in u4. to compile u3, I think you can simply mimic the feof-related changes which elbarto sent to Micko for MESS http://mess.dorando.at/svn/?rev=8421(mind that you only need the feof changes, the rest is for MESS and could break MAME u3)
|
|
Top
|
|
|
|
#63346 - 07/10/10 03:33 PM
Re: How to build SDLMESS 0.137 and later
[Re: etabeta78]
|
Member
Registered: 07/09/10
Posts: 2
|
Hey etabeta78,
thanks a lot - this helps, but i found another problem under FreeBSD.
<snip> Compiling src/emu/debug/debugcpu.c... src/emu/debug/debugcpu.c: In constructor 'device_debug::device_debug(device_t&, symbol_table*)': src/emu/debug/debugcpu.c:1610:67: error: 'class astring' has no member named '__sbtolower' gmake: *** [obj/sdl/mame/emu/debug/debugcpu.o] Error 1 </snip>
It seems there is a macro definition in <ctype.h>:
<snip> #define tolower(c) __sbtolower(c) </snip>
So i added the following to debugcpu.c right after the inclusion of <ctype.h>:
<snip> #include <ctype.h>
+#if defined(__FreeBSD__) +#undef tolower +#endif </snip>
I don't know, if this is the right way to do it, but i got mame linked.
Bye, _andi_
|
|
Top
|
|
|
|
|
4345 Members
9 Forums
7230 Topics
87155 Posts
Max Online: 183 @ 03/06/12 06:21 PM
|
|
|