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

Similar Threads
thread Thread Starter Forum Replies Last Post
Need help compiling c files Paulie87 Mac Programming 27 Mar 11, 2014 08:00 PM
Litecoin compiling issue WilsonNL OS X Mavericks (10.9) 0 Feb 12, 2014 10:09 AM
Compiling for Powerpc, how to? skinniezinho PowerPC Macs 12 Jun 21, 2013 04:10 AM
Cross compiling for windows using Xcode e-r-a-n Mac Programming 3 Dec 2, 2012 12:58 PM
C++ compiling issues Marcus89 Mac Programming 2 Sep 20, 2012 08:24 AM

Forum Jump

All times are GMT -5. The time now is 07:33 PM.

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

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