howto compile salome on debian
-
I tried to compile salome2.2.2 from the source tarballs. So far I have been unsuccessful. Did someone succeed. Is there a Howto?
I found only one thread about the subject:
http://www.opencascade.org/org/forum/thread_8281/
I recognized many of the issues I had to overcome. It helped me to solve some others. But there is one issue which I didn't pass so far.
When gcc compiles LocalTraceCollector.cxx there is a conflict of definition for std::stringbuf in the file sstream and /usr/include/c++/3.2.3/iosfwd.
Here is the log of the compilation
make[3]: Entering directory `/usr/local/src/SALOME_2.2.2/KERNEL_BUILD/src/SALOME
LocalTrace'
../../libtool --mode=compile g++ -g -D_DEBUG_ -Wno-deprecated -Wparentheses -Wr
eturn-type -Wmissing-declarations -Wunused -DOMNIORB_VERSION=4 -D__x86__ -D__li
nux__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG -DHAVE_SOCKET -I/usr/local/src/SALOM
E_2.2.2/KERNEL_BUILD/salome_adm/unix -pthread -I../../include/salome -I/usr/loc
al/src/SALOME_2.2.2/KERNEL_SRC_2.2.2/src/SALOMELocalTrace -I. -I/usr/include -I/
usr/include/omniORB4 -I/usr/include/COS -c /usr/local/src/SALOME_2.2.2/KERNEL_S
RC_2.2.2/src/SALOMELocalTrace/LocalTraceCollector.cxx
g++ -g -D_DEBUG_ -Wno-deprecated -Wparentheses -Wreturn-type -Wmissing-declarati
ons -Wunused -DOMNIORB_VERSION=4 -D__x86__ -D__linux__ -DCOMP_CORBA_DOUBLE -DCOM
P_CORBA_LONG -DHAVE_SOCKET -I/usr/local/src/SALOME_2.2.2/KERNEL_BUILD/salome_adm
/unix -pthread -I../../include/salome -I/usr/local/src/SALOME_2.2.2/KERNEL_SRC_2
.2.2/src/SALOMELocalTrace -I. -I/usr/include -I/usr/include/omniORB4 -I/usr/incl
ude/COS -c /usr/local/src/SALOME_2.2.2/KERNEL_SRC_2.2.2/src/SALOMELocalTrace/Loc
alTraceCollector.cxx -fPIC -DPIC -o LocalTraceCollector.lo
In file included from /usr/local/src/SALOME_2.2.2/KERNEL_SRC_2.2.2/src/SALOMELoc
alTrace/LocalTraceCollector.cxx:28:
/usr/local/src/SALOME_2.2.2/KERNEL_BUILD/salome_adm/unix/sstream:36: conflicting
types for `struct std::stringbuf'
/usr/local/include/c++/3.2.3/iosfwd:110: previous declaration as `typedef
struct std::basic_stringbuf,
std::allocator > std::stringbuf'
/usr/local/src/SALOME_2.2.2/KERNEL_BUILD/salome_adm/unix/sstream:90: syntax
error before `;' token
/usr/local/src/SALOME_2.2.2/KERNEL_BUILD/salome_adm/unix/sstream:37: destructor
`stringbuf' must match class name `basic_ios'
/usr/local/src/SALOME_2.2.2/KERNEL_BUILD/salome_adm/unix/sstream:37: `virtual
std::basic_ios >::~basic_ios()' and `void
std::basic_ios<_CharT, _Traits>::basic_ios() [with _CharT = char, _Traits =
std::char_traits]' cannot be overloaded
------------------------------------------------------------------
A few information about the way I compiled
I use libtool1.5.6 automake 1.9.5 autoconf 2.59
I compiled qt-3.0.5 from the sources.
I cannot use libtvtk-dev from sebian package. There is a mismatch type of the GetScale function, (double* in the vtk includes and float* in salome). I compiled vtk from the sources downloaded from the website, not the CD SALOME (bugged).
OmniNotify
----------
apt-get install omniidl4
apt-get install omniorb4-idl
apt-get install libcos4-dev
apt-get install omniidl4-python
ln -s /usr/local/share/idl /usr/share/idl
SIP/PyQT
-----------
apt-get install python2.3-sip-qt3 python-qt-dev
environment variables
----------------------------
export PATH=/usr/local/bin:${PATH}
export CASROOT=/opt/OpenCASCADE5.2/ros
export CPPFLAGS=-I/usr/local/src/SALOME_2.2.2/KERNEL_BUILD/salome_adm/unix
export LD_LIBRARY_PATH=${CASROOT}/lin/lib:${LD_LIBRARY_PATH}
# Variable for Foundation Classes :
export CSF_UnitsLexicon=${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
export CSF_UnitsDefinition=${CASROOT}/src/UnitsAPI/Units.dat
# Variable for DataExchange :
export CSF_SHMessageStd=${CASROOT}/src/SHMessageStd
export CSF_XSMessage=${CASROOT}/src/XSMessage
# Variable for Font :
export CSF_MDTVFontDirectory=${CASROOT}/src/FontMFT
export CSF_MDTVTexturesDirectory=${CASROOT}/src/Textures
export BOOSTDIR=/usr/include/BOOSTDIR
export QTDIR=/usr/local/qt3.0.5
export PATH=$QTDIR/bin:${PATH}
export LD_LIBRARY_PATH=$QTDIR/lib:${LD_LIBRARY_PATH}
export VTKHOME=/usr/local
export PYVTK_PATH=/usr/local/lib/vtk
export LD_LIBRARY_PATH=${PYVTK_PATH}:${LD_LIBRARY_PATH}
export PYTHONPATH=/usr/local/VTK/Wrapping/Python:${PYVTK_PATH}:${PYTHONPATH}
export PATH=${VTKHOME}/bin:${PATH}
export PYQT_SIPS=/usr/share/sip/qt/qt
Thx
Benjamin-
Benjamin wrote:
I tried to compile salome2.2.2 from the source tarballs. So far I have been unsuccessful. Did someone succeed. Is there a Howto?
Hi
Here's the list of the debian Sarge packages I use:
Debian Packages | Version
and their -dev development package (use Synaptic to install both the package and its *-dev when available).
------------------------------------------------
g++ | 1:3.3.5-13
tcl8.4 | 8.4.9-1
tk8.4 | 8.4.9-1
tix8.1 | 8.1.4-8
python2.3 | 2.3.5-3
python2.3-qt3 | 3.13-4
python2.3-sip4-qt3 | 4.1.1-1
qt3-dev-tools | 3:3.3.4-3
libqt3-mt-dev | 3:3.3.4-3
libqwt4 | 4.2.0-2
g77 | 4:3.3.5-3
python-tk | 2.3.5-2
python-pyvtk | 0.4.66-3
libomniorb4 | 4.0.6-1
libcos4 | 4.0.6-1
omniorb4-nameserver | 4.0.6-1
omniorb4-idl | 4.0.6-1
omniidl4-python | 2.6-1
libomnithread3 | 4.0.6-1
python2.3-omniorb2 | 2.6-1
python2.3-omniorb2-omg | 2.6-1
swig | 1.3.24-1
libboost-dev | 1.32.0-6
libboost-filesystem-dev | 1.32.0-6
python-sip4-dev | 4.1.1-1
sip4 | 4.1.1-1
pyqt-tools | 3.13-4
python-qt-dev | 3.13-4
I compiled the following softwares:
CAS-5.2
hdf5-1.44
med-2.2.2
vtk-4.2.2
netgen-4.3
Here is the environment I source:
INSTALLROOT="/local/salome/prerequis"
#
# =======================================
#------ boost ------
export BOOSTDIR=/usr/include #( .m4)
export QTDIR=/usr #( .m4)
export PYQT_SIPS=/usr/share/sip/qt/qt #( .m4)
#------ cas ------
export CASROOT=${INSTALLROOT}/CAS-5.2
export LD_LIBRARY_PATH=${CASROOT}/lin/lib:${LD_LIBRARY_PATH}
# Variable for Foundation Classes :
export CSF_UnitsLexicon=${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
export CSF_UnitsDefinition=${CASROOT}/src/UnitsAPI/Units.dat
# Variable for DataExchange :
export CSF_SHMessageStd=${CASROOT}/src/SHMessageStd
export CSF_XSMessage=${CASROOT}/src/XSMessage
# Variable for Font :
export CSF_MDTVFontDirectory=${CASROOT}/src/FontMFT
export CSF_MDTVTexturesDirectory=${CASROOT}/src/Textures
#------ hdf ------
export HDF5HOME=${INSTALLROOT}/hdf5-1.4.4
export PATH=${HDF5HOME}/bin:$PATH
export LD_LIBRARY_PATH=${HDF5HOME}/lib:${LD_LIBRARY_PATH}
#------ med ------
export MED2HOME=${INSTALLROOT}/med-2.2.2
export PATH=${MED2HOME}/bin:${PATH}
export LD_LIBRARY_PATH=${MED2HOME}/lib:${LD_LIBRARY_PATH}
#------ vtk ------
export VTKHOME=${INSTALLROOT}/VTK-4.2.2
export PYVTK_PATH=$VTKHOME/lib/vtk
export LD_LIBRARY_PATH=${PYVTK_PATH}:$LD_LIBRARY_PATH
export PYTHONPATH=$VTKHOME/Wrapping/Python:${PYVTK_PATH}:$PYTHONPATH
export PATH=$VTKHOME/bin:$PATH
#------ netgen ------
export NETGENHOME=${INSTALLROOT}/netgen4.3/install
Tell me if it works.
Good luck.
Christophe-
>Tell me if it works.<br >
Good luck.
Christophe
Thx for your help (I had some omniorb packages missing), and thx for the help of Torsten (Sip4/PyQt/Qt3.3.4) as well. Now I successfully compiled salome on debian and it works! A few remarks:
It seems hdf5 can be installed from debian
libhdf5-serial-1.6.2-0 libhdf5-serial-dev hdf5-tools
I didn't have to compile OCC5.2.
Here are the modification I did to have salome to compile
OCC
---
cd /opt/OpenCASCADE/ros/inc/
ln -s /opt/OpenCASCADE/wok/lib/config.h .
qt3.3.4
-------
modified the Makefile in src/PatchQt to bypass the application of the patch.
To have salome working with qt3.3.4, in KERNEL_SRC_2.2.2/salome_adm/unix/config_files modify
in check_qt.m4 QT version to version 3.3.4
src/Session
---------------
I had to explicitely add -lqwt during the compilation of src/Session (?)
Did you compile salome with these twistings things?
Now I try to compile MED and GEOM, but both failed.
MED
------
libMEDMEM_Swig_wrap.cxx: In function `PyObject*
_wrap_GROUP_setFamilies(PyObject*, PyObject*)':
libMEDMEM_Swig_wrap.cxx:11274: no match for `
SwigValueWrapper
std::allocator > >& [int&]' operator
...
make[1]: *** [libMEDMEM_Swig_wrap.lo] Erreur 1
make[1]: Leaving directory `/usr/local/src/SALOME_2.2.2/MED_build/src/MEDMEM_SWIG'
make: *** [all] Erreur 2
GEOM
--------
/opt/OpenCASCADE5.2/ros/inc/BooleanOperations_ShapesDataStructure.hxx: In
member function `void NMTDS_ShapesDataStructure::Init()':
/opt/OpenCASCADE5.2/ros/inc/BooleanOperations_ShapesDataStructure.hxx:169: `
Standard_Integer
BooleanOperations_ShapesDataStructure::myNumberOfShapesOfTheObject' is
private
/usr/local/src/SALOME_2.2.2/GEOM_SRC_2.2.2/src/NMTDS/NMTDS_ShapesDataStructure.cxx:90: within
this context
...
/usr/local/src/SALOME_2.2.2/GEOM_SRC_2.2.2/src/NMTDS/NMTDS_ShapesDataStructure.cxx:186: within
this context
make[3]: *** [NMTDS_ShapesDataStructure.lo] Erreur 1
make[3]: Leaving directory `/usr/local/src/SALOME_2.2.2/GEOM_BUILD/src/NMTDS'
make[2]: *** [lib_NMTDS] Erreur 2
make[2]: Leaving directory `/usr/local/src/SALOME_2.2.2/GEOM_BUILD/src'
make[1]: *** [lib_src] Erreur 2
make[1]: Leaving directory `/usr/local/src/SALOME_2.2.2/GEOM_BUILD'
make: *** [all] Erreur 2
Did you successfully compile the other components of SALOME?
Thx
Benjamin-
I haven't compiled SALOME V2_2_2 with these full Debian pre-requisites, but the old ones:
Python-2.2.3, qt-x11-free-3.0.5, sip-3.3.2, PyQt-3.3.2, qwt-0.4.1, SWIG-1.3.17, omniORB-3.0.5.
Some porting patches were included in V2_2_2 but there remained some work.
I had some problems with Swig-1.3.24 which were solved by decreasing swig version to 1.3.22. This may solve your MED-compiling problem.
You will have to compile OCC-5.2 to compile GEOM module. You can use the binary for RedHat8.0 in the download section of this site. It may work on Debian. If it doesn't work, it will tell you which kind of files have to be in your OCC install folder. The "make install" of OCC doesn't copy all the files needed by SALOME.
I hope this will help.
Christophe-
Hello,
I have installed the debian sarge packages for most of the prerequists.
when first running salome I had a libssl symbol undefined (SSL_set_fd) which was defined changing my symbolic link for libssl ..
Salome seems to be working...
but when I try to create a new study, this what I get :
============== import GEOM =======================
============== import SMESH =======================
============== import DATA =======================
============== import VISU =======================
============== import SUPERV =======================
============== import MED_idl =======================
============== import MED_Gen_idl =======================
============== import SuperVisionTest =======================
Xlib: extension "XFree86-DRI" missing on display ":0.0".
SALOME_Session_Server: relocation error: /opt/salome/KERNEL_2.2.2/lib/salome/libqsplitterP.so.0: undefined symbol: _ZN19QSharedDoubleBufferC1EP7QWidgetRK5QRect
######
when I try to browse something in the catalog generator this is what I get :
SALOME_ContainerPy_i::ping
th. 3069207744 - Trace ../../../KERNEL_SRC/src/Loader/SALOME_Session_Loader.cxx [75] : Corba initialisation, Distant server
th. 2995693408 - Trace ../../../KERNEL_SRC/src/Session/SALOME_Session_Server.cxx [146] : Session activated, Launch IAPP...
th. 2995693408 - Trace ../../../KERNEL_SRC/src/Session/SALOME_Session_Server.cxx [152] : creation QApplication
th. 2995693408 - Trace ../../../KERNEL_SRC/src/Session/SALOME_Session_Server.cxx [157] : creation SALOMEGUI_Application
th. 2995693408 - Trace ../../../KERNEL_SRC/src/Session/SALOME_Session_Server.cxx [217] : run(): An exception has been caught SIGSEGV 'segmentation violation' detected. Address 0
######
when I'm typing import salome in the embeded python interpreter, I get this :
----------------------------------------------------------
no user defined launcher, ssh used. (see Launchers.py)
----------------------------------------------------------
Traceback (most recent call last):
File "", line 1, in ?
File "/opt/salome/KERNEL_2.2.2/bin/salome/salome.py", line 28, in ?
from salome_study import *
File "/opt/salome/KERNEL_2.2.2/bin/salome/salome_study.py", line 29, in ?
import salome_iapp
File "/opt/salome/KERNEL_2.2.2/bin/salome/salome_iapp.py", line 27, in ?
from libSALOME_Swig import *
File "/opt/salome/KERNEL_2.2.2/bin/salome/libSALOME_Swig.py", line 4, in ?
import _libSALOME_Swig
ImportError: /opt/salome/KERNEL_2.2.2/lib/salome/libqsplitterP.so.0: undefined symbol: _ZN19QSharedDoubleBufferC1EP7QWidgetRK5QRect
any idea someone ??
thanks-
Hi,
After many try and errors in trying to compile Salome 2.2.2 / OpenCascade 5.2 on debian, using prerequisites or not, I found a simple way to install salome.
I used the installer for RH8.0. One file need to be modified to be able to successfully install salome. If I remember I installed pretty much all the packages (except Tcl/Tk maybe). Then 2 or 3 symlinks have to be applied and it runs.
So far everything go ok for me now. I haven't tried RH9.0 installer (don't know the difference)
I don't remember exactly the file I modified nor the libraries to symlink but if you need help I can have a look again.
Benjamin
-
-
-
-
-
