Differences between revisions 2 and 3
Revision 2 as of 2008-05-01 19:53:19
Size: 1133
Editor: root
Comment:
Revision 3 as of 2008-05-09 08:01:58
Size: 9042
Editor: root
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Building on 10.5 is highly recommended over 10.4 because of compilation problems, bad version of built-in python, and less included dependencies. These instructions will only cover 10.5. Building on x86 and ppc should both be supported. For 64 bit support, either use one of the prebuilt packages or follow the instructions for distribution; getting all dependencies working correctly on 64 bit requires patches in many cases and is more complex. Building on 10.5 is highly recommended over 10.4 because of compilation problems, old version of built-in python, and less included dependencies. These instructions will only cover 10.5. Building on x86 and ppc should both be supported. For 64 bit support, either use one of the prebuilt packages or follow the instructions for distribution; getting all dependencies working correctly on 64 bit requires patches in many cases.
Line 9: Line 9:
= DEPENDENCIES = = DEPENDENCIES TO INSTALL =
Line 11: Line 11:
 * boost (1_34_1)  * boost (1.34.1)
Line 16: Line 16:
 * jpeg (v6b)
 * Qt/Mac (3.3.8)
 * jpeg (6b)
 * Qt/X11 (3.3.8)
Line 22: Line 22:
(recommended versions; source available here ["MacOSXBuildFiles"]) (verisons I have used in my own builds. I have placed copies of all srcs in ["MacOSXBuildFiles"])
Line 24: Line 24:
png is included in 10.5.

You may either compile each dependency by hand, or use a package manager such as Fink or MacPorts. I personally prefer
Building manually is recommended over using a package manager such as fink or macports, which cause significant difficulties by compiling and linking against their own python distributions. It is preferred to use the system built-in python.
Line 29: Line 27:

= BUILDING DEPENDENCIES =

== CMAKE ==

{{{
./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install
}}}



== SZIP ==

{{{
./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install
}}}


== GSL ==

{{{
./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install
}}}


== BOOST ==

{{{
./configure --with-toolset=darwin --with-libraries=python
make
sudo make install
}}}


== JPEG ==

libjpeg is very old (1998) and needs much work to compile properly on a modern system. Patches from MacPorts (http://trac.macports.org/browser/trunk/dports/graphics/jpeg/files
) or download from ["MacOSXBuildFiles"] page.

{{{
for i in patch-*;do patch < $i;done
}}}

{{{
./configure --prefix=$PREFIX --disable-dependency-tracking --disable-static --enable-shared
make
make install
}}}


== TIFF ==

{{{
./configure --prefix=$PREFIX --disable-dependency-tracking --disable-static --enable-shared CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
make
make install
}}}


== HDF5 ==

{{{
./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install
}}}



== FFTW2 ==

{{{
./configure --enable-float --disable-fortran --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install
}}}

EMAN expects srfftw.h, sfftw.h. After install, go to the include directory ( /usr/local/include ) and make these links:

{{{
ln -s fftw.h sfftw.h
ln -s rfftw.h srfftw.h
}}}


== Qt3/X11 ==

This is a major pain to install... I'll finish these instructions real soon once I actually get Qt3/X11 to compile on Mac. :)

-----

= BUILD EMAN =

Run cmake with the EMAN source directory as the argument. Use default options except those below. You may need to enter advanced mode ('t' key) to set some. Note: set EMAN_INSTALL_PREFIX to your home directory, or /usr/local/EMAN, or similar.

{{{
 BOOST_INCLUDE_PATH /usr/local/include/boost-1_34_1
 BOOST_LIBRARY /usr/local/libboost_python-1_34_1.dylib
                                                                                                               
 CMAKE_BACKWARDS_COMPATIBILITY 2.4
                                                                                                            
 CMAKE_CXX_FLAGS -mmacosx-version-min=10.5
 CMAKE_C_FLAGS -mmacosx-version-min=10.5

                                                                                                        
 CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk
 CMAKE_VERBOSE_MAKEFILE ON
 EMAN_INSTALL_PREFIX /Users/irees/EMAN
                                                                                                                     
 FFTW_INCLUDE_PATH /usr/local/include
 FFTW_LIBRARY /usr/local/libfftw.dylib
 GSL_CBLAS_LIBRARY /usr/local/libgslcblas.dylib
 GSL_INCLUDE_PATH /usr/local/include
 GSL_LIBRARY /usr/local/libgsl.dylib
 HDF_INCLUDE_PATH /usr/local/include
 HDF_LIBRARY /usr/local/libhdf5.dylib
 JPEG_LIBRARY /usr/local/libjpeg.dylib
 PNG_INCLUDE_PATH /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/
 PNG_LIBRARY /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng.dylib
 PYTHON_INCLUDE_PATH /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/Headers
 PYTHON_LIBRARY /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libpython.dylib
 QT_INCLUDE_DIR /usr/local/qt3/include
 QT_MOC_EXECUTABLE /usr/local/qt3/bin/moc
 QT_QT_LIBRARY /usr/local/libqt.dylib
 QT_UIC_EXECUTABLE /usr/local/qt3/bin/uic
 RFFTW_LIBRARY /usr/local/librfftw.dylib
 TIF_INCLUDE_PATH /usr/local/include
 TIF_LIBRARY /usr/local/libtiff.dylib
 X11_X11_INCLUDE_PATH /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/
 X11_X11_LIB /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libX11.dylib
 X11_Xext_LIB /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libXext.dylib
 X11_Xlib_INCLUDE_PATH /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/
 X11_Xutil_INCLUDE_PATH /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/
 Z_LIBRARY /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libz.dylib
}}}

PREFACE

This page contains instructions on compiling EMAN for OS X for use on a single machine. Instructions for a distributable build, that includes all dependencies inside a single package, are here: [:EMAN_COMPILE_MacOS_X_for_Distribution:]

Building on 10.5 is highly recommended over 10.4 because of compilation problems, old version of built-in python, and less included dependencies. These instructions will only cover 10.5. Building on x86 and ppc should both be supported. For 64 bit support, either use one of the prebuilt packages or follow the instructions for distribution; getting all dependencies working correctly on 64 bit requires patches in many cases.


DEPENDENCIES TO INSTALL

  • boost (1.34.1)
  • cmake (2.4.8)
  • fftw (2.1.5)
  • gsl (1.8)
  • hdf5 (1.6.6)
  • jpeg (6b)
  • Qt/X11 (3.3.8)
  • szip (2.1)
  • tiff (3.8.2)
  • zlib (1.2.1)

(verisons I have used in my own builds. I have placed copies of all srcs in ["MacOSXBuildFiles"])

Building manually is recommended over using a package manager such as fink or macports, which cause significant difficulties by compiling and linking against their own python distributions. It is preferred to use the system built-in python.


BUILDING DEPENDENCIES

CMAKE

./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install

SZIP

./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install

GSL

./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install

BOOST

./configure --with-toolset=darwin --with-libraries=python
make
sudo make install

JPEG

libjpeg is very old (1998) and needs much work to compile properly on a modern system. Patches from MacPorts (http://trac.macports.org/browser/trunk/dports/graphics/jpeg/files ) or download from ["MacOSXBuildFiles"] page.

for i in patch-*;do patch < $i;done

./configure --prefix=$PREFIX --disable-dependency-tracking --disable-static --enable-shared
make
make install

TIFF

./configure --prefix=$PREFIX --disable-dependency-tracking --disable-static --enable-shared CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS"  LDFLAGS="$LDFLAGS"
make
make install

HDF5

./configure --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install

FFTW2

./configure --enable-float --disable-fortran --disable-dependency-tracking --disable-static --enable-shared
make
sudo make install

EMAN expects srfftw.h, sfftw.h. After install, go to the include directory ( /usr/local/include ) and make these links:

ln -s fftw.h sfftw.h
ln -s rfftw.h srfftw.h

Qt3/X11

This is a major pain to install... I'll finish these instructions real soon once I actually get Qt3/X11 to compile on Mac. :)


BUILD EMAN

Run cmake with the EMAN source directory as the argument. Use default options except those below. You may need to enter advanced mode ('t' key) to set some. Note: set EMAN_INSTALL_PREFIX to your home directory, or /usr/local/EMAN, or similar.

 BOOST_INCLUDE_PATH               /usr/local/include/boost-1_34_1                                                                                     
 BOOST_LIBRARY                    /usr/local/libboost_python-1_34_1.dylib                                                                                 
                                                                                                               
 CMAKE_BACKWARDS_COMPATIBILITY    2.4                                                                                                                             
                                                                                                            
 CMAKE_CXX_FLAGS                  -mmacosx-version-min=10.5                                                                                                       
 CMAKE_C_FLAGS                    -mmacosx-version-min=10.5                                                                                                       

                                                                                                        
 CMAKE_OSX_SYSROOT                /Developer/SDKs/MacOSX10.5.sdk                                                                                                  
 CMAKE_VERBOSE_MAKEFILE           ON                                                                                                                                                                                                                                  
 EMAN_INSTALL_PREFIX              /Users/irees/EMAN                                                                                              
                                                                                                                     
 FFTW_INCLUDE_PATH                /usr/local/include                                                                                                  
 FFTW_LIBRARY                     /usr/local/libfftw.dylib                                                                                         
 GSL_CBLAS_LIBRARY                /usr/local/libgslcblas.dylib          
 GSL_INCLUDE_PATH                 /usr/local/include                                                                                                  
 GSL_LIBRARY                      /usr/local/libgsl.dylib                                                                                          
 HDF_INCLUDE_PATH                 /usr/local/include                                                                                                  
 HDF_LIBRARY                      /usr/local/libhdf5.dylib                                                                                         
 JPEG_LIBRARY                     /usr/local/libjpeg.dylib                                                                                         
 PNG_INCLUDE_PATH                 /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/                                                                                                  
 PNG_LIBRARY                      /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng.dylib                                                                                          
 PYTHON_INCLUDE_PATH              /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/Headers                                  
 PYTHON_LIBRARY                   /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libpython.dylib                                                                          
 QT_INCLUDE_DIR                   /usr/local/qt3/include                                                                                              
 QT_MOC_EXECUTABLE                /usr/local/qt3/bin/moc                                                                                          
 QT_QT_LIBRARY                    /usr/local/libqt.dylib                                                                                           
 QT_UIC_EXECUTABLE                /usr/local/qt3/bin/uic                                                                                          
 RFFTW_LIBRARY                    /usr/local/librfftw.dylib                                                                                        
 TIF_INCLUDE_PATH                 /usr/local/include                                                                                                  
 TIF_LIBRARY                      /usr/local/libtiff.dylib                                                                                         
 X11_X11_INCLUDE_PATH             /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/                                                                                                                      
 X11_X11_LIB                      /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libX11.dylib                                                                                                              
 X11_Xext_LIB                     /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libXext.dylib                                                                                                    
 X11_Xlib_INCLUDE_PATH            /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/                                                                                                    
 X11_Xutil_INCLUDE_PATH           /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/                                                                                                              
 Z_LIBRARY                        /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libz.dylib  

EMAN_COMPILE_MacOS_X (last edited 2008-11-26 04:42:28 by localhost)