Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
Hey guys a friend of mine who is a programmer posed a question to me about OSX. I dont know the answer so I'm wondering if any of you all do.
Heres the question...


"Does Mac OSX run Linux apps? I know that it's a Unix derivative, but I'm wanting to know if it's possible to run a Linux app in Mac OSX. This question arose because I'm trying to port some business-related apps that my department has written from the PC to Mac platform. These apps were written using Delphi, and I'm trying to avoid re-writing in a new language to do this. I can compile to a Linux executable from the same Delphi code using Borland Kylix, so if OSX runs Linux apps, this could be a solution."
 

iShater

macrumors 604
Aug 13, 2002
7,026
470
Chicagoland
No it won't be able to run the code. The code you are generating is still an x86 based executable, so it won't run on a Mac. What he would need to do is find something that can compile the Delphi code into a Mac executable, and I never heard of such a thing.
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
Originally posted by iShater
No it won't be able to run the code. The code you are generating is still an x86 based executable, so it won't run on a Mac. What he would need to do is find something that can compile the Delphi code into a Mac executable, and I never heard of such a thing.



is compiling the Delphi code into a Mac executable (if possible at all that is) the only way around this?
 

xlemming

macrumors newbie
Apr 27, 2002
21
0
California
yes you can run unix apps. I run gaim, kde, gnome all in tandem with the rest of my osx apps. Download fink and xfree86 or apple's x11 which is based on xfree. If you want to compile your own code you can run any unix app that is distributed by source. You cannont use x86 binaries, but there fink will take care of binaries for you.
 

Catfish_Man

macrumors 68030
Sep 13, 2001
2,579
2
Portland, OR
Clarification: Not all Linux apps will run on all Linux systems. PowerPC Linux apps will run on PowerPC computers, and they should either run, or be very easy to port to OSX (the GIMP was ported in under 24 hours). x86 Linux apps won't run on either PowerPC Linux or OSX without a recompile (which is very easy to do for most linux programs).
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Re: OSX and Linux apps?

Originally posted by krossfyter
Hey guys a friend of mine who is a programmer posed a question to me about OSX. I dont know the answer so I'm wondering if any of you all do.
Heres the question...


"Does Mac OSX run Linux apps? I know that it's a Unix derivative, but I'm wanting to know if it's possible to run a Linux app in Mac OSX. This question arose because I'm trying to port some business-related apps that my department has written from the PC to Mac platform. These apps were written using Delphi, and I'm trying to avoid re-writing in a new language to do this. I can compile to a Linux executable from the same Delphi code using Borland Kylix, so if OSX runs Linux apps, this could be a solution."

Whilst in general OSX will run Linux Apps if they are recompiled for OSX in this particular case they will not. This is because there is not a Kylix compiler for OSX and Linux Kylix will only compile x86 code, not PowerPC.
 

sparkleytone

macrumors 68020
Oct 28, 2001
2,307
0
Greensboro, NC
it all really depends on whether or not the code is making calls to the x86 infrastructure. if you know that it can work in Linux on PPC architecture, then getting it to work in Darwin should really only be a trivial task.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.