New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

compiling Linux app for OS X


Post Reply New Thread Subscribe

 
Thread Tools
johnny_canuck

 
Member Since: Apr 23, 2009
Posts: 3
johnny_canuck is on a distinguished road

johnny_canuck is offline
Greetings -

I'm a Linux user who has been asked by a small but growing (and typically vocal) group of Mac users to compile a particular technical application I help maintain (mathematical statistics) so it will run under OS X. I don't have access to a Mac (out of the 100+ machines in my department, there are zero Macs...), so I'm looking to see if its possible to flip the right compiler flags (gcc all the way) to compile for Intel-based Macs running OS X. In other words, compile for Intel CPU (-march intel) under Linux, and send the binary to someone to run under OS X. I can do this for Windows, but this is the first time I've had a Mac user make the request. I've poked around a bit, and all I've found is how to do the port/compile *on* a Mac. I don't have that situation. I have a Linux box (many, in fact), and need to comiple a OS X-compatible binary on it. I rather assume its doable, if I statically compile libs into the binary, but I was wondering if there are other things (Mac-specific) I need to consider. Note: this is a 'real' technical application - command line, no GUI, no nothing. So, no issues about Gnome or KDE libs and such.

Apologies if this should go in another section of the forum, but this was my first best guess.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,029
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
I can't help too much on the technical side but I'm sure if you are willing to do so, some members here might be willing to compile the program for you (myself included - I would need detailed instructions as to what flags to include for gcc though).

If this group is so vocal, why not borrow one of their machines?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
johnny_canuck

 
Member Since: Apr 23, 2009
Posts: 3
johnny_canuck is on a distinguished road

johnny_canuck is offline
Quote:
Originally Posted by vansmith View Post
I can't help too much on the technical side but I'm sure if you are willing to do so, some members here might be willing to compile the program for you (myself included - I would need detailed instructions as to what flags to include for gcc though).
Alas, portions of the code aren't GPL (proprietary), and I can't release the code beyond certain specified machines.

Quote:
If this group is so vocal, why not borrow one of their machines?
Well, if they were (i) at my institution, and (ii) willing to give me a machine for a day or so, then sure - but, they're not. And, as per OP, there isn't a single Mac in my building. My best recourse, though, will be to see if I can find someone within the larger institution I work at with a Mac that would let me access theirs for a bit.

What I've learned since my OP is that even if I static compile all the libs, even if its the same chip (more or less same Intel arch), it won't work, since OS X uses a different standard for binary executables the *nix. Too bad.

Ah well...
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,029
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Quote:
Originally Posted by johnny_canuck View Post
Alas, portions of the code aren't GPL (proprietary), and I can't release the code beyond certain specified machines.
Fair enough. I had assumed it was FLOSS.

Quote:
Originally Posted by johnny_canuck View Post
Well, if they were (i) at my institution, and (ii) willing to give me a machine for a day or so, then sure - but, they're not. And, as per OP, there isn't a single Mac in my building.
Surely one of them owns a MacBook or MacBook Pro.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
johnny_canuck

 
Member Since: Apr 23, 2009
Posts: 3
johnny_canuck is on a distinguished road

johnny_canuck is offline
Quote:
Originally Posted by vansmith View Post
Surely one of them owns a MacBook or MacBook Pro.
Nope - we're still pure (although I think I spotted our first iPhone last week).
QUOTE Thanks
DairyKnight

 
DairyKnight's Avatar
 
Member Since: Apr 27, 2009
Posts: 3
DairyKnight is on a distinguished road

DairyKnight is offline
If you release the source code, there shouldn't be any problem for the Mac user to compile it. Make sure the end user has XCode installed. It comes with all the gcc and autotools you'll need.

Another thing is, make sure you run necessary commands with 'sudo'. The same story in Ubuntu.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,029
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Quote:
Originally Posted by johnny_canuck View Post
Alas, portions of the code aren't GPL (proprietary), and I can't release the code beyond certain specified machines.
Quote:
Originally Posted by DairyKnight View Post
If you release the source code, there shouldn't be any problem for the Mac user to compile it. Make sure the end user has XCode installed. It comes with all the gcc and autotools you'll need.
The code has to stay with him.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
I think you'll run into difficulties compiling an app for one OS on another. Find someone that'll sign an NDA and have them compile it, then you have a releasable binary

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks

Post Reply New Thread Subscribe


« Carbon or not? | How to make useful a non-native application in Mac OS X 10.5 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
What is your opinion on the future of Linux and the Mac? RickR Schweb's Lounge 17 05-09-2008 05:47 AM
Compiling linux code metalsam OS X - Development and Darwin 5 07-14-2007 08:04 AM
App to mount Linux filesystems jakeroberts OS X - Apps and Games 2 06-14-2007 07:17 PM
compiling linux apps to run on mac metalsam OS X - Development and Darwin 2 04-08-2007 12:24 PM
XP, Vista, Ubuntu and then back home Kenotic Switcher Hangout 20 03-02-2007 01:29 AM

All times are GMT -4. The time now is 06:46 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?