Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 3, 2013, 08:38 AM   #1
DenBeke
macrumors regular
 
Join Date: Aug 2011
Location: Antwerp
Cross compiling

Can I compile apps for FreeBSD on my Mac?
What do I need to do that?
DenBeke is offline   0 Reply With Quote
Old May 3, 2013, 09:28 AM   #2
mslide
macrumors 6502a
 
Join Date: Sep 2007
You're better off setting up a FreeBSD virtual machine, in VirtualBox or something, and compiling directly on FreeBSD.
mslide is offline   0 Reply With Quote
Old May 3, 2013, 09:52 AM   #3
DenBeke
Thread Starter
macrumors regular
 
Join Date: Aug 2011
Location: Antwerp
Yeah, maybe that's a better idea.
Thx!
DenBeke is offline   0 Reply With Quote
Old May 12, 2013, 02:49 PM   #4
Madd the Sane
macrumors 6502
 
Join Date: Nov 2010
Location: Utah
For the most part, configuring, building, and installing open-source software is almost exactly the same.

That being said, you most likely will run into dependancies, and that can cause headaches.

The best way to install open-source software is to use a package manager, like MacPorts. There's also Homebrew, which I haven't tried, and Fink, which I don't know if it supports 64-bit builds in most of their packages.
Madd the Sane is offline   0 Reply With Quote
Old May 12, 2013, 03:07 PM   #5
DenBeke
Thread Starter
macrumors regular
 
Join Date: Aug 2011
Location: Antwerp
of course, but I need(ed) to compile for FreeBSD...
DenBeke is offline   0 Reply With Quote
Old May 12, 2013, 04:29 PM   #6
Madd the Sane
macrumors 6502
 
Join Date: Nov 2010
Location: Utah
What, specifically, did you need from FreeBSD? OS X does have some BSD code in it.
Madd the Sane is offline   0 Reply With Quote
Old May 12, 2013, 05:46 PM   #7
AlanShutko
macrumors 6502
 
Join Date: Jun 2008
It sounds like you want to do the compile on your Mac, and then have a binary come out that will run on FreeBSD. Right?

That IS possible. Last time I did it (Linux compiling for AIX) it took building GCC from source and then the various libraries. It was not a small effort. Today, I would agree with the suggestion earlier to install FreeBSD on a vm and compile there. Much more straightforward and fewer headaches.
AlanShutko is offline   0 Reply With Quote
Old May 13, 2013, 08:12 AM   #8
DenBeke
Thread Starter
macrumors regular
 
Join Date: Aug 2011
Location: Antwerp
Quote:
Originally Posted by Madd the Sane View Post
What, specifically, did you need from FreeBSD? OS X does have some BSD code in it.
It's for a server, in the datacenter...

Quote:
Originally Posted by AlanShutko View Post
It sounds like you want to do the compile on your Mac, and then have a binary come out that will run on FreeBSD. Right?

That IS possible. Last time I did it (Linux compiling for AIX) it took building GCC from source and then the various libraries. It was not a small effort. Today, I would agree with the suggestion earlier to install FreeBSD on a vm and compile there. Much more straightforward and fewer headaches.
Indeed...
DenBeke is offline   0 Reply With Quote
Old May 18, 2013, 02:08 AM   #9
Mac_Max
macrumors 6502
 
Join Date: Mar 2004
Cross compiling from OS X is popular with Raspberry Pi hackers (though typically cross compiling Linux/Linux executables). You might want to check their forum.
Mac_Max is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
freebsd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT -5. The time now is 06:19 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC