how to cross compile?

Ryan Schmidt ryandesign at macports.org
Fri Apr 1 01:59:47 PDT 2011


On Apr 1, 2011, at 03:33, Chris Murphy wrote:

> On Apr 1, 2011, at 2:27 AM, Ryan Schmidt wrote:
>> 
>> I am not certain if you need to add --host. I frequently see the message "If you meant to cross compile, use `--host'" fly by when building ports universal, and there is no need to add the flag. If you do need to add a block to a portfile, the portfile's location can be easily obtained by running "port file smartmontools". Or you can display the portfile contents in the terminal by running "port cat smartmontools" or edit it with your editor by running "port edit smartmontools".
> 
> I will give this a shot, thanks. It's frustrating to spend this much time on a 500KB program that requires a 4+GB installation of XCode and several hundred MB of Macports. It surprises me there aren't compiled binaries of this software floating around somewhere or I'd just download that. Compiling this myself is the last thing I really want to do. It's not fun, nor efficient.

Why don't you install Xcode and MacPorts on the machine you actually want to use this software on, and compile it there? That would be much simpler and more likely to succeed. MacPorts might be able to cross-compile, but that's not its primary purpose and that's not well-tested.

>> Note that Mac OS X's core operating system is called Darwin. (Rhapsody is what Mac OS X Server 1.x was based on, before Mac OS X 10.x and Mac OS X Server 10.x were available.)
>> 
>> http://en.wikipedia.org/wiki/Rhapsody_(operating_system)
> 
> Yeah I figured the Macports documentation example was that ancient, but was lazy and copy pasted that line with just the arch and version changes.

The first version of DarwinPorts (what MacPorts used to be called) didn't appear until years after Mac OS X was already called Darwin, hence its name. The example in the Guide is probably from some very ancient piece of software for which we wanted to write a portfile, which piece of software had not been updated for the Rhapsody -> Darwin name change.

I have replaced that section in the Guide with a more up-to-date version.




More information about the macports-users mailing list