Bug#457075: Salomé packaging
Hi Adam,
Sorry for the lack of news, I was focus on making VISU work. I have
succeeded to build a Salome package however the current result is
unfortunately split from our development line. That's why I will first
explain my steps and then ask your advice on the merge as I saw that
serious reorganizations are also pending.
My goal is to provide a functional Salome package for mechanical
engineering even if incomplete. As a consequence the necessary modules
are for me KERNEL, GUI, GEOM, MED, SMESH and VISU. As VISU was failing
in the build process of debian/rules, I decided to build it by hand by
exporting the necessary environment variables. In that case I only had
to modify the gui-build-in-tree.patch (attached to the mail) for making
the libVISU linking work by adding the path to libToolsGUI.
However, back to the complete debian/rules process, the compilation
was still failing in the VISU CONVERTER library because of an absent
template symbol (probably the same problem described in your mail on
the 25th of January). So I needed to investigate the configure and
build steps of debian/rules but those steps take lot of time. For
easing my researchs, I decided to work on a package building
only the necessary modules which I called salome-core. The working
snapshot is available here:
http://www.python-science.org/files/salome-core.tar.gz
and I have attached the resulting debian/rules which configure
every module separately. I could not find the problem in the
previous loop configuration.
>From there two questions arise. First, I like the debian/rules file
of salome-core but I remember that you were against such solution for
maintenance reasons. Would you like me to adapt it as a loop or did you
finally change your mind? From now it seems anyway that VISU needs to be
configured separately. Second, could the current salome-core package be
a starting point for the reorganizations that we discussed previously?
For me it has the main advantage to build only the necessary modules,
thus saving time for every run of Salome packaging. However it will
require to write several packages (salome-advance and salome-dev).
By comparing to the opencascade package, I understand that the whole
building should be made in a row and the subpackages splitted by
several *.install files.
...
> > > > - self.CMD=['SALOME_ContainerPy.py','FactoryServerPy']
+ self.CMD=['SALOME_Container','FactoryServerPy']
(I have adapted the patch to the current version.)
...
> I just took care of this, the result is in the alioth git repository.
Thank you for the update. Even if the current version work, I would
prefer to rename 'SALOME_ContainerPy.py' to 'SALOME_ContainerPy' because
'/usr/bin/SALOME_Container' already exists and is finally overwritten in
the install step of debian/rules.
Even if several points still need to be discussed or adapted, the
good point is that we know now how to build a Salome package with the
essential modules. Once again, thank you very much for all your efforts.
I am going to track the remaining bugs at runtime (some menu do not show
up in SMESH, the results can not be seen in VISU).
All the best,
André
Changes needed to build all modules before installing them.
diff --git a/GUI_SRC_5.1.3/adm_local/unix/config_files/check_GUI.m4 b/GUI_SRC_5.1.3/adm_local/unix/config_files/check_GUI.m4
index ec07762..73d2eb9 100755
--- a/GUI_SRC_5.1.3/adm_local/unix/config_files/check_GUI.m4
+++ b/GUI_SRC_5.1.3/adm_local/unix/config_files/check_GUI.m4
@@ -59,19 +59,27 @@ if test -f ${SALOME_GUI_DIR}/bin/salome/$1 ; then
SalomeGUI_ok=yes
AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR})
+ GUI_LDFLAGS=-L${SALOME_GUI_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+ GUI_CXXFLAGS=-I${SALOME_GUI_DIR}/include/salome
+elif test -f ${SALOME_GUI_DIR}/src/$3/$1.cxx ; then
+ SalomeGUI_ok=yes
+ AC_MSG_RESULT(Using SALOME GUI source directory in ${SALOME_GUI_DIR})
+
+ GUI_LDFLAGS="-L${SALOME_GUI_DIR}/src/SUIT -L${SALOME_GUI_DIR}/src/Qtx -L${SALOME_GUI_DIR}/src/VTKViewer -L${SALOME_GUI_DIR}/src/SVTK -L${SALOME_GUI_DIR}/src/OBJECT -L${SALOME_GUI_DIR}/src/SalomeApp -L${SALOME_GUI_DIR}/src/Session -L${SALOME_GUI_DIR}/src/LightApp -L${SALOME_GUI_DIR}/src/OCCViewer -L${SALOME_GUI_DIR}/src/CAM -L${SALOME_GUI_DIR}/src/SOCC -L${SALOME_GUI_DIR}/src/Event -L${SALOME_GUI_DIR}/src/Prs -L${SALOME_GUI_DIR}/src/STD -L${SALOME_GUI_DIR}/src/PyConsole -L${SALOME_GUI_DIR}/src/SPlot2d -L${SALOME_GUI_DIR}/src/Plot2d -L${SALOME_GUI_DIR}/src/ObjBrowser -L${SALOME_GUI_DIR}/src/PyInterp -L${SALOME_GUI_DIR}/src/LogWindow -L${SALOME_GUI_DIR}/src/GLViewer -L${SALOME_GUI_DIR}/src/SUPERVGraph -L${SALOME_GUI_DIR}/src/SUITApp -L${SALOME_GUI_DIR}/src/QxScene -L${SALOME_GUI_DIR}/src/TOOLSGUI"
+ GUI_CXXFLAGS="-I${SALOME_GUI_DIR}/src/SVTK -I${SALOME_GUI_DIR}/src/OBJECT -I${SALOME_GUI_DIR}/src/VTKViewer -I${SALOME_GUI_DIR}/src/SUIT -I${SALOME_GUI_DIR}/src/Qtx -I${SALOME_GUI_DIR}/src/SalomeApp -I${SALOME_GUI_DIR}/src/LightApp -I${SALOME_GUI_DIR}/src/CAM -I${SALOME_GUI_DIR}/src/STD -I${SALOME_GUI_DIR}/src/OCCViewer -I${SALOME_GUI_DIR}/src/Prs -I${SALOME_GUI_DIR}/src/SOCC -I${SALOME_GUI_DIR}/src/ObjBrowser -I${SALOME_GUI_DIR}/src/Event -I${SALOME_GUI_DIR}/src/PyConsole -I${SALOME_GUI_DIR}/src/SPlot2d -I${SALOME_GUI_DIR}/src/Plot2d -I${SALOME_GUI_DIR}/src/GLViewer -I${SALOME_GUI_DIR}/src/QxScene"
+else
+ AC_MSG_WARN("Cannot find compiled SALOME GUI distribution")
+fi
+
+if test "x${SalomeGUI_ok}" == "xyes" ; then
if test "x${GUI_ROOT_DIR}" == "x" ; then
GUI_ROOT_DIR=${SALOME_GUI_DIR}
fi
AC_SUBST(GUI_ROOT_DIR)
- GUI_LDFLAGS=-L${SALOME_GUI_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
- GUI_CXXFLAGS=-I${SALOME_GUI_DIR}/include/salome
-
AC_SUBST(GUI_LDFLAGS)
AC_SUBST(GUI_CXXFLAGS)
-else
- AC_MSG_WARN("Cannot find compiled SALOME GUI distribution")
fi
AC_MSG_RESULT(for $2: ${SalomeGUI_ok})
@@ -80,5 +88,6 @@ AC_MSG_RESULT(for $2: ${SalomeGUI_ok})
AC_DEFUN([CHECK_SALOME_GUI],[
CHECK_GUI([SUITApp],
- [SALOME GUI])
+ [SALOME GUI],
+ [SUITApp],)
])dnl
diff --git a/GUI_SRC_5.1.3/adm_local/unix/config_files/check_corba_in_GUI.m4 b/GUI_SRC_5.1.3/adm_local/unix/config_files/check_corba_in_GUI.m4
index cfa4a04..6bbf7b8 100755
--- a/GUI_SRC_5.1.3/adm_local/unix/config_files/check_corba_in_GUI.m4
+++ b/GUI_SRC_5.1.3/adm_local/unix/config_files/check_corba_in_GUI.m4
@@ -26,7 +26,8 @@ dnl
AC_DEFUN([CHECK_CORBA_IN_GUI],[
CHECK_GUI([SALOME_Session_Server],
- [CORBA SALOME GUI])
+ [CORBA SALOME GUI],
+ [Session])
CORBA_IN_GUI=${SalomeGUI_ok}
AC_SUBST(CORBA_IN_GUI)
])dnl
diff --git a/GUI_SRC_5.1.3/idl/Makefile.am b/GUI_SRC_5.1.3/idl/Makefile.am
index c234fd0..3986923 100755
--- a/GUI_SRC_5.1.3/idl/Makefile.am
+++ b/GUI_SRC_5.1.3/idl/Makefile.am
@@ -49,9 +49,9 @@ libSalomeIDLGUI_la_LIBADD = @CORBA_LIBS@
# These variables defines the building process of CORBA files
OMNIORB_IDL = @OMNIORB_IDL@
OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
-OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome
-IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome
-IDLPYFLAGS = @IDLPYFLAGS@ -I$(KERNEL_ROOT_DIR)/idl/salome
+OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
+IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
+IDLPYFLAGS = @IDLPYFLAGS@ -I$(KERNEL_ROOT_DIR)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
# potential problem on parallel make on the following - multiple outputs
SUFFIXES = .idl .hh SK.cc
@@ -82,7 +82,7 @@ mostlyclean-local:
@for dep in $^ dummy; do \
if [ $$dep != "dummy" ]; then \
echo Building dependencies for $$dep; \
- $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \
+ $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl -I$(KERNEL_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \
sed 's/\.o/\SK.cc/' >>$@; \
fi; \
done ;
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=salome-core
SALOME_VERSION=5.1.3
VTK_VERSION=5.4
# Support multiple makes at once
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
NJOBS := 1
endif
SALOME_CORE_MODULES = KERNEL_SRC_$(SALOME_VERSION) \
GUI_SRC_$(SALOME_VERSION) \
GEOM_SRC_$(SALOME_VERSION) \
MED_SRC_$(SALOME_VERSION) \
SMESH_SRC_$(SALOME_VERSION) \
VISU_SRC_$(SALOME_VERSION)
clean:
dh_testdir
dh_clean
configure-stamp:
dh_testdir
# KERNEL
rm -f KERNEL_SRC_$(SALOME_VERSION)/bin/runSalome
rm -f KERNEL_SRC_$(SALOME_VERSION)/bin/appliskel/env.d/envProducts.sh
cp -fp debian/runSalome.in debian/killSalome.in \
KERNEL_SRC_$(SALOME_VERSION)/bin/
cp -fp debian/envProducts.sh.in \
KERNEL_SRC_$(SALOME_VERSION)/bin/appliskel/env.d/
(cd KERNEL_SRC_$(SALOME_VERSION) && \
./build_configure && \
./configure --prefix=/usr \
--with-mpi=/usr --with-mpi_include=/usr/include/mpi);
# GUI
(cd GUI_SRC_$(SALOME_VERSION) && \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
./build_configure && \
./configure --prefix=/usr \
--with-mpi=/usr --with-mpi_include=/usr/include/mpi \
VTKSUFFIX="-$(VTK_VERSION)" CASROOT=/usr \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION));
# GEOM
(cd GEOM_SRC_$(SALOME_VERSION) && \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION) \
./build_configure && \
./configure --prefix=/usr \
--with-mpi=/usr --with-mpi_include=/usr/include/mpi \
VTKSUFFIX="-$(VTK_VERSION)" CASROOT=/usr \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION));
# MED
(cd MED_SRC_$(SALOME_VERSION) && \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION) \
./build_configure && \
./configure --prefix=/usr \
--with-mpi=/usr --with-mpi_include=/usr/include/mpi \
VTKSUFFIX="-$(VTK_VERSION)" CASROOT=/usr \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION));
# SMESH
(cd SMESH_SRC_$(SALOME_VERSION) && \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION) \
GEOM_ROOT_DIR=$(CURDIR)/GEOM_SRC_$(SALOME_VERSION) \
MED_ROOT_DIR=$(CURDIR)/MED_SRC_$(SALOME_VERSION) \
./build_configure && \
./configure --prefix=/usr \
--with-mpi=/usr --with-mpi_include=/usr/include/mpi \
VTKSUFFIX="-$(VTK_VERSION)" CASROOT=/usr \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION) \
GEOM_ROOT_DIR=$(CURDIR)/GEOM_SRC_$(SALOME_VERSION) \
MED_ROOT_DIR=$(CURDIR)/MED_SRC_$(SALOME_VERSION));
# VISU
(cd VISU_SRC_$(SALOME_VERSION) && \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION) \
MED_ROOT_DIR=$(CURDIR)/MED_SRC_$(SALOME_VERSION) \
./build_configure && \
./configure --prefix=/usr \
--with-mpi=/usr --with-mpi_include=/usr/include/mpi \
VTKSUFFIX="-$(VTK_VERSION)" CASROOT=/usr \
KERNEL_ROOT_DIR=$(CURDIR)/KERNEL_SRC_$(SALOME_VERSION) \
GUI_ROOT_DIR=$(CURDIR)/GUI_SRC_$(SALOME_VERSION) \
MED_ROOT_DIR=$(CURDIR)/MED_SRC_$(SALOME_VERSION));
touch $@
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
for salomodule in $(SALOME_CORE_MODULES); do \
echo; echo COMPILING SALOME MODULE $$salomodule; echo; \
$(MAKE) -C $$salomodule -j $(NJOBS) \
bindir=/usr/bin libdir=/usr/lib docdir=/usr/share/doc/salome-doc;\
done
touch $@
build-indep: build-indep-stamp
build-indep-stamp: configure-stamp
touch $@
install: build install-stamp
install-arch: build-arch install-stamp
install-indep: install-indep-stamp
# Later maybe make this run make install only in the doc directories, so it
# doesn't try to build everything else
install-indep-stamp: build-indep install-stamp
touch $@
# This installs everything, so it's not really install-arch-stamp
install-stamp:
dh_testdir
# Add XDATA to list below when its clean target actually works
for salomodule in $(SALOME_CORE_MODULES); do \
echo; echo INSTALLING SALOME MODULE $$salomodule; echo; \
$(MAKE) -C $$salomodule install DESTDIR=$(CURDIR)/debian/tmp \
bindir=/usr/bin libdir=/usr/lib docdir=/usr/share/doc/salome-doc;\
done
mv debian/tmp/usr/idl debian/tmp/usr/share/
install -d debian/tmp/usr/share/aclocal
mv debian/tmp/usr/salome_adm/unix/config_files/check_Kernel.m4 \
debian/tmp/usr/share/aclocal/salome.m4
for m4file in check_GUI.m4 \
check_GEOM.m4 \
check_Med.m4 \
check_SMESH.m4; do \
cat debian/tmp/usr/adm_local/unix/config_files/$$m4file >> \
debian/tmp/usr/share/aclocal/salome.m4; \
done
# Temporary kludge until there's a more permanent way to install this
cp KERNEL_SRC_$(SALOME_VERSION)/bin/killSalome debian/tmp/usr/bin/
chmod +x debian/tmp/usr/bin/killSalome
install -d debian/tmp/usr/share/applications
rm -f debian/tmp/usr/bin/appliskel/env.d/*.in \
debian/tmp/usr/bin/appliskel/env.d/*.obs
mv debian/tmp/usr/lib/SalomePyQt.so debian/tmp/usr/lib/SalomePyQt.so.0
ln -s SalomePyQt.so.0 debian/tmp/usr/lib/SalomePyQt.so
rm -rf debian/tmp/usr/lib64
rm -rf debian/tmp/usr/doc
rm -rf debian/tmp/usr/bin/appliskel
rm -f debian/tmp/usr/bin/*.pyo \
debian/tmp/usr/bin/*.pyc \
debian/tmp/usr/bin/*.csh \
debian/tmp/usr/bin/*.ksh \
debian/tmp/usr/bin/*.bat
for shscript in `ls debian/tmp/usr/bin/*.sh`; do \
shbase=`basename $$shscript .sh`; \
mv debian/tmp/usr/bin/$$shbase.sh debian/tmp/usr/bin/$$shbase; \
done
mv debian/tmp/usr/bin/*.xml debian/tmp/usr/bin/VERSION \
debian/tmp/usr/share/salome/
mv debian/tmp/usr/bin/SALOME_ContainerPy.py \
debian/tmp/usr/bin/SALOME_ContainerPy
mv debian/tmp/usr/bin/*.py debian/tmp/usr/lib/python2.5/*-packages/salome/
chmod -x debian/tmp/usr/lib/python2.5/*-packages/salome/*
install -d debian/python2.5-salome/usr/bin
for pyscript in avs2med med2sauv salomeloader sauv2med SALOME_Container; do \
mv debian/tmp/usr/bin/$$pyscript debian/python2.5-salome/usr/bin/; \
done
(cd debian/tmp/usr/share/salome && \
chmod -x resources/*/*.xml)
install -d debian/salome-examples/usr/share/salome/examples
touch install-indep-stamp
touch $@
binary-indep: install-indep
dh_testdir -i
dh_testroot -i
dh_installdirs -i
dh_movefiles -i
dh_installdocs -i
dh_installchangelogs -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: install-arch
dh_testdir -a
dh_testroot -a
dh_installdirs -a
dh_movefiles -a
dh_installdocs -a
dh_installchangelogs -a
dh_installmenu -a
dh_strip -a
dh_makeshlibs -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-arch binary-indep
.PHONY: binary binary-arch binary-indep clean install install-arch install-indep build build-arch build-indep
Reply to: