problem for compiling mzx on linux
#1
Posted 17 August 2006 - 06:17 PM
I'm trying to compile mzx (version mzx281csrc.tar.bz2 ) on linux (debian x86 and ppc), but it doesn't work (there are generally no problem for compiling sdl applications there).
I have all SDL dev. libraries, and the one for vorbis too.
All I got is :
****
robo_ed.cpp:(.text+0x3259): r?f?rence ind?finie vers ? XFree ?
collect2: ld returned 1 exit status
make: *** (mzx) Erreur 1
****
I've tried both with gcc 4 and gcc 3.4 and it's the same. What could I do ?
#2
Posted 17 August 2006 - 11:18 PM

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#3
Posted 18 August 2006 - 07:20 AM
Keep us informed,
RoSS
(also, moved to Technical Problems)
<img src="http://ross.box43.net/sig.php/sig.png" border="0" class="linked-sig-image" />
#4
Posted 18 August 2006 - 07:53 AM
No, it's not a lack of xfree86. Nobody needs that. XFree is just a 'free' function in X11. It's got nothing to do with xfree86. Remember that an undefined reference refers to a FUNCTION, not a whole library. Anyway, install your X11 development stuff (headers and libraries both) and see where that gets you.

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#5
Posted 18 August 2006 - 08:42 AM
<img src="http://ross.box43.net/sig.php/sig.png" border="0" class="linked-sig-image" />
#6
Posted 18 August 2006 - 02:55 PM
<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this
#7
Posted 18 August 2006 - 05:48 PM
This post has been edited by LogiCow: 18 August 2006 - 05:49 PM
#8
Posted 18 August 2006 - 07:31 PM
Anyway, it is obvious that this is a linker error, and has nothing to do with headers. Newer SDL libraries don't link against X11 explicitly, which leaves undefined symbols in MZX. Linking X11 manually is necessary for clipboard support.
You have two options. Either, if you don't care about the clipboard, edit config.h and remove the line referring to CONFIG_X11, or try this patch:
http://devzero.co.uk...11-linkage.diff
Apply the patch with:
patch -Np0 -i ~/path/to/patch
Then run ./config.sh and make again. Please, other people, don't bug Exophase about this. He's already merged the patch.
--ajs.
#9
Posted 18 August 2006 - 08:24 PM
thank you very much for the patch, it was exactly what was necessary, it compiled fine with it, and I can play MZX games now !

I'm sorry I couldn't enter more of the error log, the message board didn't like some code in it.
For the others, about xfree, it's much less used now, almost all linux distributions are using xorg instead. Maybe this undefined reference was because of this ?
#10
Posted 18 August 2006 - 09:29 PM
The problem is SDL's decision to no longer link against X11, but instead dlopen() it at runtime.
This was a very welcome change for developers like myself, because it allows SDL to be installed on embedded Linux platforms that have no X server, but still allow for an X11 option if a server is later deployed, or X11 connections are forwarded to another machine.
Unfortunately, since I could not have foreseen this action, MZX was not patched in 2.81c to take notice of it. Hopefully, Exo will do a 2.81d release in the near future that will include the patch.
--ajs.
#11
Posted 18 August 2006 - 10:14 PM

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#12
Posted 26 October 2006 - 07:50 PM
Sticky anybody?
#13
Posted 05 March 2011 - 08:43 PM