OSX 10.6.4 Snow Leopard: Difference between revisions

From NEOSYS Dev Wiki
Jump to navigationJump to search
(Created page with 'Installing Exodus on Mac is almost identical to installing on Linux. This install was performed on OSX 10.6.4 (Snow Leopard) on Macbook Pro === Installing dependencies === ===…')
 
 
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
Installing Exodus on Mac is almost identical to installing on Linux.
Building Exodus on Mac is similar to building on Linux.


This install was performed on OSX 10.6.4 (Snow Leopard) on Macbook Pro
This build was performed on OSX 10.6.4 (Snow Leopard) on Macbook Pro


=== Installing dependencies ===
= Installing C++ compiler =


==== Installing C++ compiler ====
#Insert Mac OSX Install DVD
#Open Optional Installs folder
#Open Xcode.mpkg
#Follow instructions
#IMPORTANT: Check ALL options including Mac OSX 10.4 Support


Insert mac osx install disk
The XCODE package includes subversion and curl
Open optional utilities folder
Open xcode
Follow instructions


The XCODE package includes subversion
= Installing Postgres =
 
==== Installing Postgres ====


This is Postgres 9.0.1 but you can use any version back to 8.1.0
This is Postgres 9.0.1 but you can use any version back to 8.1.0
Line 26: Line 25:
Once downloaded, just do a standard install and remember the admin user password.
Once downloaded, just do a standard install and remember the admin user password.


==== Installing Boost ====
= Building ICU, Boost and Exodus =
 
Edit in the following script, or just cut and paste it into your bash command prompt.
 
cd ~
nano installexodus.sh
chmod +x installexodus.sh
./installexodus.sh
 
The latest version of this script is at http://code.google.com/p/exodusdb/source/browse/trunk/installexodus.sh


Minimum required is boost 1_33. Here we install 1.44 using "Macports".
<pre>
#!/bin/bash


---
echo 1. Build and install ICU
cd ~
#svn co http://source.icu-project.org/repos/icu/icu/tags/release-4-8/ icu
rm icu4c-4_8-src.tgz
curl -L -O http://download.icu-project.org/files/icu4c/4.8/icu4c-4_8-src.tgz | tee icu4c-4_8-src.tgz | tar xz
cd icu/source
./configure --enable-extras=no \
  --enable-extras=no \
  --enable-icuio=no \
  --enable-layout=no \
  --enable-tests=no \
  --enable-samples=no
make clean
make
sudo make install


Optionally get ICU to fully support unicode in boost regex. How to do this on Mac OSX is unknown at the moment.
echo 2. Build and install Boost
cd ~
rm -f boost_1_46_1.tar.gz
#wget http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.tar.gz
curl -L -O http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.tar.gz | tee boost_1_46_1.tar.gz | tar xz
cd boost_1_46_1
 
#bjam should say "has_icu builds: yes" otherwise check your icu installation above
./bootstrap.sh
sudo ./bjam --with-date_time --with-filesystem --with-regex --with-system --with-thread install link=shared -a
 
 
echo 3. Build and install Exodus
 
export PATH=/Library/PostgreSQL/9.0/bin/:$PATH
 
#see XCODE's Cross-Development Programming Guide:Configuring a Makefile-Based Project
#export MACOSX_DEPLOYMENT_TARGET=10.4
 
cd ~
svn co HTTPS://exodusdb.googlecode.com/svn/trunk/ exodus
cd ~/exodus
#./configure --with-sysroot=/Developer/SDKs/MacOSX10.4.0.sdk
./configure
make clean #in case half-built with wrong boost libs
make
sudo make install
 
</pre>
 
= Packaging Exodus =
 
You need Bitrock http://installbuilder.bitrock.com/installbuilder-enterprise-7.2.0-osx-installer.app.zip
 
cd ~exodus
#cp configlocalEXAMPLE.cmd configlocal.cmd
nano configlocal.cmd
 
/pack.sh
 
= General Info =
 
== Installing Ports ==
 
This is not needed for Exodus but it is useful to install unix-like tools on mac


#http://www.macports.org/install.php
#http://www.macports.org/install.php
Line 40: Line 107:


  sudo port -v selfupdate
  sudo port -v selfupdate
  sudo port install boost
  sudo port install <put your favourite packages>


It takes at least an hour!
== Dependencies ==


=== Building and Installing exodus ===
otool -L /usr/local/lib/libexodus*.dylib


Download Exodus tar.gz
<pre>
http://code.google.com/p/exodusdb/downloads/detail?name=exodus-10.10.tar.gz
/usr/local/lib/libexodus-11.5.0.dylib:
        /usr/local/lib/libexodus-11.5.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        libpq.5.dylib (compatibility version 5.0.0, current version 5.3.0)
        libboost_date_time.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_thread.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
</pre>


Move it to your home directory then ...
otool -L /usr/local/lib/libboost_*.dylib


cd ~
<pre>
tar xvfz exodus-10.10.tar.gz
libboost_date_time.dylib:
cd exodus-10.10
        libboost_date_time.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_filesystem.dylib:
        libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_regex.dylib:
        libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0)
        libicui18n.48.dylib (compatibility version 48.0.0, current version 48.0.0)
        ../lib/libicudata.48.0.dylib (compatibility version 48.0.0, current version 48.0.0)
        libicuuc.48.dylib (compatibility version 48.0.0, current version 48.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_system.dylib:
        libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_thread.dylib:
        libboost_thread.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
</pre>
 
== Uninstalling ==


Ensure postgres can be found (change 9.0 to your version!) and check pg_config can run
<pre>
#!/bin/bash


PATH=/Library/PostgreSQL/9.0/bin/:$PATH
#ICU
pg_config


  ./configure
pushd /usr/local
  make
sudo rm -rf include/unicode
  sudo make install
sudo rm -rf include/layout
sudo rm -f  bin/derb
sudo rm -f  bin/genbrk
sudo rm -f bin/gencfu
sudo rm -f  bin/gencnval
sudo rm -f  bin/genctd
sudo rm -f  bin/genrb
sudo rm -f  bin/icu-config
sudo rm -f  bin/icuinfo
sudo rm -f  bin/makeconv
sudo rm -f  bin/uconv
sudo rm -f  lib/libicu*
sudo rm -rf lib/icu
sudo rm -f  lib/pkgconfig/icu*.pc
sudo rm -rf share/icu
sudo rm -f share/man/man1/icu-config.1
sudo rm -f share/man/man8/icupkg.8
sudo rm -f  sbin/icupkg
find . | grep icu
popd


After exodus is installed, to setup postgres do the following.
#Boost


  configexodus
pushd /usr/local
sudo rm -rf include/boost
sudo rm -f lib/libboost*
sudo rm -f  pkgconfig/boost*.pc
find . | grep boost
popd


To get an exodus console (sets the right environment variables)
#Exodus


  exodus
pushd /usr/local
sudo rm -rf include/exodus*
sudo rm -f  lib/libexodus*
sudo rm -f  lib/pkgconfig/exodus*.pc
sudo rm -f  bin/exodus
sudo rm -f bin/configexodus
find . | grep exodus
popd


ls cli/src to see the exodus command line utilities and find some documentation on using exodus someone on this wiki
</pre>

Latest revision as of 00:38, 6 June 2011

Building Exodus on Mac is similar to building on Linux.

This build was performed on OSX 10.6.4 (Snow Leopard) on Macbook Pro

Installing C++ compiler

  1. Insert Mac OSX Install DVD
  2. Open Optional Installs folder
  3. Open Xcode.mpkg
  4. Follow instructions
  5. IMPORTANT: Check ALL options including Mac OSX 10.4 Support

The XCODE package includes subversion and curl

Installing Postgres

This is Postgres 9.0.1 but you can use any version back to 8.1.0

http://www.postgresql.org/download/macosx

http://www.enterprisedb.com/products/pgdownload.do#osx

https://www.enterprisedb.com/getfile.jsp?fileid=1517

Once downloaded, just do a standard install and remember the admin user password.

Building ICU, Boost and Exodus

Edit in the following script, or just cut and paste it into your bash command prompt.

cd ~
nano installexodus.sh
chmod +x installexodus.sh
./installexodus.sh

The latest version of this script is at http://code.google.com/p/exodusdb/source/browse/trunk/installexodus.sh

#!/bin/bash

echo 1. Build and install ICU
cd ~
#svn co http://source.icu-project.org/repos/icu/icu/tags/release-4-8/ icu
rm icu4c-4_8-src.tgz
curl -L -O http://download.icu-project.org/files/icu4c/4.8/icu4c-4_8-src.tgz | tee icu4c-4_8-src.tgz | tar xz
cd icu/source
./configure --enable-extras=no \
  --enable-extras=no \
  --enable-icuio=no \
  --enable-layout=no \
  --enable-tests=no \
  --enable-samples=no
make clean
make
sudo make install

echo 2. Build and install Boost
cd ~
rm -f boost_1_46_1.tar.gz
#wget http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.tar.gz
curl -L -O http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.tar.gz | tee boost_1_46_1.tar.gz | tar xz
cd boost_1_46_1

#bjam should say "has_icu builds: yes" otherwise check your icu installation above
./bootstrap.sh
sudo ./bjam --with-date_time --with-filesystem --with-regex --with-system --with-thread install link=shared -a


echo 3. Build and install Exodus

export PATH=/Library/PostgreSQL/9.0/bin/:$PATH

#see XCODE's Cross-Development Programming Guide:Configuring a Makefile-Based Project
#export MACOSX_DEPLOYMENT_TARGET=10.4

cd ~
svn co HTTPS://exodusdb.googlecode.com/svn/trunk/ exodus
cd ~/exodus
#./configure --with-sysroot=/Developer/SDKs/MacOSX10.4.0.sdk
./configure
make clean #in case half-built with wrong boost libs
make
sudo make install

Packaging Exodus

You need Bitrock http://installbuilder.bitrock.com/installbuilder-enterprise-7.2.0-osx-installer.app.zip

cd ~exodus
#cp configlocalEXAMPLE.cmd configlocal.cmd
nano configlocal.cmd
/pack.sh

General Info

Installing Ports

This is not needed for Exodus but it is useful to install unix-like tools on mac

  1. http://www.macports.org/install.php
  2. http://distfiles.macports.org/MacPorts/MacPorts-1.9.1-10.6-SnowLeopard.dmg

At the console command prompt

sudo port -v selfupdate
sudo port install <put your favourite packages>

Dependencies

otool -L /usr/local/lib/libexodus*.dylib
/usr/local/lib/libexodus-11.5.0.dylib:
        /usr/local/lib/libexodus-11.5.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        libpq.5.dylib (compatibility version 5.0.0, current version 5.3.0)
        libboost_date_time.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_thread.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
otool -L /usr/local/lib/libboost_*.dylib
libboost_date_time.dylib:
        libboost_date_time.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_filesystem.dylib:
        libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
        libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_regex.dylib:
        libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0)
        libicui18n.48.dylib (compatibility version 48.0.0, current version 48.0.0)
        ../lib/libicudata.48.0.dylib (compatibility version 48.0.0, current version 48.0.0)
        libicuuc.48.dylib (compatibility version 48.0.0, current version 48.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_system.dylib:
        libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
libboost_thread.dylib:
        libboost_thread.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)

Uninstalling

#!/bin/bash

#ICU

pushd /usr/local
sudo rm -rf include/unicode
sudo rm -rf include/layout
sudo rm -f  bin/derb
sudo rm -f  bin/genbrk
sudo rm -f  bin/gencfu
sudo rm -f  bin/gencnval
sudo rm -f  bin/genctd
sudo rm -f  bin/genrb
sudo rm -f  bin/icu-config
sudo rm -f  bin/icuinfo
sudo rm -f  bin/makeconv
sudo rm -f  bin/uconv
sudo rm -f  lib/libicu*
sudo rm -rf lib/icu
sudo rm -f  lib/pkgconfig/icu*.pc
sudo rm -rf share/icu
sudo rm -f  share/man/man1/icu-config.1
sudo rm -f  share/man/man8/icupkg.8
sudo rm -f  sbin/icupkg
find . | grep icu
popd

#Boost

pushd /usr/local
sudo rm -rf include/boost
sudo rm -f  lib/libboost*
sudo rm -f  pkgconfig/boost*.pc
find . | grep boost
popd

#Exodus

pushd /usr/local
sudo rm -rf include/exodus*
sudo rm -f  lib/libexodus*
sudo rm -f  lib/pkgconfig/exodus*.pc
sudo rm -f  bin/exodus
sudo rm -f  bin/configexodus
find . | grep exodus
popd