Build CVS snapshots for 'enblend' on Mac OS X using MacPorts

23 views
Skip to first unread message

Dominik Schlütter

unread,
Jan 4, 2008, 7:25:07 PM1/4/08
to hugin and other free panoramic software
Hi,

I've been trying to build the prerelease versions of 'enblend' and
'enfuse' on my mac, but I didn't like the way the tutorials like
<http://wiki.panotools.org/Enblend_Compiling_OSX> were tying those
builds to libraries from packet management tools like Fink or
MacPorts.

So I started to integrate those version into my MacPorts installation.
With <http://guide.macports.org/#development.local-repositories> it's
not that hard and as 'enblend' doesn't need any further patching,
creating the portfile was quite straightforward. Then I wanted to go
one step ahead and use the MacPorts system to create a static build,
so even those people without a MacPorts infrastructure on their macs
could use these apps. Unfortunately that was not so easy ... .

Anyway, I've written a small tutorial and some slightly longer notes
on that topic. If you're interested, have a look at <http://
dev.ultravelours.com/ports/enblend/> (no, right now there's nothing
else on that site). I'd really like to get some feedback on this
method, especially what you think of creating a "standalone" version
with MacPorts.

Regards,

Dominik.

Dominik Schlütter

unread,
Jan 18, 2008, 8:40:07 PM1/18/08
to hugin and other free panoramic software
Hi,

On 5 Jan., "Dominik Schlütter" <schlu...@gmx.net> wrote:

> Anyway, I've written a small tutorial and some slightly longer notes
> on that topic. If you're interested, have a look at <http://
> dev.ultravelours.com/ports/enblend/> (no, right now there's nothing
> else on that site). I'd really like to get some feedback on this
> method, especially what you think of creating a "standalone" version
> with MacPorts.

I've updated the site at <http://dev.ultravelours.com/ports/enblend/>,
but I didn't find a way to create a universal build (mainly due to
problems with the 'tiff' port).


Regards,

Dominik.

Harry van der Wolf

unread,
Jan 19, 2008, 2:52:53 AM1/19/08
to hugi...@googlegroups.com
You can't build libtiff universal with macports (as you already found out).

You can use the following method


2. Build x86 normally:

    ./configure --with-apple-opengl-framework
    make
    sudo make install
    cp libtiff/.libs/libtiff.3.dylib .
    cp libtiff/.libs/libtiffxx.3.dylib .
    cp libtiff/.libs/libtiff.a .


3. Build ppc:

    make clean
    ./configure --with-apple-opengl-framework CFLAGS="-arch ppc" CPPFLAGS="-arch ppc" LDFLAGS="-arch ppc"
    make

4. Create universal binary:

    sudo lipo -create libtiff.3.dylib libtiff/.libs/libtiff.3.dylib -output /usr/local/lib/libtiff.3.dylib
    sudo lipo -create libtiffxx.3.dylib libtiff/.libs/libtiffxx.3.dylib -output /usr/local/lib/libtiffxx.3.dylib
    sudo lipo -create libtiff.a libtiff/.libs/libtiff.a -output /usr/local/lib/libtiff.a

This will build libtiff as correct universal. It will install it in /usr/local. If you want it in /opt/local you need to add the prefix and change the last lipo command.

You can use that one to build universal enblend/enfuse, both dynamically and statically (thanks for your patch, just built enblend and enfuse as universal static). 
If you want it in macports /opt/local, the best is to use a standard macports install and then overwrite it with your universal libs.

Harry

Harry van der Wolf

unread,
Jan 19, 2008, 3:22:39 AM1/19/08
to hugi...@googlegroups.com
Just published universal stand-alone static builds of enblend and enfuse on my website as "enblend-enfuse_CVS20080118.tgz"

Note: I built them on Tiger based on the Tiger system libraries and frameworks. I don't know whether they work on Leopard. I'm building a universal portable enfuse and enblend wrapper package (see thread: "Call for support - Enblend/Enfuse 3.1 release"). I hope to release that one this weekend. That should work on all versions as of 10.3.9


@Dominik: Thanks for your patch for the static hack.

Hoi Harry

Dominik Schlütter

unread,
Jan 20, 2008, 7:57:44 AM1/20/08
to hugin and other free panoramic software
Hi,

On 19 Jan., Harry van der Wolf <harryvanderw...@home.nl> wrote:

> You can use the following method
>
> 1. Download fromftp://ftp.remotesensing.org/pub/libtiff
> 2. Build x86 normally:
>
>      ./configure --with-apple-opengl-framework
>      make
>      sudo make install
>      cp libtiff/.libs/libtiff.3.dylib .
>      cp libtiff/.libs/libtiffxx.3.dylib .
>      cp libtiff/.libs/libtiff.a .
>
> 3. Build ppc:
>
>      make clean
>      ./configure --with-apple-opengl-framework CFLAGS="-arch ppc"  
> CPPFLAGS="-arch ppc" LDFLAGS="-arch ppc"
>      make
>
> 4. Create universal binary:
>
>      sudo lipo -create libtiff.3.dylib libtiff/.libs/libtiff.3.dylib -
> output /usr/local/lib/libtiff.3.dylib
>      sudo lipo -create libtiffxx.3.dylib libtiff/.libs/libtiffxx.
> 3.dylib -output /usr/local/lib/libtiffxx.3.dylib
>      sudo lipo -create libtiff.a libtiff/.libs/libtiff.a -output /usr/
> local/lib/libtiff.a

I'm on a PPC machine, so it would be "the other way round", but thanks
for your instructions.

> This will build libtiff as correct universal. It will install it in /
> usr/local. If you want it in /opt/local you need to add the prefix  
> and change the last lipo command.

The main problem seems to be an endianess issue in the header files
for libtiff. Others ran into the same problem and found a workaround -
this fellow (also named Dominik :-) had a patch <http://www.dleo.de/
howto/imagemagick_fuer_os_x_kompilieren>.

> If you want it in macports /opt/local, the best is to use a standard  
> macports install and then overwrite it with your universal libs.

I used the MacPorts install and just split it into two parts. First I
downloaded, extracted and configured the sources with 'sudo port
configure tiff +universal'. Then I manually applied the fixes to
'tif_config.h' and 'tifconf.h'. Now I could finish it with 'sudo port
install tiff +universal'. This will pick up the current state and go
on with the freshly modified headers, so you don't need to mess with
'lipo'.

At the moment I'm building a fresh universal build of 'enblend' and
'enfuse', I'll update my instruction pages and the MacPorts ticket for
'tiff' if that's working for me.


Regards,

Dominik.

Reply all
Reply to author
Forward
0 new messages