[ptx] OSX Compiling

JD Smith jdsmith at as.arizona.edu
Mon Apr 17 00:31:29 BST 2006


On Apr 15, 2006, at 7:29 PM, Daniel M. German wrote:

>
>
> I am not going to try to answer this question, although I think that
> Ippei is the ultimate expert on this. But I'll give my opinion on the
> whole process.
>
> It seems that the problem is some metadata/files that OS X needs to
> run an executable that uses the Carbon user interface.  So you need to
> use Xcode tools to generate them. From what I read once you have this
> metadata you could compile command line, but I did not get that
> far. I'll let Ippei elaborate on this issues.

Thanks for the follow-up.

 From what I read, that's not entirely the case.  You can build full  
Carbon .apps using automake/autoconf/etc, entirely from the command  
line.  In fact, XCode is just a front end to a host of command line  
tools (like gcc), and you can have both build systems coexist at once  
(for the convenience of using XTools).  For some high-level (and not  
terribly useful info) on this:

http://developer.apple.com/unix/crossplatform.html

> At the end of last year I was successful on compiling Hugin on my
> powerbook. It took a lot of patience from Ippei (to whom I am very
> grateful).
>
> The XCode version that I had in my laptop (I was traveling for several
> months with my laptop only) was different from Ippei's (I have the old
> 10.3 in my laptop, and the latest XCode will not install on it) and I
> had to recreate Hugin's XCode Project file from scratch. I find that
> the XCode project files are not portable, unless you have exactly the
> same directory structure in every machine. Hardly an optimal solution.
>
> I am back home and I have not tried (yet) to compile Hugin on my G5 (I
> just got an Intel Mini, but I haven't even unpacked it). I am one of
> those that would rather use the command line than the complex XCode
> user interface.

While I think it is great to include the XCode project, for the  
convenience of Mac coders out there, I think adopting the native  
Hugin (/panotools/vigra/boost/enblend/...) build system would go a  
long way to bringing mac users "into the fold" and making it easier  
to roll new releases, etc.

I know of at least one tool ("Platypus") that can run from the  
command line to wrap all the stuff in a .app bundle around an  
executable.  I also know that it can be completely done from scratch,  
since CVS builds of Emacs can create a Carbon Emacs.app, as simple as  
this:

> * BUILDING EMACS ON MAC OS X
>
> You should be able to build Emacs on Mac OS X by typing the following
> commands at the top-level directory after the source distribution is
> un-tarred.
>
>   ./configure --enable-carbon-app
>   make
>   make install
>
> The last step may fail if you do not have permissions to install.  If
> you try to install into /usr (with ./configure --prefix=/usr), then  
> you
> must install as root using the sudo command.  However, it is not
> recommended; see the notes section below for more details.
>
> The --enable-carbon-app specifies that the carbon GUI application
> should be installed into /Application.  If you want it to install in a
> different location, specify --enable-carbon-app=<mydir>

There's even a convenience script in the Emacs source to make an  
entire ".dmg" installer package (called "make-package").  Obviously  
Emacs has a very large and complex build system (since it targets  
every architecture known to man), but it proves that in principle it  
can be done.  Unfortunately, I don't know enough to understand how  
hard that would be to bring to hugin.

JD



More information about the ptx mailing list