[OpendTect_Developers] Building opendtect from source

Bert Bril bert.bril at gmail.com
Wed Jan 9 12:19:36 CET 2013


Hi all,


Antonio wrote:

> in order to implement some trivial modifications to the opendtect base
> source code, I discovered that cmake configuration process requires all
> libraries in place before starting.
>
> In other words, recompiling  most of the modules under version 4.2.0 did
> not require  Coin, SImvoleon, SoQt to be actually present. Now they must
> be available.

I guess that's the price of progress? I wasn't involved in the move to 
CMake BTW.


I just set up an environment at home: SuSE 12.2/64 bits, so let me share 
a bit more details. What seems to be handy is create directories for 
each of the dependencies. I made /apps. In there, I made directories 
coin, osg, osggeo, and qt.


For OpendTect itself - od and/or od4.4:

* Get od, or od4.4 from svn, like:
svn checkout https://svn.opendtect.org/od/trunk od
For od4.4 (the 'stable' branch), try:
svn checkout https://svn.opendtect.org/od/branches/od4.4 od4.4



For Qt:

   * install the qt-devel package
   * mkdir /apps/qt/bin and include
   * in bin, link /usr/bin/moc
   * in include, link /usr/include/Qt


For Coin:

* Download and install Coin-3.1.3.tar.gz and SoQt-1.5.0.tar.gz from 
https://bitbucket.org/Coin3D/coin/downloads
* fetched Coin3D-simvoleon-99617b213037.zip from
https://bitbucket.org/Coin3D/simvoleon. Unpacked. Then configured. So 
far so good.
* SIMVoleon build stops because of missing source files:
lib/VolumeViz/Coin/gl/CoinGLPerformance.h and .cpp
I simply created these files with just one line:
/* empty, hack */
That made SIMVoleon build.
But then I got a problem when building od in Debug mode, the complaint 
being that cc_debugerror_post was used before it was declared. For that, 
I had to hack a header file in Coin itself: in SbBasic.h, I removed the 
line with cc_debugerror_post in it, but you may want to be more graceful 
....


For OSG:

* Get OSG from openscenegraph.org (svn checkout 
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk 
OpenSceneGraph). Use cmake (or cmake-gui) to configure and build. Note 
that it will install in /usr/local if you don't specify a 
CMAKE_INSTALL_PREFIX.

* Get osgGeo from osggeo.googlecode.com (svn checkout 
http://osggeo.googlecode.com/svn/trunk/ osgGeo). Then cmake . 
-DOSG_DIR=/usr/local (or wherever you installed OSG).


Lastly, it's handy to put links in your 'od' (or 'od4.4') directory to 
actual installation directories of Qt, Coin and OSG.




It's still a whole lot easier to just make plugins ...


/Bert




More information about the Developers mailing list