I am trying to get the Linux game ‘Zarch’, which you can download from http://thom.best.vwh.net/software.html#zarch to work on Mac OS X. Said website, at least to my reading, suggests that it is X11 based, and thus presumably will work Mac OS X too.
I have downloaded both files, i.e. zarch-0.92.tar.gz and zarch-0.92-libc6.tar.gz. On unzipping the former I see a few executables, none of which will run “cannot execute binary file”.
Scratches head
Lightbulb
Presumably it needs recompiling for OS X:
So I download the 2nd file, assuming it may contain some source code which I may be able to work out how to compile.
Nada. No Zarch for me tonight!
As you can probably tell, I understand computer concepts very well but have no idea how to actually use the buggers. If someone here has a mac and does know how to use them I’m sure they can get this sorted in a couple of minutes (or tell me that it’s impossible or impractical)
Yes, it uses a format called Mach-O — as opposed to ELF, the format used on modern Linux systems. The ABIs of the two platforms might be different too (though I’m not sure), which would also ruin your fun even if the first obstacle didn’t.
If the files you’re downloading contain only pre-compiled executables and libraries for Linux, you’re out of luck. You will need the source code, to build the game from scratch. (And I can almost promise you that that won’t be sorted out in just a couple of minutes.)
But if the source code is available, and the authors made an effort to keep the code portable, and they made the build process easy, and if you have the ‘gcc’ compiler installed — well then, you’re practically done.
It’s possible to run Linux binaries on NetBSD (I know, not entirely relevant) but it isn’t possible to run them on MacOS X. Fink provides the closest you’ll get but that isn’t remotely useful, either: Fink gives you a bunch of applications from the Linux world specifically recompiled to run on MacOS X.
Your best bet is to bug the developer. Failing that, you can get VMWare, install Ubuntu, and run Linux applications that way.
I had used the converter below sometime before to convert very simple elf files to Mach-O .
But its an exe and I cannot run it from my laptop now…
Seems like a long shot, but if you have a Windows machine around it might be worth a try.
A virtual machine remains the best choice, I think.