dMZX Forums: problem for compiling mzx on linux - dMZX Forums

Jump to content

If you are new to DMZX, please take the time to look over the FAQ pinned in General before asking a question.

Some simple tips when posting problems:

1) Read FAQs first, and then other recent bug posts and entries in the Bug Tracker. The problem has, often, been already addressed. Redundant reports just waste time.

2) Make sure you explain exactly when the problem happens. If impossible, narrow down the problem to a few possible causes.

3) Go into specifics about your computer and MZX settings. Are you running MZX on Windows, Linux, Mac OS, a PSP, or something else? What versions of these OSes (Tiger vs Leopard, XP vs Vista, 32-bit vs 64-bit, etc)? How is MZX set up? If your problem is regarding a certain aspect of MZX (such as the display), what are the relevant settings in the config file?

Thanks, Management.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

problem for compiling mzx on linux

#1 User is offline   farvardin 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 16-August 06

Posted 17 August 2006 - 06:17 PM

hello,

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 ?
0

#2 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,943
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 17 August 2006 - 11:18 PM

Er, I don't speak that language..whichever it is, but it seems to be a linker error, saying it can't find XFree. Honestly, XFree should be available to you so I don't really get why it isn't. But I don't run anything with X, so I can't really check this. You surely must have the X development libraries or whatever, maybe they're out of date? I dunno.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#3 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Post icon  Posted 18 August 2006 - 07:20 AM

It does say that it's an indefinite reference to XFree. If that's the case, you'll probably need XFree86, but I'm no Linux expert. It's a surprise to me that you have SDL (which requires some sort of window manager and graphical libraries). Although honestly, since you're running Debian, your best bet is probably apt-getting XFree.

Keep us informed,
RoSS

(also, moved to Technical Problems)
-RoSS
<img src="http://ross.box43.net/sig.php/sig.png" border="0" class="linked-sig-image" />
0

#4 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,943
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 18 August 2006 - 07:53 AM

Er, RoSS, I don't think he needs xfree86. Look at the way the function is used =p

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.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#5 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Post icon  Posted 18 August 2006 - 08:42 AM

Well I admit I usually don't know what I'm talking about when it comes to Lunix =)
-RoSS
<img src="http://ross.box43.net/sig.php/sig.png" border="0" class="linked-sig-image" />
0

#6 User is offline   GetDizzy 

  • Touch Fuzzy.
  • Group: DigiStaff
  • Posts: 3,576
  • Joined: 22-November 01
  • Gender:Other
  • Location:MA

Posted 18 August 2006 - 02:55 PM

yes, you need the development headers to your X11 libraries.
- Your Jumpy Neighborhood Admin

<@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
0

#7 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 18 August 2006 - 05:48 PM

It can't find it because it only has XLib?rer.

This post has been edited by LogiCow: 18 August 2006 - 05:49 PM

0

#8 User is offline   ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 18 August 2006 - 07:31 PM

If the message wasn't horribly corrupt I think it'd be easy to fix.

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.
0

#9 User is offline   farvardin 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 16-August 06

Post icon  Posted 18 August 2006 - 08:24 PM

Hello,

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 ?
0

#10 User is offline   ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 18 August 2006 - 09:29 PM

I explained the reason for the link error. Xorg is binary compatible with XFree, and Xorg symbols still match XFree ones (mostly).

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.
0

#11 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,943
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 18 August 2006 - 10:14 PM

totally unrelated fun fact-you don't need to use dlopen() or LoadLibrary() to load your shared libs any more! SDL's got a function for that now, too.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#12 User is offline   ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 26 October 2006 - 07:50 PM

Bump, because I've been asked about this three times this week and I'm sick of it.

Sticky anybody?
0

#13 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 05 March 2011 - 08:43 PM

I know this topic is 5 years old but I just had a quick question and didn't want to create a new topic to ask it. Has the issues with MZM files imported robotically still cause problems in Linux? I remember this being mentioned years back, but I couldn't see if it had been resolved.
Youtube - teabone3 - Twitter - teabone3 - Twitch - teabone3
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users