<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://devwiki.neosys.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=71.229.245.189</id>
	<title>NEOSYS Dev Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://devwiki.neosys.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=71.229.245.189"/>
	<link rel="alternate" type="text/html" href="https://devwiki.neosys.com/index.php?title=Special:Contributions/71.229.245.189"/>
	<updated>2026-08-08T11:11:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://devwiki.neosys.com/index.php?title=Linux&amp;diff=414</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://devwiki.neosys.com/index.php?title=Linux&amp;diff=414"/>
		<updated>2009-06-19T15:46:50Z</updated>

		<summary type="html">&lt;p&gt;71.229.245.189: /* Installing Boost */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing dependencies ==&lt;br /&gt;
&lt;br /&gt;
Tested on Centos 5.2/Boost 1.38/Postgres 8.3/Gnu Compiler 4.1.2&lt;br /&gt;
&lt;br /&gt;
It might work with versions as far back as Boost 1.35 and Postgres 8.1 perhaps with minor tweaks.&lt;br /&gt;
&lt;br /&gt;
=== Installing Boost ===&lt;br /&gt;
&lt;br /&gt;
Required for complete build of Boost - but those bits of Boost may not actually be required by Exodus.&lt;br /&gt;
&lt;br /&gt;
 yum install python-devel&lt;br /&gt;
 yum install bzip2-devel&lt;br /&gt;
&lt;br /&gt;
Download it&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.sourceforge.net/boost/boost_1_38_0.tar.bz2?use_mirror=garr&lt;br /&gt;
&lt;br /&gt;
Unpack it&lt;br /&gt;
&lt;br /&gt;
 tar xvf boost_1_38_0.tar.bz2&lt;br /&gt;
 cd boost_1_38_0&lt;br /&gt;
&lt;br /&gt;
Actually only the following parts are required but how to a partial build is unknown at the moment.&lt;br /&gt;
&lt;br /&gt;
# Boost DateTime&lt;br /&gt;
# Boost FileSystem&lt;br /&gt;
# Boost IOstream&lt;br /&gt;
# Boost Interprocess&lt;br /&gt;
# Boost ProgramOptions&lt;br /&gt;
# Boost Regex&lt;br /&gt;
# Boost System&lt;br /&gt;
# Boost Thread&lt;br /&gt;
&lt;br /&gt;
Become superuser to build and install it.&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Skip to the next section if on Ubuntu, this part is unnecessary.&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;/usr/local/lib&amp;quot; to the list of lib directories to ensure that the boost libs can be found.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/ld.so.conf&lt;br /&gt;
&lt;br /&gt;
Ensure the new config is operational.&lt;br /&gt;
&lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Ensure boost includes can be found&lt;br /&gt;
&lt;br /&gt;
 ln -s /usr/local/include/boost-1_38/boost /usr/local/include/boost&lt;br /&gt;
&lt;br /&gt;
Quit superuser&lt;br /&gt;
&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
=== Building your own Boost libraries from source ===&lt;br /&gt;
&lt;br /&gt;
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres ===&lt;br /&gt;
&lt;br /&gt;
Version 8.3&lt;br /&gt;
&lt;br /&gt;
 yum install postgresql&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 sudo aptitude install postgresql-8.3&lt;br /&gt;
&lt;br /&gt;
=== Setting up Postgres for Exodus ===&lt;br /&gt;
&lt;br /&gt;
become user postgres and get into postgres command prompt&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
&lt;br /&gt;
create a user and database for exodus&lt;br /&gt;
&lt;br /&gt;
 CREATE ROLE exodus LOGIN&lt;br /&gt;
  PASSWORD &#039;somesillysecret&#039;&lt;br /&gt;
  CREATEDB CREATEROLE;&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE exodus&lt;br /&gt;
  WITH ENCODING=&#039;UTF8&#039;&lt;br /&gt;
    OWNER=exodus;&lt;br /&gt;
&lt;br /&gt;
#quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Allow login from 127.0.0.1 using username/unencrypted password (instead of only logged-in username without password)&lt;br /&gt;
http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nano /var/lib/pgsql/data/pg_hba.conf&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 nano /etc/postgresql/8.3/main/pg_hba.conf&lt;br /&gt;
and add/edit these lines&lt;br /&gt;
 #host    all         all         127.0.0.1/32          ident sameuser&lt;br /&gt;
 host    all         all         127.0.0.1/32          password&lt;br /&gt;
 hostssl all         all         0.0.0.0/0             password&lt;br /&gt;
&lt;br /&gt;
 service postgresql reload&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo /etc/init.d/postgresql restart&lt;br /&gt;
&lt;br /&gt;
=== Installing g++ compiler ===&lt;br /&gt;
&lt;br /&gt;
 yum list|grep gcc&lt;br /&gt;
&lt;br /&gt;
 yum install gcc-c++.i386&lt;br /&gt;
&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo aptitude install build-essential&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres development libraries ===&lt;br /&gt;
&lt;br /&gt;
Look for all available postgres packages and if they are installed&lt;br /&gt;
&lt;br /&gt;
 yum list|grep postgres&lt;br /&gt;
 &lt;br /&gt;
 yum install postgresql-devel&lt;br /&gt;
&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo install postgresql-dev&lt;br /&gt;
&lt;br /&gt;
Locate postgres.h for interest&lt;br /&gt;
&lt;br /&gt;
 updatedb&lt;br /&gt;
 locate postgres.h&lt;br /&gt;
(should be in /usr/include/postgresql/ or /usr/include/postgresql/8.3/server/ on Ubuntu)&lt;br /&gt;
&lt;br /&gt;
== Downloading and Building Exodus ==&lt;br /&gt;
&lt;br /&gt;
=== Downloading Exodus ===&lt;br /&gt;
&lt;br /&gt;
Make a folder for exodus&lt;br /&gt;
&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir exodus&lt;br /&gt;
 cd exodus&lt;br /&gt;
&lt;br /&gt;
Download the main trunk of Exodus&lt;br /&gt;
&lt;br /&gt;
 svn checkout http://svn.neosys.com/svn/trunk&lt;br /&gt;
&lt;br /&gt;
=== Building pgexodus ===&lt;br /&gt;
&lt;br /&gt;
pgexodus.so is a shared library addin c function for postgres to perform sort/select/index functions otherwise it is not required.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
Note that all routines are marked for &amp;quot;C linkage&amp;quot; in order to work with the postgres library &amp;quot;pq&amp;quot;. For convenience they are all compiled under C++ since callexodus requires boost which is c++. The .c routines could equally well be compiled with the plain c compiler. The link stage must be done in c++ style in order to link to the c++ runtime library &amp;quot;rt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/exodus/pgexodus/src&lt;br /&gt;
&lt;br /&gt;
 g++ -fpic -c pgexodus.c extract.c callexodus.cpp naturalorder.cpp pgnaturalorder.cpp -I `pg_config --includedir-server` -I /usr/local/include/boost-1_38&lt;br /&gt;
 g++ -shared -o pgexodus.so pgexodus.o extract.o callexodus.o naturalorder.o pgnaturalorder.o -lrt -lpq&lt;br /&gt;
&lt;br /&gt;
Check the build as follows:&lt;br /&gt;
&lt;br /&gt;
 ld pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like the following. These 8 references to the postgres library all seem to be resolved at runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pgexodus.so: undefined reference to `Float8GetDatum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_atoi&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `CurrentMemoryContext&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_detoast_datum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pfree&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_start&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `MemoryContextAlloc&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_finish&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also check the following&lt;br /&gt;
&lt;br /&gt;
 ldd -u pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./pgexodus.so: error: symbol lookup error: undefined symbol: CurrentMemoryContext (continued)&lt;br /&gt;
undefined symbol: CurrentMemoryContext  (./pgexodus.so)&lt;br /&gt;
Unused direct dependencies:&lt;br /&gt;
&lt;br /&gt;
        /lib/librt.so.1&lt;br /&gt;
        /usr/lib/libpq.so.5&lt;br /&gt;
        /lib/libm.so.6&lt;br /&gt;
        /lib/libgcc_s.so.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing pgexodus ===&lt;br /&gt;
&lt;br /&gt;
Copy the library to the postgres library folder&lt;br /&gt;
&lt;br /&gt;
 sudo cp pgexodus.so `pg_config --pkglibdir`&lt;br /&gt;
&lt;br /&gt;
Register the c functions in postgres&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
 \connect exodus&lt;br /&gt;
&lt;br /&gt;
{{postgres function installation}}&lt;br /&gt;
&lt;br /&gt;
Check the functions loaded properly&lt;br /&gt;
&lt;br /&gt;
 \df exodus*&lt;br /&gt;
&lt;br /&gt;
Quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
For more information see http://www.postgresql.org/docs/8.1/static/app-psql.html&lt;br /&gt;
&lt;br /&gt;
=== Building libexodus ===&lt;br /&gt;
&lt;br /&gt;
libexodus.so is a shared library that allows you to write c++ programs with the style and semantics of pick basic.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
First copy the headers to a standard include path&lt;br /&gt;
&lt;br /&gt;
 #include files&lt;br /&gt;
 sudo cp exo*.h /usr/include&lt;br /&gt;
 sudo cp mv*.h /usr/include&lt;br /&gt;
&lt;br /&gt;
Ignore three warnings in /boost/thread/tss.hpp included from mvdbpostgres.cpp&lt;br /&gt;
&lt;br /&gt;
 #get into the source code&lt;br /&gt;
 cd ~/exodus/trunk/exodus/mv/src&lt;br /&gt;
 #compile all cpp&lt;br /&gt;
 g++ -fPIC -c *.cpp&lt;br /&gt;
 #compile all c&lt;br /&gt;
 gcc -fPIC -c *.c&lt;br /&gt;
 #link and output the library file&lt;br /&gt;
 g++ -shared -o libexodus.so.1.0 *.o -lc -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt\&lt;br /&gt;
  -lboost_thread-gcc41-mt -Wl,-soname,libexodus.so.1&lt;br /&gt;
&lt;br /&gt;
=== Installing libexodus ===&lt;br /&gt;
&lt;br /&gt;
This will place the libraries and include files so that you can compile from anywhere on the system&lt;br /&gt;
&lt;br /&gt;
 #copy to a standard library folder&lt;br /&gt;
 sudo cp libexodus.so.1.0 /usr/lib&lt;br /&gt;
 #register the library file with the linux library cache&lt;br /&gt;
 sudo ldconfig -v&lt;br /&gt;
 #create the pointer to version 1&lt;br /&gt;
 sudo ln -sf /usr/lib/libexodus.so.1 /usr/lib/libexodus.so&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
http://www.ibm.com/developerworks/library/l-shobj/&lt;br /&gt;
&lt;br /&gt;
 ldd libexodus.so.1.0|grep &amp;quot;not found&amp;quot;&lt;br /&gt;
 ldd -u libexodus.so.1.0&lt;br /&gt;
&lt;br /&gt;
=== Testing libexodus ===&lt;br /&gt;
&lt;br /&gt;
 g++ test.cpp -lexodus&lt;br /&gt;
 ./a.out&lt;br /&gt;
 ldd -u a.out&lt;br /&gt;
&lt;br /&gt;
== Building service ==&lt;br /&gt;
&lt;br /&gt;
service is an incomplete multithreaded framework to support dynamic loading of library routines and serving a request/response queue.&lt;br /&gt;
&lt;br /&gt;
www provides an optional web interface to the request/response queue. Windows only at the moment due to a single asp files but could be ported to php.&lt;br /&gt;
&lt;br /&gt;
=== Building service ===&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/service/service&lt;br /&gt;
&lt;br /&gt;
 g++ -fPIC -c *.cpp -I/usr/local/include/boost-1_38 -I../../exodus/mv/src&lt;br /&gt;
 g++ -shared -o libservice.so -lc *.o&lt;br /&gt;
 g++ -o service main.cpp -I/usr/local/include/boost-1_38 -L. -L/usr/local/lib -lexodus -lpq -lboost_filesystem-gcc41-mt\&lt;br /&gt;
 -lboost_regex-gcc41-mt -lboost_thread-gcc41-mt -L../../exodus/mv/src -I../../exodus/mv/src -L./ -lservice&lt;br /&gt;
&lt;br /&gt;
=== Running service ===&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=../../exodus/mv/src:.:/usr/local/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
 ./service&lt;br /&gt;
&lt;br /&gt;
== Developing libexodus/service ==&lt;br /&gt;
&lt;br /&gt;
=== Committing your developments ===&lt;br /&gt;
&lt;br /&gt;
First get a username and password by running the following unix command and send the output to an exodus subversion administrator eg steve.bush@neosys.com&lt;br /&gt;
&lt;br /&gt;
 htpasswd -nm YOURDESIREDUSERNAME&lt;br /&gt;
&lt;br /&gt;
The administrator needs to run the following command as root and enter the encrypted pass (the bit AFTER the :) ignoring the warning about plain text password because it is already encrypted.&lt;br /&gt;
&lt;br /&gt;
 htpasswd -p /etc/apache2/dav_svn.passwd YOURDESIREDUSERNAME&lt;/div&gt;</summary>
		<author><name>71.229.245.189</name></author>
	</entry>
	<entry>
		<id>https://devwiki.neosys.com/index.php?title=Linux&amp;diff=413</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://devwiki.neosys.com/index.php?title=Linux&amp;diff=413"/>
		<updated>2009-06-19T15:14:11Z</updated>

		<summary type="html">&lt;p&gt;71.229.245.189: /* Installing Postgres development libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing dependencies ==&lt;br /&gt;
&lt;br /&gt;
Tested on Centos 5.2/Boost 1.38/Postgres 8.3/Gnu Compiler 4.1.2&lt;br /&gt;
&lt;br /&gt;
It might work with versions as far back as Boost 1.35 and Postgres 8.1 perhaps with minor tweaks.&lt;br /&gt;
&lt;br /&gt;
=== Installing Boost ===&lt;br /&gt;
&lt;br /&gt;
Required for complete build of Boost - but those bits of Boost may not actually be required by Exodus.&lt;br /&gt;
&lt;br /&gt;
 yum install python-devel&lt;br /&gt;
 yum install bzip2-devel&lt;br /&gt;
&lt;br /&gt;
Download it&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.sourceforge.net/boost/boost_1_38_0.tar.bz2?use_mirror=garr&lt;br /&gt;
&lt;br /&gt;
Unpack it&lt;br /&gt;
&lt;br /&gt;
 tar xvf boost_1_38_0.tar.bz2&lt;br /&gt;
 cd boost_1_38_0&lt;br /&gt;
&lt;br /&gt;
Actually only the following parts are required but how to a partial build is unknown at the moment.&lt;br /&gt;
&lt;br /&gt;
# Boost DateTime&lt;br /&gt;
# Boost FileSystem&lt;br /&gt;
# Boost IOstream&lt;br /&gt;
# Boost Interprocess&lt;br /&gt;
# Boost ProgramOptions&lt;br /&gt;
# Boost Regex&lt;br /&gt;
# Boost System&lt;br /&gt;
# Boost Thread&lt;br /&gt;
&lt;br /&gt;
Become superuser to build and install it.&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;/usr/local/lib&amp;quot; to the list of lib directories to ensure that the boost libs can be found.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/ld.so.conf&lt;br /&gt;
&lt;br /&gt;
Ensure the new config is operational.&lt;br /&gt;
&lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Ensure boost includes can be found&lt;br /&gt;
&lt;br /&gt;
 ln -s /usr/local/include/boost-1_38/boost /usr/local/include/boost&lt;br /&gt;
&lt;br /&gt;
Quit superuser&lt;br /&gt;
&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
=== Building your own Boost libraries from source ===&lt;br /&gt;
&lt;br /&gt;
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres ===&lt;br /&gt;
&lt;br /&gt;
Version 8.3&lt;br /&gt;
&lt;br /&gt;
 yum install postgresql&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 sudo aptitude install postgresql-8.3&lt;br /&gt;
&lt;br /&gt;
=== Setting up Postgres for Exodus ===&lt;br /&gt;
&lt;br /&gt;
become user postgres and get into postgres command prompt&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
&lt;br /&gt;
create a user and database for exodus&lt;br /&gt;
&lt;br /&gt;
 CREATE ROLE exodus LOGIN&lt;br /&gt;
  PASSWORD &#039;somesillysecret&#039;&lt;br /&gt;
  CREATEDB CREATEROLE;&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE exodus&lt;br /&gt;
  WITH ENCODING=&#039;UTF8&#039;&lt;br /&gt;
    OWNER=exodus;&lt;br /&gt;
&lt;br /&gt;
#quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Allow login from 127.0.0.1 using username/unencrypted password (instead of only logged-in username without password)&lt;br /&gt;
http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nano /var/lib/pgsql/data/pg_hba.conf&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 nano /etc/postgresql/8.3/main/pg_hba.conf&lt;br /&gt;
and add/edit these lines&lt;br /&gt;
 #host    all         all         127.0.0.1/32          ident sameuser&lt;br /&gt;
 host    all         all         127.0.0.1/32          password&lt;br /&gt;
 hostssl all         all         0.0.0.0/0             password&lt;br /&gt;
&lt;br /&gt;
 service postgresql reload&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo /etc/init.d/postgresql restart&lt;br /&gt;
&lt;br /&gt;
=== Installing g++ compiler ===&lt;br /&gt;
&lt;br /&gt;
 yum list|grep gcc&lt;br /&gt;
&lt;br /&gt;
 yum install gcc-c++.i386&lt;br /&gt;
&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo aptitude install build-essential&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres development libraries ===&lt;br /&gt;
&lt;br /&gt;
Look for all available postgres packages and if they are installed&lt;br /&gt;
&lt;br /&gt;
 yum list|grep postgres&lt;br /&gt;
 &lt;br /&gt;
 yum install postgresql-devel&lt;br /&gt;
&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo install postgresql-dev&lt;br /&gt;
&lt;br /&gt;
Locate postgres.h for interest&lt;br /&gt;
&lt;br /&gt;
 updatedb&lt;br /&gt;
 locate postgres.h&lt;br /&gt;
(should be in /usr/include/postgresql/ or /usr/include/postgresql/8.3/server/ on Ubuntu)&lt;br /&gt;
&lt;br /&gt;
== Downloading and Building Exodus ==&lt;br /&gt;
&lt;br /&gt;
=== Downloading Exodus ===&lt;br /&gt;
&lt;br /&gt;
Make a folder for exodus&lt;br /&gt;
&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir exodus&lt;br /&gt;
 cd exodus&lt;br /&gt;
&lt;br /&gt;
Download the main trunk of Exodus&lt;br /&gt;
&lt;br /&gt;
 svn checkout http://svn.neosys.com/svn/trunk&lt;br /&gt;
&lt;br /&gt;
=== Building pgexodus ===&lt;br /&gt;
&lt;br /&gt;
pgexodus.so is a shared library addin c function for postgres to perform sort/select/index functions otherwise it is not required.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
Note that all routines are marked for &amp;quot;C linkage&amp;quot; in order to work with the postgres library &amp;quot;pq&amp;quot;. For convenience they are all compiled under C++ since callexodus requires boost which is c++. The .c routines could equally well be compiled with the plain c compiler. The link stage must be done in c++ style in order to link to the c++ runtime library &amp;quot;rt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/exodus/pgexodus/src&lt;br /&gt;
&lt;br /&gt;
 g++ -fpic -c pgexodus.c extract.c callexodus.cpp naturalorder.cpp pgnaturalorder.cpp -I `pg_config --includedir-server` -I /usr/local/include/boost-1_38&lt;br /&gt;
 g++ -shared -o pgexodus.so pgexodus.o extract.o callexodus.o naturalorder.o pgnaturalorder.o -lrt -lpq&lt;br /&gt;
&lt;br /&gt;
Check the build as follows:&lt;br /&gt;
&lt;br /&gt;
 ld pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like the following. These 8 references to the postgres library all seem to be resolved at runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pgexodus.so: undefined reference to `Float8GetDatum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_atoi&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `CurrentMemoryContext&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_detoast_datum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pfree&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_start&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `MemoryContextAlloc&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_finish&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also check the following&lt;br /&gt;
&lt;br /&gt;
 ldd -u pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./pgexodus.so: error: symbol lookup error: undefined symbol: CurrentMemoryContext (continued)&lt;br /&gt;
undefined symbol: CurrentMemoryContext  (./pgexodus.so)&lt;br /&gt;
Unused direct dependencies:&lt;br /&gt;
&lt;br /&gt;
        /lib/librt.so.1&lt;br /&gt;
        /usr/lib/libpq.so.5&lt;br /&gt;
        /lib/libm.so.6&lt;br /&gt;
        /lib/libgcc_s.so.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing pgexodus ===&lt;br /&gt;
&lt;br /&gt;
Copy the library to the postgres library folder&lt;br /&gt;
&lt;br /&gt;
 sudo cp pgexodus.so `pg_config --pkglibdir`&lt;br /&gt;
&lt;br /&gt;
Register the c functions in postgres&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
 \connect exodus&lt;br /&gt;
&lt;br /&gt;
{{postgres function installation}}&lt;br /&gt;
&lt;br /&gt;
Check the functions loaded properly&lt;br /&gt;
&lt;br /&gt;
 \df exodus*&lt;br /&gt;
&lt;br /&gt;
Quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
For more information see http://www.postgresql.org/docs/8.1/static/app-psql.html&lt;br /&gt;
&lt;br /&gt;
=== Building libexodus ===&lt;br /&gt;
&lt;br /&gt;
libexodus.so is a shared library that allows you to write c++ programs with the style and semantics of pick basic.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
First copy the headers to a standard include path&lt;br /&gt;
&lt;br /&gt;
 #include files&lt;br /&gt;
 sudo cp exo*.h /usr/include&lt;br /&gt;
 sudo cp mv*.h /usr/include&lt;br /&gt;
&lt;br /&gt;
Ignore three warnings in /boost/thread/tss.hpp included from mvdbpostgres.cpp&lt;br /&gt;
&lt;br /&gt;
 #get into the source code&lt;br /&gt;
 cd ~/exodus/trunk/exodus/mv/src&lt;br /&gt;
 #compile all cpp&lt;br /&gt;
 g++ -fPIC -c *.cpp&lt;br /&gt;
 #compile all c&lt;br /&gt;
 gcc -fPIC -c *.c&lt;br /&gt;
 #link and output the library file&lt;br /&gt;
 g++ -shared -o libexodus.so.1.0 *.o -lc -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt\&lt;br /&gt;
  -lboost_thread-gcc41-mt -Wl,-soname,libexodus.so.1&lt;br /&gt;
&lt;br /&gt;
=== Installing libexodus ===&lt;br /&gt;
&lt;br /&gt;
This will place the libraries and include files so that you can compile from anywhere on the system&lt;br /&gt;
&lt;br /&gt;
 #copy to a standard library folder&lt;br /&gt;
 sudo cp libexodus.so.1.0 /usr/lib&lt;br /&gt;
 #register the library file with the linux library cache&lt;br /&gt;
 sudo ldconfig -v&lt;br /&gt;
 #create the pointer to version 1&lt;br /&gt;
 sudo ln -sf /usr/lib/libexodus.so.1 /usr/lib/libexodus.so&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
http://www.ibm.com/developerworks/library/l-shobj/&lt;br /&gt;
&lt;br /&gt;
 ldd libexodus.so.1.0|grep &amp;quot;not found&amp;quot;&lt;br /&gt;
 ldd -u libexodus.so.1.0&lt;br /&gt;
&lt;br /&gt;
=== Testing libexodus ===&lt;br /&gt;
&lt;br /&gt;
 g++ test.cpp -lexodus&lt;br /&gt;
 ./a.out&lt;br /&gt;
 ldd -u a.out&lt;br /&gt;
&lt;br /&gt;
== Building service ==&lt;br /&gt;
&lt;br /&gt;
service is an incomplete multithreaded framework to support dynamic loading of library routines and serving a request/response queue.&lt;br /&gt;
&lt;br /&gt;
www provides an optional web interface to the request/response queue. Windows only at the moment due to a single asp files but could be ported to php.&lt;br /&gt;
&lt;br /&gt;
=== Building service ===&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/service/service&lt;br /&gt;
&lt;br /&gt;
 g++ -fPIC -c *.cpp -I/usr/local/include/boost-1_38 -I../../exodus/mv/src&lt;br /&gt;
 g++ -shared -o libservice.so -lc *.o&lt;br /&gt;
 g++ -o service main.cpp -I/usr/local/include/boost-1_38 -L. -L/usr/local/lib -lexodus -lpq -lboost_filesystem-gcc41-mt\&lt;br /&gt;
 -lboost_regex-gcc41-mt -lboost_thread-gcc41-mt -L../../exodus/mv/src -I../../exodus/mv/src -L./ -lservice&lt;br /&gt;
&lt;br /&gt;
=== Running service ===&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=../../exodus/mv/src:.:/usr/local/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
 ./service&lt;br /&gt;
&lt;br /&gt;
== Developing libexodus/service ==&lt;br /&gt;
&lt;br /&gt;
=== Committing your developments ===&lt;br /&gt;
&lt;br /&gt;
First get a username and password by running the following unix command and send the output to an exodus subversion administrator eg steve.bush@neosys.com&lt;br /&gt;
&lt;br /&gt;
 htpasswd -nm YOURDESIREDUSERNAME&lt;br /&gt;
&lt;br /&gt;
The administrator needs to run the following command as root and enter the encrypted pass (the bit AFTER the :) ignoring the warning about plain text password because it is already encrypted.&lt;br /&gt;
&lt;br /&gt;
 htpasswd -p /etc/apache2/dav_svn.passwd YOURDESIREDUSERNAME&lt;/div&gt;</summary>
		<author><name>71.229.245.189</name></author>
	</entry>
	<entry>
		<id>https://devwiki.neosys.com/index.php?title=Linux&amp;diff=412</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://devwiki.neosys.com/index.php?title=Linux&amp;diff=412"/>
		<updated>2009-06-19T15:12:02Z</updated>

		<summary type="html">&lt;p&gt;71.229.245.189: /* Installing g++ compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing dependencies ==&lt;br /&gt;
&lt;br /&gt;
Tested on Centos 5.2/Boost 1.38/Postgres 8.3/Gnu Compiler 4.1.2&lt;br /&gt;
&lt;br /&gt;
It might work with versions as far back as Boost 1.35 and Postgres 8.1 perhaps with minor tweaks.&lt;br /&gt;
&lt;br /&gt;
=== Installing Boost ===&lt;br /&gt;
&lt;br /&gt;
Required for complete build of Boost - but those bits of Boost may not actually be required by Exodus.&lt;br /&gt;
&lt;br /&gt;
 yum install python-devel&lt;br /&gt;
 yum install bzip2-devel&lt;br /&gt;
&lt;br /&gt;
Download it&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.sourceforge.net/boost/boost_1_38_0.tar.bz2?use_mirror=garr&lt;br /&gt;
&lt;br /&gt;
Unpack it&lt;br /&gt;
&lt;br /&gt;
 tar xvf boost_1_38_0.tar.bz2&lt;br /&gt;
 cd boost_1_38_0&lt;br /&gt;
&lt;br /&gt;
Actually only the following parts are required but how to a partial build is unknown at the moment.&lt;br /&gt;
&lt;br /&gt;
# Boost DateTime&lt;br /&gt;
# Boost FileSystem&lt;br /&gt;
# Boost IOstream&lt;br /&gt;
# Boost Interprocess&lt;br /&gt;
# Boost ProgramOptions&lt;br /&gt;
# Boost Regex&lt;br /&gt;
# Boost System&lt;br /&gt;
# Boost Thread&lt;br /&gt;
&lt;br /&gt;
Become superuser to build and install it.&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;/usr/local/lib&amp;quot; to the list of lib directories to ensure that the boost libs can be found.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/ld.so.conf&lt;br /&gt;
&lt;br /&gt;
Ensure the new config is operational.&lt;br /&gt;
&lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Ensure boost includes can be found&lt;br /&gt;
&lt;br /&gt;
 ln -s /usr/local/include/boost-1_38/boost /usr/local/include/boost&lt;br /&gt;
&lt;br /&gt;
Quit superuser&lt;br /&gt;
&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
=== Building your own Boost libraries from source ===&lt;br /&gt;
&lt;br /&gt;
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres ===&lt;br /&gt;
&lt;br /&gt;
Version 8.3&lt;br /&gt;
&lt;br /&gt;
 yum install postgresql&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 sudo aptitude install postgresql-8.3&lt;br /&gt;
&lt;br /&gt;
=== Setting up Postgres for Exodus ===&lt;br /&gt;
&lt;br /&gt;
become user postgres and get into postgres command prompt&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
&lt;br /&gt;
create a user and database for exodus&lt;br /&gt;
&lt;br /&gt;
 CREATE ROLE exodus LOGIN&lt;br /&gt;
  PASSWORD &#039;somesillysecret&#039;&lt;br /&gt;
  CREATEDB CREATEROLE;&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE exodus&lt;br /&gt;
  WITH ENCODING=&#039;UTF8&#039;&lt;br /&gt;
    OWNER=exodus;&lt;br /&gt;
&lt;br /&gt;
#quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Allow login from 127.0.0.1 using username/unencrypted password (instead of only logged-in username without password)&lt;br /&gt;
http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nano /var/lib/pgsql/data/pg_hba.conf&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 nano /etc/postgresql/8.3/main/pg_hba.conf&lt;br /&gt;
and add/edit these lines&lt;br /&gt;
 #host    all         all         127.0.0.1/32          ident sameuser&lt;br /&gt;
 host    all         all         127.0.0.1/32          password&lt;br /&gt;
 hostssl all         all         0.0.0.0/0             password&lt;br /&gt;
&lt;br /&gt;
 service postgresql reload&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo /etc/init.d/postgresql restart&lt;br /&gt;
&lt;br /&gt;
=== Installing g++ compiler ===&lt;br /&gt;
&lt;br /&gt;
 yum list|grep gcc&lt;br /&gt;
&lt;br /&gt;
 yum install gcc-c++.i386&lt;br /&gt;
&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo aptitude install build-essential&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres development libraries ===&lt;br /&gt;
&lt;br /&gt;
Look for all available postgres packages and if they are installed&lt;br /&gt;
&lt;br /&gt;
 yum list|grep postgres&lt;br /&gt;
 &lt;br /&gt;
 yum install postgresql-devel&lt;br /&gt;
&lt;br /&gt;
Locate postgres.h for interest&lt;br /&gt;
&lt;br /&gt;
 updatedb&lt;br /&gt;
 locate postgres.h&lt;br /&gt;
&lt;br /&gt;
== Downloading and Building Exodus ==&lt;br /&gt;
&lt;br /&gt;
=== Downloading Exodus ===&lt;br /&gt;
&lt;br /&gt;
Make a folder for exodus&lt;br /&gt;
&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir exodus&lt;br /&gt;
 cd exodus&lt;br /&gt;
&lt;br /&gt;
Download the main trunk of Exodus&lt;br /&gt;
&lt;br /&gt;
 svn checkout http://svn.neosys.com/svn/trunk&lt;br /&gt;
&lt;br /&gt;
=== Building pgexodus ===&lt;br /&gt;
&lt;br /&gt;
pgexodus.so is a shared library addin c function for postgres to perform sort/select/index functions otherwise it is not required.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
Note that all routines are marked for &amp;quot;C linkage&amp;quot; in order to work with the postgres library &amp;quot;pq&amp;quot;. For convenience they are all compiled under C++ since callexodus requires boost which is c++. The .c routines could equally well be compiled with the plain c compiler. The link stage must be done in c++ style in order to link to the c++ runtime library &amp;quot;rt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/exodus/pgexodus/src&lt;br /&gt;
&lt;br /&gt;
 g++ -fpic -c pgexodus.c extract.c callexodus.cpp naturalorder.cpp pgnaturalorder.cpp -I `pg_config --includedir-server` -I /usr/local/include/boost-1_38&lt;br /&gt;
 g++ -shared -o pgexodus.so pgexodus.o extract.o callexodus.o naturalorder.o pgnaturalorder.o -lrt -lpq&lt;br /&gt;
&lt;br /&gt;
Check the build as follows:&lt;br /&gt;
&lt;br /&gt;
 ld pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like the following. These 8 references to the postgres library all seem to be resolved at runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pgexodus.so: undefined reference to `Float8GetDatum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_atoi&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `CurrentMemoryContext&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_detoast_datum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pfree&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_start&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `MemoryContextAlloc&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_finish&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also check the following&lt;br /&gt;
&lt;br /&gt;
 ldd -u pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./pgexodus.so: error: symbol lookup error: undefined symbol: CurrentMemoryContext (continued)&lt;br /&gt;
undefined symbol: CurrentMemoryContext  (./pgexodus.so)&lt;br /&gt;
Unused direct dependencies:&lt;br /&gt;
&lt;br /&gt;
        /lib/librt.so.1&lt;br /&gt;
        /usr/lib/libpq.so.5&lt;br /&gt;
        /lib/libm.so.6&lt;br /&gt;
        /lib/libgcc_s.so.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing pgexodus ===&lt;br /&gt;
&lt;br /&gt;
Copy the library to the postgres library folder&lt;br /&gt;
&lt;br /&gt;
 sudo cp pgexodus.so `pg_config --pkglibdir`&lt;br /&gt;
&lt;br /&gt;
Register the c functions in postgres&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
 \connect exodus&lt;br /&gt;
&lt;br /&gt;
{{postgres function installation}}&lt;br /&gt;
&lt;br /&gt;
Check the functions loaded properly&lt;br /&gt;
&lt;br /&gt;
 \df exodus*&lt;br /&gt;
&lt;br /&gt;
Quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
For more information see http://www.postgresql.org/docs/8.1/static/app-psql.html&lt;br /&gt;
&lt;br /&gt;
=== Building libexodus ===&lt;br /&gt;
&lt;br /&gt;
libexodus.so is a shared library that allows you to write c++ programs with the style and semantics of pick basic.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
First copy the headers to a standard include path&lt;br /&gt;
&lt;br /&gt;
 #include files&lt;br /&gt;
 sudo cp exo*.h /usr/include&lt;br /&gt;
 sudo cp mv*.h /usr/include&lt;br /&gt;
&lt;br /&gt;
Ignore three warnings in /boost/thread/tss.hpp included from mvdbpostgres.cpp&lt;br /&gt;
&lt;br /&gt;
 #get into the source code&lt;br /&gt;
 cd ~/exodus/trunk/exodus/mv/src&lt;br /&gt;
 #compile all cpp&lt;br /&gt;
 g++ -fPIC -c *.cpp&lt;br /&gt;
 #compile all c&lt;br /&gt;
 gcc -fPIC -c *.c&lt;br /&gt;
 #link and output the library file&lt;br /&gt;
 g++ -shared -o libexodus.so.1.0 *.o -lc -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt\&lt;br /&gt;
  -lboost_thread-gcc41-mt -Wl,-soname,libexodus.so.1&lt;br /&gt;
&lt;br /&gt;
=== Installing libexodus ===&lt;br /&gt;
&lt;br /&gt;
This will place the libraries and include files so that you can compile from anywhere on the system&lt;br /&gt;
&lt;br /&gt;
 #copy to a standard library folder&lt;br /&gt;
 sudo cp libexodus.so.1.0 /usr/lib&lt;br /&gt;
 #register the library file with the linux library cache&lt;br /&gt;
 sudo ldconfig -v&lt;br /&gt;
 #create the pointer to version 1&lt;br /&gt;
 sudo ln -sf /usr/lib/libexodus.so.1 /usr/lib/libexodus.so&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
http://www.ibm.com/developerworks/library/l-shobj/&lt;br /&gt;
&lt;br /&gt;
 ldd libexodus.so.1.0|grep &amp;quot;not found&amp;quot;&lt;br /&gt;
 ldd -u libexodus.so.1.0&lt;br /&gt;
&lt;br /&gt;
=== Testing libexodus ===&lt;br /&gt;
&lt;br /&gt;
 g++ test.cpp -lexodus&lt;br /&gt;
 ./a.out&lt;br /&gt;
 ldd -u a.out&lt;br /&gt;
&lt;br /&gt;
== Building service ==&lt;br /&gt;
&lt;br /&gt;
service is an incomplete multithreaded framework to support dynamic loading of library routines and serving a request/response queue.&lt;br /&gt;
&lt;br /&gt;
www provides an optional web interface to the request/response queue. Windows only at the moment due to a single asp files but could be ported to php.&lt;br /&gt;
&lt;br /&gt;
=== Building service ===&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/service/service&lt;br /&gt;
&lt;br /&gt;
 g++ -fPIC -c *.cpp -I/usr/local/include/boost-1_38 -I../../exodus/mv/src&lt;br /&gt;
 g++ -shared -o libservice.so -lc *.o&lt;br /&gt;
 g++ -o service main.cpp -I/usr/local/include/boost-1_38 -L. -L/usr/local/lib -lexodus -lpq -lboost_filesystem-gcc41-mt\&lt;br /&gt;
 -lboost_regex-gcc41-mt -lboost_thread-gcc41-mt -L../../exodus/mv/src -I../../exodus/mv/src -L./ -lservice&lt;br /&gt;
&lt;br /&gt;
=== Running service ===&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=../../exodus/mv/src:.:/usr/local/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
 ./service&lt;br /&gt;
&lt;br /&gt;
== Developing libexodus/service ==&lt;br /&gt;
&lt;br /&gt;
=== Committing your developments ===&lt;br /&gt;
&lt;br /&gt;
First get a username and password by running the following unix command and send the output to an exodus subversion administrator eg steve.bush@neosys.com&lt;br /&gt;
&lt;br /&gt;
 htpasswd -nm YOURDESIREDUSERNAME&lt;br /&gt;
&lt;br /&gt;
The administrator needs to run the following command as root and enter the encrypted pass (the bit AFTER the :) ignoring the warning about plain text password because it is already encrypted.&lt;br /&gt;
&lt;br /&gt;
 htpasswd -p /etc/apache2/dav_svn.passwd YOURDESIREDUSERNAME&lt;/div&gt;</summary>
		<author><name>71.229.245.189</name></author>
	</entry>
	<entry>
		<id>https://devwiki.neosys.com/index.php?title=Linux&amp;diff=411</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://devwiki.neosys.com/index.php?title=Linux&amp;diff=411"/>
		<updated>2009-06-19T15:10:53Z</updated>

		<summary type="html">&lt;p&gt;71.229.245.189: /* Setting up Postgres for Exodus */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing dependencies ==&lt;br /&gt;
&lt;br /&gt;
Tested on Centos 5.2/Boost 1.38/Postgres 8.3/Gnu Compiler 4.1.2&lt;br /&gt;
&lt;br /&gt;
It might work with versions as far back as Boost 1.35 and Postgres 8.1 perhaps with minor tweaks.&lt;br /&gt;
&lt;br /&gt;
=== Installing Boost ===&lt;br /&gt;
&lt;br /&gt;
Required for complete build of Boost - but those bits of Boost may not actually be required by Exodus.&lt;br /&gt;
&lt;br /&gt;
 yum install python-devel&lt;br /&gt;
 yum install bzip2-devel&lt;br /&gt;
&lt;br /&gt;
Download it&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.sourceforge.net/boost/boost_1_38_0.tar.bz2?use_mirror=garr&lt;br /&gt;
&lt;br /&gt;
Unpack it&lt;br /&gt;
&lt;br /&gt;
 tar xvf boost_1_38_0.tar.bz2&lt;br /&gt;
 cd boost_1_38_0&lt;br /&gt;
&lt;br /&gt;
Actually only the following parts are required but how to a partial build is unknown at the moment.&lt;br /&gt;
&lt;br /&gt;
# Boost DateTime&lt;br /&gt;
# Boost FileSystem&lt;br /&gt;
# Boost IOstream&lt;br /&gt;
# Boost Interprocess&lt;br /&gt;
# Boost ProgramOptions&lt;br /&gt;
# Boost Regex&lt;br /&gt;
# Boost System&lt;br /&gt;
# Boost Thread&lt;br /&gt;
&lt;br /&gt;
Become superuser to build and install it.&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;/usr/local/lib&amp;quot; to the list of lib directories to ensure that the boost libs can be found.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/ld.so.conf&lt;br /&gt;
&lt;br /&gt;
Ensure the new config is operational.&lt;br /&gt;
&lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Ensure boost includes can be found&lt;br /&gt;
&lt;br /&gt;
 ln -s /usr/local/include/boost-1_38/boost /usr/local/include/boost&lt;br /&gt;
&lt;br /&gt;
Quit superuser&lt;br /&gt;
&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
=== Building your own Boost libraries from source ===&lt;br /&gt;
&lt;br /&gt;
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres ===&lt;br /&gt;
&lt;br /&gt;
Version 8.3&lt;br /&gt;
&lt;br /&gt;
 yum install postgresql&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 sudo aptitude install postgresql-8.3&lt;br /&gt;
&lt;br /&gt;
=== Setting up Postgres for Exodus ===&lt;br /&gt;
&lt;br /&gt;
become user postgres and get into postgres command prompt&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
&lt;br /&gt;
create a user and database for exodus&lt;br /&gt;
&lt;br /&gt;
 CREATE ROLE exodus LOGIN&lt;br /&gt;
  PASSWORD &#039;somesillysecret&#039;&lt;br /&gt;
  CREATEDB CREATEROLE;&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE exodus&lt;br /&gt;
  WITH ENCODING=&#039;UTF8&#039;&lt;br /&gt;
    OWNER=exodus;&lt;br /&gt;
&lt;br /&gt;
#quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Allow login from 127.0.0.1 using username/unencrypted password (instead of only logged-in username without password)&lt;br /&gt;
http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nano /var/lib/pgsql/data/pg_hba.conf&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 nano /etc/postgresql/8.3/main/pg_hba.conf&lt;br /&gt;
and add/edit these lines&lt;br /&gt;
 #host    all         all         127.0.0.1/32          ident sameuser&lt;br /&gt;
 host    all         all         127.0.0.1/32          password&lt;br /&gt;
 hostssl all         all         0.0.0.0/0             password&lt;br /&gt;
&lt;br /&gt;
 service postgresql reload&lt;br /&gt;
or for Ubuntu&lt;br /&gt;
 sudo /etc/init.d/postgresql restart&lt;br /&gt;
&lt;br /&gt;
=== Installing g++ compiler ===&lt;br /&gt;
&lt;br /&gt;
 yum list|grep gcc&lt;br /&gt;
&lt;br /&gt;
 yum install gcc-c++.i386&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres development libraries ===&lt;br /&gt;
&lt;br /&gt;
Look for all available postgres packages and if they are installed&lt;br /&gt;
&lt;br /&gt;
 yum list|grep postgres&lt;br /&gt;
 &lt;br /&gt;
 yum install postgresql-devel&lt;br /&gt;
&lt;br /&gt;
Locate postgres.h for interest&lt;br /&gt;
&lt;br /&gt;
 updatedb&lt;br /&gt;
 locate postgres.h&lt;br /&gt;
&lt;br /&gt;
== Downloading and Building Exodus ==&lt;br /&gt;
&lt;br /&gt;
=== Downloading Exodus ===&lt;br /&gt;
&lt;br /&gt;
Make a folder for exodus&lt;br /&gt;
&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir exodus&lt;br /&gt;
 cd exodus&lt;br /&gt;
&lt;br /&gt;
Download the main trunk of Exodus&lt;br /&gt;
&lt;br /&gt;
 svn checkout http://svn.neosys.com/svn/trunk&lt;br /&gt;
&lt;br /&gt;
=== Building pgexodus ===&lt;br /&gt;
&lt;br /&gt;
pgexodus.so is a shared library addin c function for postgres to perform sort/select/index functions otherwise it is not required.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
Note that all routines are marked for &amp;quot;C linkage&amp;quot; in order to work with the postgres library &amp;quot;pq&amp;quot;. For convenience they are all compiled under C++ since callexodus requires boost which is c++. The .c routines could equally well be compiled with the plain c compiler. The link stage must be done in c++ style in order to link to the c++ runtime library &amp;quot;rt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/exodus/pgexodus/src&lt;br /&gt;
&lt;br /&gt;
 g++ -fpic -c pgexodus.c extract.c callexodus.cpp naturalorder.cpp pgnaturalorder.cpp -I `pg_config --includedir-server` -I /usr/local/include/boost-1_38&lt;br /&gt;
 g++ -shared -o pgexodus.so pgexodus.o extract.o callexodus.o naturalorder.o pgnaturalorder.o -lrt -lpq&lt;br /&gt;
&lt;br /&gt;
Check the build as follows:&lt;br /&gt;
&lt;br /&gt;
 ld pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like the following. These 8 references to the postgres library all seem to be resolved at runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pgexodus.so: undefined reference to `Float8GetDatum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_atoi&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `CurrentMemoryContext&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_detoast_datum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pfree&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_start&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `MemoryContextAlloc&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_finish&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also check the following&lt;br /&gt;
&lt;br /&gt;
 ldd -u pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./pgexodus.so: error: symbol lookup error: undefined symbol: CurrentMemoryContext (continued)&lt;br /&gt;
undefined symbol: CurrentMemoryContext  (./pgexodus.so)&lt;br /&gt;
Unused direct dependencies:&lt;br /&gt;
&lt;br /&gt;
        /lib/librt.so.1&lt;br /&gt;
        /usr/lib/libpq.so.5&lt;br /&gt;
        /lib/libm.so.6&lt;br /&gt;
        /lib/libgcc_s.so.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing pgexodus ===&lt;br /&gt;
&lt;br /&gt;
Copy the library to the postgres library folder&lt;br /&gt;
&lt;br /&gt;
 sudo cp pgexodus.so `pg_config --pkglibdir`&lt;br /&gt;
&lt;br /&gt;
Register the c functions in postgres&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
 \connect exodus&lt;br /&gt;
&lt;br /&gt;
{{postgres function installation}}&lt;br /&gt;
&lt;br /&gt;
Check the functions loaded properly&lt;br /&gt;
&lt;br /&gt;
 \df exodus*&lt;br /&gt;
&lt;br /&gt;
Quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
For more information see http://www.postgresql.org/docs/8.1/static/app-psql.html&lt;br /&gt;
&lt;br /&gt;
=== Building libexodus ===&lt;br /&gt;
&lt;br /&gt;
libexodus.so is a shared library that allows you to write c++ programs with the style and semantics of pick basic.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
First copy the headers to a standard include path&lt;br /&gt;
&lt;br /&gt;
 #include files&lt;br /&gt;
 sudo cp exo*.h /usr/include&lt;br /&gt;
 sudo cp mv*.h /usr/include&lt;br /&gt;
&lt;br /&gt;
Ignore three warnings in /boost/thread/tss.hpp included from mvdbpostgres.cpp&lt;br /&gt;
&lt;br /&gt;
 #get into the source code&lt;br /&gt;
 cd ~/exodus/trunk/exodus/mv/src&lt;br /&gt;
 #compile all cpp&lt;br /&gt;
 g++ -fPIC -c *.cpp&lt;br /&gt;
 #compile all c&lt;br /&gt;
 gcc -fPIC -c *.c&lt;br /&gt;
 #link and output the library file&lt;br /&gt;
 g++ -shared -o libexodus.so.1.0 *.o -lc -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt\&lt;br /&gt;
  -lboost_thread-gcc41-mt -Wl,-soname,libexodus.so.1&lt;br /&gt;
&lt;br /&gt;
=== Installing libexodus ===&lt;br /&gt;
&lt;br /&gt;
This will place the libraries and include files so that you can compile from anywhere on the system&lt;br /&gt;
&lt;br /&gt;
 #copy to a standard library folder&lt;br /&gt;
 sudo cp libexodus.so.1.0 /usr/lib&lt;br /&gt;
 #register the library file with the linux library cache&lt;br /&gt;
 sudo ldconfig -v&lt;br /&gt;
 #create the pointer to version 1&lt;br /&gt;
 sudo ln -sf /usr/lib/libexodus.so.1 /usr/lib/libexodus.so&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
http://www.ibm.com/developerworks/library/l-shobj/&lt;br /&gt;
&lt;br /&gt;
 ldd libexodus.so.1.0|grep &amp;quot;not found&amp;quot;&lt;br /&gt;
 ldd -u libexodus.so.1.0&lt;br /&gt;
&lt;br /&gt;
=== Testing libexodus ===&lt;br /&gt;
&lt;br /&gt;
 g++ test.cpp -lexodus&lt;br /&gt;
 ./a.out&lt;br /&gt;
 ldd -u a.out&lt;br /&gt;
&lt;br /&gt;
== Building service ==&lt;br /&gt;
&lt;br /&gt;
service is an incomplete multithreaded framework to support dynamic loading of library routines and serving a request/response queue.&lt;br /&gt;
&lt;br /&gt;
www provides an optional web interface to the request/response queue. Windows only at the moment due to a single asp files but could be ported to php.&lt;br /&gt;
&lt;br /&gt;
=== Building service ===&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/service/service&lt;br /&gt;
&lt;br /&gt;
 g++ -fPIC -c *.cpp -I/usr/local/include/boost-1_38 -I../../exodus/mv/src&lt;br /&gt;
 g++ -shared -o libservice.so -lc *.o&lt;br /&gt;
 g++ -o service main.cpp -I/usr/local/include/boost-1_38 -L. -L/usr/local/lib -lexodus -lpq -lboost_filesystem-gcc41-mt\&lt;br /&gt;
 -lboost_regex-gcc41-mt -lboost_thread-gcc41-mt -L../../exodus/mv/src -I../../exodus/mv/src -L./ -lservice&lt;br /&gt;
&lt;br /&gt;
=== Running service ===&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=../../exodus/mv/src:.:/usr/local/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
 ./service&lt;br /&gt;
&lt;br /&gt;
== Developing libexodus/service ==&lt;br /&gt;
&lt;br /&gt;
=== Committing your developments ===&lt;br /&gt;
&lt;br /&gt;
First get a username and password by running the following unix command and send the output to an exodus subversion administrator eg steve.bush@neosys.com&lt;br /&gt;
&lt;br /&gt;
 htpasswd -nm YOURDESIREDUSERNAME&lt;br /&gt;
&lt;br /&gt;
The administrator needs to run the following command as root and enter the encrypted pass (the bit AFTER the :) ignoring the warning about plain text password because it is already encrypted.&lt;br /&gt;
&lt;br /&gt;
 htpasswd -p /etc/apache2/dav_svn.passwd YOURDESIREDUSERNAME&lt;/div&gt;</summary>
		<author><name>71.229.245.189</name></author>
	</entry>
	<entry>
		<id>https://devwiki.neosys.com/index.php?title=Linux&amp;diff=410</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://devwiki.neosys.com/index.php?title=Linux&amp;diff=410"/>
		<updated>2009-06-19T15:09:03Z</updated>

		<summary type="html">&lt;p&gt;71.229.245.189: /* Installing Postgres */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing dependencies ==&lt;br /&gt;
&lt;br /&gt;
Tested on Centos 5.2/Boost 1.38/Postgres 8.3/Gnu Compiler 4.1.2&lt;br /&gt;
&lt;br /&gt;
It might work with versions as far back as Boost 1.35 and Postgres 8.1 perhaps with minor tweaks.&lt;br /&gt;
&lt;br /&gt;
=== Installing Boost ===&lt;br /&gt;
&lt;br /&gt;
Required for complete build of Boost - but those bits of Boost may not actually be required by Exodus.&lt;br /&gt;
&lt;br /&gt;
 yum install python-devel&lt;br /&gt;
 yum install bzip2-devel&lt;br /&gt;
&lt;br /&gt;
Download it&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.sourceforge.net/boost/boost_1_38_0.tar.bz2?use_mirror=garr&lt;br /&gt;
&lt;br /&gt;
Unpack it&lt;br /&gt;
&lt;br /&gt;
 tar xvf boost_1_38_0.tar.bz2&lt;br /&gt;
 cd boost_1_38_0&lt;br /&gt;
&lt;br /&gt;
Actually only the following parts are required but how to a partial build is unknown at the moment.&lt;br /&gt;
&lt;br /&gt;
# Boost DateTime&lt;br /&gt;
# Boost FileSystem&lt;br /&gt;
# Boost IOstream&lt;br /&gt;
# Boost Interprocess&lt;br /&gt;
# Boost ProgramOptions&lt;br /&gt;
# Boost Regex&lt;br /&gt;
# Boost System&lt;br /&gt;
# Boost Thread&lt;br /&gt;
&lt;br /&gt;
Become superuser to build and install it.&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;/usr/local/lib&amp;quot; to the list of lib directories to ensure that the boost libs can be found.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/ld.so.conf&lt;br /&gt;
&lt;br /&gt;
Ensure the new config is operational.&lt;br /&gt;
&lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Ensure boost includes can be found&lt;br /&gt;
&lt;br /&gt;
 ln -s /usr/local/include/boost-1_38/boost /usr/local/include/boost&lt;br /&gt;
&lt;br /&gt;
Quit superuser&lt;br /&gt;
&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
=== Building your own Boost libraries from source ===&lt;br /&gt;
&lt;br /&gt;
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres ===&lt;br /&gt;
&lt;br /&gt;
Version 8.3&lt;br /&gt;
&lt;br /&gt;
 yum install postgresql&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 sudo aptitude install postgresql-8.3&lt;br /&gt;
&lt;br /&gt;
=== Setting up Postgres for Exodus ===&lt;br /&gt;
&lt;br /&gt;
become user postgres and get into postgres command prompt&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
&lt;br /&gt;
create a user and database for exodus&lt;br /&gt;
&lt;br /&gt;
 CREATE ROLE exodus LOGIN&lt;br /&gt;
  PASSWORD &#039;somesillysecret&#039;&lt;br /&gt;
  CREATEDB CREATEROLE;&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE exodus&lt;br /&gt;
  WITH ENCODING=&#039;UTF8&#039;&lt;br /&gt;
    OWNER=exodus;&lt;br /&gt;
&lt;br /&gt;
 #quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Allow login from 127.0.0.1 using username/unencrypted password (instead of only logged-in username without password)&lt;br /&gt;
http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nano /var/lib/pgsql/data/pg_hba.conf&lt;br /&gt;
&lt;br /&gt;
 #host    all         all         127.0.0.1/32          ident sameuser&lt;br /&gt;
 host    all         all         127.0.0.1/32          password&lt;br /&gt;
 hostssl all         all         0.0.0.0/0             password&lt;br /&gt;
&lt;br /&gt;
 service postgresql reload&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing g++ compiler ===&lt;br /&gt;
&lt;br /&gt;
 yum list|grep gcc&lt;br /&gt;
&lt;br /&gt;
 yum install gcc-c++.i386&lt;br /&gt;
&lt;br /&gt;
=== Installing Postgres development libraries ===&lt;br /&gt;
&lt;br /&gt;
Look for all available postgres packages and if they are installed&lt;br /&gt;
&lt;br /&gt;
 yum list|grep postgres&lt;br /&gt;
 &lt;br /&gt;
 yum install postgresql-devel&lt;br /&gt;
&lt;br /&gt;
Locate postgres.h for interest&lt;br /&gt;
&lt;br /&gt;
 updatedb&lt;br /&gt;
 locate postgres.h&lt;br /&gt;
&lt;br /&gt;
== Downloading and Building Exodus ==&lt;br /&gt;
&lt;br /&gt;
=== Downloading Exodus ===&lt;br /&gt;
&lt;br /&gt;
Make a folder for exodus&lt;br /&gt;
&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir exodus&lt;br /&gt;
 cd exodus&lt;br /&gt;
&lt;br /&gt;
Download the main trunk of Exodus&lt;br /&gt;
&lt;br /&gt;
 svn checkout http://svn.neosys.com/svn/trunk&lt;br /&gt;
&lt;br /&gt;
=== Building pgexodus ===&lt;br /&gt;
&lt;br /&gt;
pgexodus.so is a shared library addin c function for postgres to perform sort/select/index functions otherwise it is not required.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
Note that all routines are marked for &amp;quot;C linkage&amp;quot; in order to work with the postgres library &amp;quot;pq&amp;quot;. For convenience they are all compiled under C++ since callexodus requires boost which is c++. The .c routines could equally well be compiled with the plain c compiler. The link stage must be done in c++ style in order to link to the c++ runtime library &amp;quot;rt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/exodus/pgexodus/src&lt;br /&gt;
&lt;br /&gt;
 g++ -fpic -c pgexodus.c extract.c callexodus.cpp naturalorder.cpp pgnaturalorder.cpp -I `pg_config --includedir-server` -I /usr/local/include/boost-1_38&lt;br /&gt;
 g++ -shared -o pgexodus.so pgexodus.o extract.o callexodus.o naturalorder.o pgnaturalorder.o -lrt -lpq&lt;br /&gt;
&lt;br /&gt;
Check the build as follows:&lt;br /&gt;
&lt;br /&gt;
 ld pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like the following. These 8 references to the postgres library all seem to be resolved at runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pgexodus.so: undefined reference to `Float8GetDatum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_atoi&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `CurrentMemoryContext&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pg_detoast_datum&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `pfree&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_start&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `MemoryContextAlloc&#039;&lt;br /&gt;
pgexodus.so: undefined reference to `elog_finish&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also check the following&lt;br /&gt;
&lt;br /&gt;
 ldd -u pgexodus.so&lt;br /&gt;
&lt;br /&gt;
Should give something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./pgexodus.so: error: symbol lookup error: undefined symbol: CurrentMemoryContext (continued)&lt;br /&gt;
undefined symbol: CurrentMemoryContext  (./pgexodus.so)&lt;br /&gt;
Unused direct dependencies:&lt;br /&gt;
&lt;br /&gt;
        /lib/librt.so.1&lt;br /&gt;
        /usr/lib/libpq.so.5&lt;br /&gt;
        /lib/libm.so.6&lt;br /&gt;
        /lib/libgcc_s.so.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing pgexodus ===&lt;br /&gt;
&lt;br /&gt;
Copy the library to the postgres library folder&lt;br /&gt;
&lt;br /&gt;
 sudo cp pgexodus.so `pg_config --pkglibdir`&lt;br /&gt;
&lt;br /&gt;
Register the c functions in postgres&lt;br /&gt;
&lt;br /&gt;
 sudo su - postgres&lt;br /&gt;
 psql&lt;br /&gt;
 \connect exodus&lt;br /&gt;
&lt;br /&gt;
{{postgres function installation}}&lt;br /&gt;
&lt;br /&gt;
Check the functions loaded properly&lt;br /&gt;
&lt;br /&gt;
 \df exodus*&lt;br /&gt;
&lt;br /&gt;
Quit postgres command prompt and quite postgres user&lt;br /&gt;
&lt;br /&gt;
 \q&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
For more information see http://www.postgresql.org/docs/8.1/static/app-psql.html&lt;br /&gt;
&lt;br /&gt;
=== Building libexodus ===&lt;br /&gt;
&lt;br /&gt;
libexodus.so is a shared library that allows you to write c++ programs with the style and semantics of pick basic.&lt;br /&gt;
&lt;br /&gt;
Currently hand built without even a make file.  standard configure/make using autoconf/automake will be available soon http://www.lrde.epita.fr/~adl/dl/autotools.pdf&lt;br /&gt;
&lt;br /&gt;
First copy the headers to a standard include path&lt;br /&gt;
&lt;br /&gt;
 #include files&lt;br /&gt;
 sudo cp exo*.h /usr/include&lt;br /&gt;
 sudo cp mv*.h /usr/include&lt;br /&gt;
&lt;br /&gt;
Ignore three warnings in /boost/thread/tss.hpp included from mvdbpostgres.cpp&lt;br /&gt;
&lt;br /&gt;
 #get into the source code&lt;br /&gt;
 cd ~/exodus/trunk/exodus/mv/src&lt;br /&gt;
 #compile all cpp&lt;br /&gt;
 g++ -fPIC -c *.cpp&lt;br /&gt;
 #compile all c&lt;br /&gt;
 gcc -fPIC -c *.c&lt;br /&gt;
 #link and output the library file&lt;br /&gt;
 g++ -shared -o libexodus.so.1.0 *.o -lc -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt\&lt;br /&gt;
  -lboost_thread-gcc41-mt -Wl,-soname,libexodus.so.1&lt;br /&gt;
&lt;br /&gt;
=== Installing libexodus ===&lt;br /&gt;
&lt;br /&gt;
This will place the libraries and include files so that you can compile from anywhere on the system&lt;br /&gt;
&lt;br /&gt;
 #copy to a standard library folder&lt;br /&gt;
 sudo cp libexodus.so.1.0 /usr/lib&lt;br /&gt;
 #register the library file with the linux library cache&lt;br /&gt;
 sudo ldconfig -v&lt;br /&gt;
 #create the pointer to version 1&lt;br /&gt;
 sudo ln -sf /usr/lib/libexodus.so.1 /usr/lib/libexodus.so&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
http://www.ibm.com/developerworks/library/l-shobj/&lt;br /&gt;
&lt;br /&gt;
 ldd libexodus.so.1.0|grep &amp;quot;not found&amp;quot;&lt;br /&gt;
 ldd -u libexodus.so.1.0&lt;br /&gt;
&lt;br /&gt;
=== Testing libexodus ===&lt;br /&gt;
&lt;br /&gt;
 g++ test.cpp -lexodus&lt;br /&gt;
 ./a.out&lt;br /&gt;
 ldd -u a.out&lt;br /&gt;
&lt;br /&gt;
== Building service ==&lt;br /&gt;
&lt;br /&gt;
service is an incomplete multithreaded framework to support dynamic loading of library routines and serving a request/response queue.&lt;br /&gt;
&lt;br /&gt;
www provides an optional web interface to the request/response queue. Windows only at the moment due to a single asp files but could be ported to php.&lt;br /&gt;
&lt;br /&gt;
=== Building service ===&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/trunk/service/service&lt;br /&gt;
&lt;br /&gt;
 g++ -fPIC -c *.cpp -I/usr/local/include/boost-1_38 -I../../exodus/mv/src&lt;br /&gt;
 g++ -shared -o libservice.so -lc *.o&lt;br /&gt;
 g++ -o service main.cpp -I/usr/local/include/boost-1_38 -L. -L/usr/local/lib -lexodus -lpq -lboost_filesystem-gcc41-mt\&lt;br /&gt;
 -lboost_regex-gcc41-mt -lboost_thread-gcc41-mt -L../../exodus/mv/src -I../../exodus/mv/src -L./ -lservice&lt;br /&gt;
&lt;br /&gt;
=== Running service ===&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=../../exodus/mv/src:.:/usr/local/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
 ./service&lt;br /&gt;
&lt;br /&gt;
== Developing libexodus/service ==&lt;br /&gt;
&lt;br /&gt;
=== Committing your developments ===&lt;br /&gt;
&lt;br /&gt;
First get a username and password by running the following unix command and send the output to an exodus subversion administrator eg steve.bush@neosys.com&lt;br /&gt;
&lt;br /&gt;
 htpasswd -nm YOURDESIREDUSERNAME&lt;br /&gt;
&lt;br /&gt;
The administrator needs to run the following command as root and enter the encrypted pass (the bit AFTER the :) ignoring the warning about plain text password because it is already encrypted.&lt;br /&gt;
&lt;br /&gt;
 htpasswd -p /etc/apache2/dav_svn.passwd YOURDESIREDUSERNAME&lt;/div&gt;</summary>
		<author><name>71.229.245.189</name></author>
	</entry>
</feed>