[cig-commits] r14860 - cs/cigma/trunk

walter at geodynamics.org walter at geodynamics.org
Mon May 4 15:26:39 PDT 2009


Author: walter
Date: 2009-05-04 15:26:39 -0700 (Mon, 04 May 2009)
New Revision: 14860

Added:
   cs/cigma/trunk/INSTALL.STATIC
Log:
Add instructions on how to build cigma sort-of statically

Added: cs/cigma/trunk/INSTALL.STATIC
===================================================================
--- cs/cigma/trunk/INSTALL.STATIC	                        (rev 0)
+++ cs/cigma/trunk/INSTALL.STATIC	2009-05-04 22:26:39 UTC (rev 14860)
@@ -0,0 +1,180 @@
+Linux
+-----
+To build static executables in Linux, first build VTK.  I used 5.2.1.
+When configuring vtk, I turned off almost everything:
+
+ BUILD_EXAMPLES                   OFF                                          
+ BUILD_SHARED_LIBS                OFF                                          
+ BUILD_TESTING                    ON                                           
+ CMAKE_BACKWARDS_COMPATIBILITY    2.4                                          
+ CMAKE_BUILD_TYPE                                                              
+ CMAKE_INSTALL_PREFIX             /home/boo/cig/cigma/vtk-bin                  
+ VTK_DATA_ROOT                    VTK_DATA_ROOT-NOTFOUND                       
+ VTK_USE_PARALLEL                 OFF                                          
+ VTK_USE_RENDERING                OFF                                          
+ VTK_WRAP_JAVA                    OFF                                          
+ VTK_WRAP_PYTHON                  OFF                                          
+ VTK_WRAP_TCL                     OFF                                          
+
+Once that is built, configure cigma with
+
+LDFLAGS="-static" LIBS="-ldl -lpthread" ./configure --enable-static --prefix=/home/boo/cig/cigma/cigma-bin --with-vtk=/home/boo/cig/cigma/vtk-bin
+
+Then you need to modify the Makefile, changing -static to -all-static.
+This is because libtool, when linking, strips out the -static option,
+but does convert the -all-static option to -static when linking.  You
+can not specify -all-static when configuring, because the configure
+script uses the real linker, not libtool.  In any case, you can
+replace -static with the one-liner
+
+  perl -pi -e "s/-static/-all-static/" Makefile
+
+Then it is make && make install.
+
+
+Mac
+---
+Configure VTK 5.2.1 with
+
+ BUILD_EXAMPLES                   OFF                                          
+ BUILD_SHARED_LIBS                ON
+ BUILD_TESTING                    OFF                                           
+ CMAKE_BACKWARDS_COMPATIBILITY    2.4                                          
+ CMAKE_BUILD_TYPE                                                              
+ CMAKE_INSTALL_PREFIX             /Users/walter/cigma/cigma-bin
+ CMAKE_OSX_ARCHITECTURES          ppc                                          
+ CMAKE_OSX_SYSROOT                /Developer/SDKs/MacOSX10.4u.sdk              
+ VTK_DATA_ROOT                    VTK_DATA_ROOT-NOTFOUND                       
+ VTK_USE_PARALLEL                 OFF                                          
+ VTK_USE_RENDERING                OFF                                          
+ VTK_WRAP_JAVA                    OFF                                          
+ VTK_WRAP_PYTHON                  OFF                                          
+ VTK_WRAP_TCL                     OFF                                          
+
+
+Configure HDF5 1.8.2 with
+
+./configure --prefix=/Users/walter/cigma/cigma-bin --enable-cxx --disable-static
+
+Configure Boost with
+
+./configure --prefix=/Users/walter/cigma/cigma-bin
+
+Configure VTK with
+
+./configure --prefix=/Users/walter/cigma/cigma-bin
+
+"autoreconf -i" did not work on p-wave, so I just copied "configure",
+"aux_config/", config.h.in, and Makefile.in from my linux box.
+
+
+To get vtk-residuals to link, I had to add a number of vtk libraries
+to the link line
+
+  -lvtkNetCDF -lvtkIO -lvtkGraphics -lvtkverdict -lvtksqlite -lvtkmetaio
+
+Then make a new directory release and copy the binaries to
+release/bin.  Copy needed libraries to release/lib.  This is all of
+the vtk dylibs, hdf5 and hdf5_cpp dylib, and Boost's system,
+filesystem, and program-options dylibs.
+
+cp cigma-bin/lib/vtk-5.2/*.dylib release/lib/vtk-5.2/
+cp cigma-bin/lib/libboost_system-xgcc40-mt*dylib release/lib/
+cp cigma-bin/lib/libboost_filesystem-xgcc40-mt*dylib release/lib/
+cp cigma-bin/lib/libboost_program_options-xgcc40-mt*dylib release/lib/
+cp cigma-bin/lib/libhdf5*.dylib release/lib/
+rm release/lib/libhdf5_hl*
+
+
+Relocate the pointers to the dylibs with install_name_tool.
+
+
+install_name_tool -change /Users/walter/cigma/hdf5-bin/lib/libhdf5.6.dylib @executable_path/../lib/libhdf5.6.dylib release/bin/cigma
+install_name_tool -change /Users/walter/cigma/hdf5-bin/lib/libhdf5_cpp.0.dylib @executable_path/../lib/libhdf5_cpp.0.dylib release/bin/cigma
+install_name_tool -change libvtkIO.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkIO.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkDICOMParser.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkDICOMParser.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkFiltering.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkGenericFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkCommon.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkCommon.5.2.dylib release/bin/cigma
+install_name_tool -change libvtktiff.5.2.dylib @executable_path/../lib/vtk-5.2/libvtktiff.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkpng.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkpng.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkjpeg.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkjpeg.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkzlib.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkzlib.5.2.dylib release/bin/cigma
+install_name_tool -change libvtkexpat.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkexpat.5.2.dylib release/bin/cigma
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/bin/cigma
+install_name_tool -change libboost_system-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_system-xgcc40-mt-1_38.dylib release/bin/cigma
+install_name_tool -change libboost_filesystem-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_filesystem-xgcc40-mt-1_38.dylib release/bin/cigma
+install_name_tool -change libboost_program_options-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_program_options-xgcc40-mt-1_38.dylib release/bin/cigma
+
+install_name_tool -change /Users/walter/cigma/hdf5-bin/lib/libhdf5.6.dylib @executable_path/../lib/libhdf5.6.dylib release/bin/h5attr
+install_name_tool -change /Users/walter/cigma/hdf5-bin/lib/libhdf5_cpp.0.dylib @executable_path/../lib/libhdf5_cpp.0.dylib release/bin/h5attr
+install_name_tool -change libboost_system-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_system-xgcc40-mt-1_38.dylib release/bin/h5attr
+install_name_tool -change libboost_filesystem-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_filesystem-xgcc40-mt-1_38.dylib release/bin/h5attr
+install_name_tool -change libboost_program_options-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_program_options-xgcc40-mt-1_38.dylib release/bin/h5attr
+
+install_name_tool -change /Users/walter/cigma/hdf5-bin/lib/libhdf5.6.dylib @executable_path/../lib/libhdf5.6.dylib release/bin/vtk-residuals
+install_name_tool -change /Users/walter/cigma/hdf5-bin/lib/libhdf5_cpp.0.dylib @executable_path/../lib/libhdf5_cpp.0.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkIO.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkIO.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkDICOMParser.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkDICOMParser.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkFiltering.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkGenericFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkCommon.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkCommon.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtktiff.5.2.dylib @executable_path/../lib/vtk-5.2/libvtktiff.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkpng.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkpng.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkjpeg.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkjpeg.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkzlib.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkzlib.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkexpat.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkexpat.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libboost_system-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_system-xgcc40-mt-1_38.dylib release/bin/vtk-residuals
+install_name_tool -change libboost_filesystem-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_filesystem-xgcc40-mt-1_38.dylib release/bin/vtk-residuals
+install_name_tool -change libboost_program_options-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_program_options-xgcc40-mt-1_38.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkNetCDF.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkNetCDF.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkGraphics.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkGraphics.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkverdict.vtk5.2.1.dylib @executable_path/../lib/vtk-5.2/libvtkverdict.vtk5.2.1.dylib release/bin/vtk-residuals
+install_name_tool -change libvtksqlite.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksqlite.5.2.dylib release/bin/vtk-residuals
+install_name_tool -change libvtkmetaio.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkmetaio.5.2.dylib release/bin/vtk-residuals
+
+
+install_name_tool -change libvtkDICOMParser.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkDICOMParser.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkFiltering.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkGenericFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkCommon.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkCommon.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtktiff.5.2.dylib @executable_path/../lib/vtk-5.2/libvtktiff.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkpng.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkpng.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkjpeg.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkjpeg.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkzlib.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkzlib.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkexpat.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkexpat.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkNetCDF.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkNetCDF.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtksqlite.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksqlite.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+install_name_tool -change libvtkmetaio.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkmetaio.5.2.dylib release/lib/vtk-5.2/libvtkIO.5.2.dylib
+
+install_name_tool -change libvtkCommon.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkCommon.5.2.dylib release/lib/vtk-5.2/libvtkFiltering.5.2.dylib
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/lib/vtk-5.2/libvtkFiltering.5.2.dylib
+
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/lib/vtk-5.2/libvtkCommon.5.2.dylib
+
+install_name_tool -change libvtkzlib.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkzlib.5.2.dylib release/lib/vtk-5.2/libvtkmetaio.5.2.dylib
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/lib/vtk-5.2/libvtkmetaio.5.2.dylib
+
+install_name_tool -change libvtkzlib.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkzlib.5.2.dylib release/lib/vtk-5.2/libvtkpng.5.2.dylib
+
+install_name_tool -change libvtkzlib.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkzlib.5.2.dylib release/lib/vtk-5.2/libvtktiff.5.2.dylib
+install_name_tool -change libvtkjpeg.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkjpeg.5.2.dylib release/lib/vtk-5.2/libvtktiff.5.2.dylib
+
+install_name_tool -change libvtkFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkFiltering.5.2.dylib release/lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib
+install_name_tool -change libvtkCommon.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkCommon.5.2.dylib release/lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib
+install_name_tool -change libvtkGraphics.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkGraphics.5.2.dylib release/lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib
+install_name_tool -change libvtkverdict.vtk5.2.1.dylib @executable_path/../lib/vtk-5.2/libvtkverdict.vtk5.2.1.dylib release/lib/vtk-5.2/libvtkGenericFiltering.5.2.dylib
+
+install_name_tool -change libvtkFiltering.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkFiltering.5.2.dylib release/lib/vtk-5.2/libvtkGraphics.5.2.dylib
+install_name_tool -change libvtkCommon.5.2.dylib @executable_path/../lib/vtk-5.2/libvtkCommon.5.2.dylib release/lib/vtk-5.2/libvtkGraphics.5.2.dylib
+install_name_tool -change libvtksys.5.2.dylib @executable_path/../lib/vtk-5.2/libvtksys.5.2.dylib release/lib/vtk-5.2/libvtkGraphics.5.2.dylib
+install_name_tool -change libvtkverdict.vtk5.2.1.dylib @executable_path/../lib/vtk-5.2/libvtkverdict.vtk5.2.1.dylib release/lib/vtk-5.2/libvtkGraphics.5.2.dylib
+
+install_name_tool -change libboost_system-xgcc40-mt-1_38.dylib @executable_path/../lib/libboost_system-xgcc40-mt-1_38.dylib release/lib/libboost_filesystem-xgcc40-mt-1_38.dylib
+
+Then rename release to cigma-$ARCH-1_0_0 and create a dmg with
+
+hdiutil create -fs HFS+ -volname cigma-MacIntel-1_0_0 -srcfolder cigma-MacIntel-1_0_0 cigma-MacIntel-1_0_0.dmg
\ No newline at end of file



More information about the CIG-COMMITS mailing list