Difference between revisions of "Enblend Compiling OSX"

From PanoTools.org Wiki
Jump to navigation Jump to search
 
(26 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Building environment prerequisites ==
+
== Build Environment ==
  
# [http://developer.apple.com/tools/download/ Download] and install the XCode Tools version for the operating system on the machine that you will use for the building job.
+
* [http://developer.apple.com/tools/download/ Download] and install the XCode Tools version for the operating system on the machine that you will use for the building job.
# Install Fink for your environment and configure Fink to use the unstable repositories. See the [Fink FAQ] for information about the unstable packages and [Fink Downloads] for a package installer or source code for Fink (depending on your OS).
+
* Install either Fink or MacPorts. Select the one you prefer most.
 +
**'''Fink:''' Install Fink for your environment and configure Fink to use the unstable repositories. See the [http://www.finkproject.org/faq/usage-fink.php#unstable Fink FAQ] for information about the unstable packages and [http://www.finkproject.org/download/index.php Fink Downloads] for a package installer or source code for Fink (depending on your OS).
 +
**'''MacPorts:''' If you don't have it already, install MacPorts, which provides the <tt>port</tt> command, from [http://www.macports.org MacPorts], giving you compilable package access to thousands of pieces of open source software.  If you already have macports (formerly darwinports) installed, update it:  <blockquote><pre>$ sudo port selfupdate</pre>Make sure you have synced the latest port files:<pre>$ sudo port -d sync</pre></blockquote>
  
== Building and installing Enblend ==
+
== Building and installing Enblend/Enfuse ==
  
Fink itself provides access to an earlier build of Enblend3 - however, this is not the latest version, and may not even be properly compilable from Fink at the moment. The following instructions are geared towards those who want to install the latest version of Enblend (including the new companion tool, Enfuse). The instructions are split into two sections: 1) satisfying prerequisites, which must only be done once; and 2) building the latest Enblend/Enfuse source, which may be done as often as you'd like.
+
Both Fink and MacPorts provide access to an earlier build of Enblend3 - however, these are really outdated versions. The following instructions are geared towards those who want to install the latest version of Enblend and Enfuse. The instructions are split into two sections: 1) satisfying prerequisites, which must only be done once; and 2) building the latest Enblend/Enfuse source, which may be done as often as you'd like.
  
 
These instructions have been tested on OSX 10.4 and 10.5 on both x86 and PPC systems:
 
These instructions have been tested on OSX 10.4 and 10.5 on both x86 and PPC systems:
Line 12: Line 14:
 
=== Satisfying Enblend Dependencies and other Prerequisites ===
 
=== Satisfying Enblend Dependencies and other Prerequisites ===
  
 +
====Via Fink====
 
1. Install <tt>dependencies</tt>:
 
1. Install <tt>dependencies</tt>:
  
<blockquote><pre>% fink install lcms lcms-shlibs
+
<blockquote><pre>fink install lcms lcms-shlibs boost1.33 libtiff libtiff-shlibs libxmi libxmi-shlibs libjpeg libjpeg-shlibs libpng libpng-shlibs</pre></blockquote>
% sudo sed -i= 's/memory.h/\/usr\/include\/memory.h/' "/sw/include/lcms.h"
+
 
% fink install boost1.33 libtiff libtiff-shlibs libxmi libxmi-shlibs libjpeg libjpeg-shlibs</pre></blockquote>
+
Click yes to all questions from Fink.
 +
<br>Note: Fink also needs the Mercurial repository but based on your Python version you need to install mercurial-py24, mercurial-py25 or mercurial-py26.
 +
 
 +
2. Modify the lcms header file:
 +
 
 +
<blockquote><pre>sudo sed -i= 's/memory.h/\/usr\/include\/memory.h/' "/sw/include/lcms.h"</pre></blockquote>
 +
 
 +
====Via MacPorts====
 +
1. Install <tt>dependencies</tt>:
 +
 
 +
<blockquote><pre>sudo port install make lcms boost jpeg tiff libpng OpenEXR mercurial</pre></blockquote>
  
 
=== Building Enblend/Enfuse from the Latest Source ===
 
=== Building Enblend/Enfuse from the Latest Source ===
  
2. Download enblend from cvs,
+
3. Download enblend from the Mercurial repository,
  
<blockquote><pre>% cvs -z3 -d:pserver:anonymous@enblend.cvs.sourceforge.net:/cvsroot/enblend co -P enblend
+
<blockquote><pre>hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend enblend</pre></blockquote>
% cd enblend</pre></blockquote>
 
  
3. Setup environment variables:
+
On subsequent retrievals from the Mercurial repository you simply cd into the enblend development directory on your mac and you issue the following two commands:
 +
<blockquote>
 +
<pre>
 +
hg pull
 +
hg update
 +
</pre>
 +
</blockquote>
  
<blockquote><pre>% export CFLAGS='-I/sw/include -I/Developer/Headers/FlatCarbon'
 
% export LDFLAGS=-L/sw/lib
 
% export CXXFLAGS=$CFLAGS
 
% export CPPFLAGS=$CXXFLAGS
 
% export ACLOCAL_FLAGS="-I /sw/share/aclocal"
 
% export PKG_CONFIG_PATH="/sw/lib/pkgconfig:/usr/local/lib/pkgconfig"</pre></blockquote>
 
  
 
4. Build and install enblend
 
4. Build and install enblend
  
<blockquote><pre>% make -f Makefile.cvs
+
Enblend supports builds outside the source directory which will keep your source directory "clean". So <tt>cd</tt> into the source directory, create a build directory and <tt>cd</tt> into that directory. <br>We also need to create a makefile for our system when we download from the development repository. We do need to do that in the source directory.
% ./configure
+
<blockquote><pre>cd enblend
% make
+
make --makefile=Makefile.scm
% make install  
+
mkdir build
 +
cd build</pre></blockquote>
 +
====Via Fink====
 +
<blockquote><pre>CPPFLAGS=-I/sw/include LDFLAGS=-L/sw/lib ../configure --with-apple-opengl-framework
 +
make
 +
sudo make install
 +
</pre></blockquote>
 +
 
 +
====Via Macports====
 +
<blockquote><pre>CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ../configure --with-apple-opengl-framework
 +
make
 +
sudo make install  
 
</pre></blockquote>
 
</pre></blockquote>
  
 +
Enblend and Enfuse should now be installed in /usr/local/bin/ and ready to use; you may need to open a new terminal window in order for your shell to find the new binaries.
 +
 +
=== Troubleshooting ===
 +
''Note: These troubleshoot area is Fink related and might be completely outdated.''<br><br>
 +
If you see errors during <tt>make -f Makefile.cvs</tt> similar to the following, add autoconf2.5 and automake in fink.
 +
 +
<blockquote><pre>configure.in:22: error: possibly undefined macro: AC_DEFINE
 +
      If this token and others are legitimate, please use m4_pattern_allow.
 +
      See the Autoconf documentation.
 +
configure.in:30: error: possibly undefined macro: AC_MSG_WARN
 +
make: *** [all] Error 1</pre></blockquote>
 +
 +
If the prereq step tries to pull in db44 and it fails to compile, grab the binary of boost instead using <tt>sudo apt-get install boost1.33</tt>
 +
 +
== An alternative MacPorts build ==
  
 +
On the following page you will find [http://dev.ultravelours.com/ports/enblend/ these MacPorts instructions] which can also be used to create enblend and enfuse.
 
[[Category:Software:Hugin]] [[Category:Software:Platform:Mac OS X]]
 
[[Category:Software:Hugin]] [[Category:Software:Platform:Mac OS X]]

Latest revision as of 09:23, 21 May 2010

Build Environment

  • Download and install the XCode Tools version for the operating system on the machine that you will use for the building job.
  • Install either Fink or MacPorts. Select the one you prefer most.
    • Fink: Install Fink for your environment and configure Fink to use the unstable repositories. See the Fink FAQ for information about the unstable packages and Fink Downloads for a package installer or source code for Fink (depending on your OS).
    • MacPorts: If you don't have it already, install MacPorts, which provides the port command, from MacPorts, giving you compilable package access to thousands of pieces of open source software. If you already have macports (formerly darwinports) installed, update it:
      $ sudo port selfupdate

      Make sure you have synced the latest port files:

      $ sudo port -d sync

Building and installing Enblend/Enfuse

Both Fink and MacPorts provide access to an earlier build of Enblend3 - however, these are really outdated versions. The following instructions are geared towards those who want to install the latest version of Enblend and Enfuse. The instructions are split into two sections: 1) satisfying prerequisites, which must only be done once; and 2) building the latest Enblend/Enfuse source, which may be done as often as you'd like.

These instructions have been tested on OSX 10.4 and 10.5 on both x86 and PPC systems:

Satisfying Enblend Dependencies and other Prerequisites

Via Fink

1. Install dependencies:

fink install lcms lcms-shlibs boost1.33 libtiff libtiff-shlibs libxmi libxmi-shlibs libjpeg libjpeg-shlibs libpng libpng-shlibs

Click yes to all questions from Fink.
Note: Fink also needs the Mercurial repository but based on your Python version you need to install mercurial-py24, mercurial-py25 or mercurial-py26.

2. Modify the lcms header file:

sudo sed -i= 's/memory.h/\/usr\/include\/memory.h/' "/sw/include/lcms.h"

Via MacPorts

1. Install dependencies:

sudo port install make lcms boost jpeg tiff libpng OpenEXR mercurial

Building Enblend/Enfuse from the Latest Source

3. Download enblend from the Mercurial repository,

hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend enblend

On subsequent retrievals from the Mercurial repository you simply cd into the enblend development directory on your mac and you issue the following two commands:

hg pull
hg update


4. Build and install enblend

Enblend supports builds outside the source directory which will keep your source directory "clean". So cd into the source directory, create a build directory and cd into that directory.
We also need to create a makefile for our system when we download from the development repository. We do need to do that in the source directory.

cd enblend
make --makefile=Makefile.scm
mkdir build
cd build

Via Fink

CPPFLAGS=-I/sw/include LDFLAGS=-L/sw/lib ../configure --with-apple-opengl-framework
make
sudo make install 

Via Macports

CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ../configure --with-apple-opengl-framework
make
sudo make install 

Enblend and Enfuse should now be installed in /usr/local/bin/ and ready to use; you may need to open a new terminal window in order for your shell to find the new binaries.

Troubleshooting

Note: These troubleshoot area is Fink related and might be completely outdated.

If you see errors during make -f Makefile.cvs similar to the following, add autoconf2.5 and automake in fink.

configure.in:22: error: possibly undefined macro: AC_DEFINE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:30: error: possibly undefined macro: AC_MSG_WARN
make: *** [all] Error 1

If the prereq step tries to pull in db44 and it fails to compile, grab the binary of boost instead using sudo apt-get install boost1.33

An alternative MacPorts build

On the following page you will find these MacPorts instructions which can also be used to create enblend and enfuse.