Compilation on Ubuntu 9.10


comuniana - Posted on 20 January 2010

Problems related to the installation of SGeMS on Linux Ubuntu 9.10...

After an update of my Ubuntu distribution from 9.04 to 9.10 the following error on execution of SGeMS occurs:


[..]
Coin error in SoGroup::insertChild(): idx 2 is out of bounds (groupnode # children == 0)
Coin warning in SoAction::apply(): The root node that the SoSearchAction was applied to has a reference count equal to zero. This is a bug in your application code which you should rectify: you need to ref() (and later unref()) the top-level root node to make sure you avoid memory leaks (bad) and / or premature memory destruction (*really* bad) under certain conditions. Coin has an internal workaround to avoid just responding with mysterious crashes, but as it is not possible to cover _all_ cases of what can go wrong with this workaround you are *strongly* advised to fix the bug in your application code.
sgems: SoGroup.cpp:259: virtual SoNode* SoGroup::getChild(int) const: Assertion `(index >= 0) && (index < this->getNumChildren())' failed.
[..]

I tried to reinstall SGeMS from scratch, but I have the following error:

[...]
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DQT_NO_DEBUG -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I. -Ioinv_description -Iutils -Ivariogram2 -I/home/comuniana/MyDev/GsTL -I/home/comuniana/MyDev/GsTLAppli-qt4 -I/usr/include/Qt/viewers -I/usr/include -I/home/comuniana/MyDev/GsTL/GsTL/utils -I/usr/include/python2.6 -I/usr/X11R6/include -I.moc -I. -o ../../lib/linux/obj/gui/std_output_redirect.o utils/std_output_redirect.cpp
utils/std_output_redirect.cpp: In member function ‘virtual int GsTLbuf::overflow(int)’:
utils/std_output_redirect.cpp:30: error: ‘EOF’ was not declared in this scope
utils/std_output_redirect.cpp:30: warning: suggest explicit braces to avoid ambiguous ‘else’
make[2]: *** [../../lib/linux/obj/gui/std_output_redirect.o] Error 1
make[2]: Leaving directory `/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/gui'
make[1]: *** [sub-gui-make_default] Error 2
make[1]: Leaving directory `/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli'
make: *** [sub-GsTLAppli-make_default] Error 2


Adding to the file std_output_redirect.h
the library #include <cstdio> things goes better, but at the end there is still the error:

[...]
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DSIMVOLEON_DLL -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I. -I/home/comuniana/MyDev/GsTL -I/home/comuniana/MyDev/GsTLAppli-qt4 -I/usr/include -I/usr/include/python2.6 -I. -o ../../bin/linux/obj/main/main.o main.cpp
In file included from /home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/utils/manager.h:34,
from /home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/appli/manager_repository.h:33,
from main.cpp:42:
/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/utils/directory.h:41: warning: unused parameter ‘type_name’
/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/utils/directory.h:41: warning: unused parameter ‘name’
/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/utils/directory.h:41: warning: unused parameter ‘final_name’
/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/utils/directory.h:47: warning: unused parameter ‘name’
In file included from main.cpp:46:
/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/utils/progress_notifier.h:79: warning: unused parameter ‘str’
/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/utils/progress_notifier.h:134: warning: unused parameter ‘str’
main.cpp: In function ‘int nogui_main(int, char**)’:
main.cpp:154: warning: comparison with string literal results in unspecified behaviour
main.cpp: In function ‘int main(int, char**)’:
main.cpp:416: warning: comparison with string literal results in unspecified behaviour
main.cpp:416: warning: comparison with string literal results in unspecified behaviour
main.cpp:421: warning: comparison with string literal results in unspecified behaviour
g++ -Wl,-O1 -o ../../bin/linux/sgems ../../bin/linux/obj/main/lib_initializer.o ../../bin/linux/obj/main/main.o -L/usr/lib -L/home/comuniana/MyDev/GsTLAppli-qt4/lib/linux -L/usr/lib -lpython2.6 -lpthread -lQtXml -lQtGui -lQtCore -lQtUiTools
../../bin/linux/obj/main/lib_initializer.o: In function `Lib_initializer::release()':
lib_initializer.cpp:(.text+0x5): undefined reference to `Root::instance()'
lib_initializer.cpp:(.text+0x18): undefined reference to `Root::instance()'
[..]
../../bin/linux/obj/main/main.o:(.rodata._ZTV10Std_scribe[vtable for Std_scribe]+0x30): undefined reference to `Scribe::unsubscribe(Channel&)'
../../bin/linux/obj/main/main.o:(.rodata._ZTI10Std_scribe[typeinfo for Std_scribe]+0x10): undefined reference to `typeinfo for Scribe'
collect2: ld returned 1 exit status
make[2]: *** [../../bin/linux/sgems] Error 1
make[2]: Leaving directory `/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli/main'
make[1]: *** [sub-main-make_default] Error 2
make[1]: Leaving directory `/home/comuniana/MyDev/GsTLAppli-qt4/GsTLAppli'
make: *** [sub-GsTLAppli-make_default] Error 2


Somebody has some suggestion, please?

Hi,
I also updated to 9.10 and got the same issues. However the repository for the code had been updated since. Look for the svn repository:
http://sourceforge.net/projects/sgems/develop
If you updated to 9.10 from 9.04 you may also want to rebuild SIMVoleon.

Hope that helps
Alex

Thank you Alex for your suggestions, but there are still problems:
(SIMVoleon was updated)
I updated SGeMS to the revision 38, I installed packages related to boost (libboost-dev & co., with BOOST_INCLUDE = /usr/include/boost, but I also tried a "local" installation with the last version downloaded directly from http://www.boost.org/), but there is still some error:

[...]
/usr/include/boost/multi_array/view.hpp:321: instantiated from ‘boost::detail::multi_array::multi_array_view& boost::detail::multi_array::multi_array_view::operator=(const boost::detail::multi_array::multi_array_view&) [with T = double, long unsigned int NumDims = 2ul]’
/home/comuniana/MyDev/GsTL/boost/multi_array.hpp:447: instantiated from ‘boost::multi_array& boost::multi_array::resize(const boost::detail::multi_array::extent_gen&) [with T = double, long unsigned int NumDims = 2ul, Allocator = std::allocator]’
grid_model/kdtree2.cpp:100: instantiated from here
/usr/include/c++/4.4/bits/stl_algobase.h:341: error: no match for ‘operator-’ in ‘__last - __first’
/usr/include/boost/iterator/iterator_facade.hpp:704: note: candidates are: Derived boost::iterator_facade::operator-(Difference) const [with Derived = boost::detail::multi_array::array_iterator, const double&>, Value = double, CategoryOrTraversal = boost::random_access_traversal_tag, Reference = const double&, Difference = long int]
/usr/include/c++/4.4/bits/stl_bvector.h:179: note: ptrdiff_t std::operator-(const std::_Bit_iterator_base&, const std::_Bit_iterator_base&)
make[2]: *** [../../lib/linux/obj/grid/kdtree2.o] Error 1
make[2]: Leaving directory `/home/comuniana/MyDev/GsTLAppli/GsTLAppli/grid'
make[1]: *** [sub-grid-make_default] Error 2
make[1]: Leaving directory `/home/comuniana/MyDev/GsTLAppli/GsTLAppli'
make: *** [sub-GsTLAppli-make_default] Error 2

Using the intel C++ compiler (QMAKESPEC = /usr/share/qt4/mkspecs/linux-icc-64) there are other errors... where I am wrong?

There is a boost directory in the GsTL folder, rename it to "boost_" or some other name. We are transitioning between some libraries and we now need more of the boost library. You want to be sure that the compiler uses the full boost library not the minimalist version in GsTL.

Thank you Alex, at the end it compiles!
However I had some inclusion error like:

[...]
icpc -c -wd654,1572 -O2 -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-icc-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Ifiltersim_std -Isnesim_std -I/tools/designer/interfaces -I/home/comuniana/MyDev/GsTL -I/home/comuniana/MyDev/GsTLAppli -I/home/comuniana/MyDev/boost_1_41_0 -I/home/comuniana/MyDev/GsTL -I/home/comuniana/MyDev/GsTLAppli -I/usr/include/python2.6 -I. -o ../../lib/linux/obj/geostat/sgsim.o sgsim.cpp
/home/comuniana/MyDev/GsTL/GsTL/utils/Common/CommonDefs.h(13): catastrophic error: could not open source file "Common/ExceptionStandard.h"
#include "Common/ExceptionStandard.h"
^

compilation aborted for sgsim.cpp (code 4)
make[2]: *** [../../lib/linux/obj/geostat/sgsim.o] Error 4
make[2]: Leaving directory `/home/comuniana/MyDev/GsTLAppli/GsTLAppli/geostat'
make[1]: *** [sub-geostat-make_default] Error 2
make[1]: Leaving directory `/home/comuniana/MyDev/GsTLAppli/GsTLAppli'
make: *** [sub-GsTLAppli-make_default] Error 2

so, I modified the include path in CommonDefs.h and
CGLA.h from:
#include "Common/ExceptionStandard.h"
into
#include "GsTL/utils/Common/ExceptionStandard.h"
and finally works fine.
Thanks!

I'm with Mario Giudici, we tried to apply Alessandro's suggestions, but we still have these errors when running "make":

marco@marco-laptop:~/GsTLAppli-qt4$ make
cd GsTLAppli && make -f Makefile
make[1]: ingresso nella directory «/home/marco/GsTLAppli-qt4/GsTLAppli»
cd utils && make -f Makefile
make[2]: ingresso nella directory «/home/marco/GsTLAppli-qt4/GsTLAppli/utils»
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/linux-g++ -I. -I. -I/usr/include/qt3 -o ../../../SGeMS/lib/linux/obj/utils/error_messages_handler.o error_messages_handler.cpp
error_messages_handler.cpp:29:53: error: /GsTLAppli/utils/error_messages_handler.h: Nessun file o directory
error_messages_handler.cpp:30:44: error: /GsTLAppli/utils/gstl_messages.h: Nessun file o directory
error_messages_handler.cpp:33: error: ‘Error_messages_handler’ has not been declared
error_messages_handler.cpp:33: error: ISO C++ forbids declaration of ‘Error_messages_handler’ with no type
error_messages_handler.cpp: In function ‘int Error_messages_handler()’:
error_messages_handler.cpp:34: error: ‘errors_’ was not declared in this scope
error_messages_handler.cpp:35: warning: no return statement in function returning non-void
error_messages_handler.cpp: At global scope:
error_messages_handler.cpp:37: error: expected constructor, destructor, or type conversion before ‘::’ token
error_messages_handler.cpp:44: error: ‘Error_messages_handler’ is not a class or namespace
error_messages_handler.cpp:45: error: expected unqualified-id before ‘&’ token
error_messages_handler.cpp:45: error: expected ‘)’ before ‘&’ token
error_messages_handler.cpp:45: error: expected initializer before ‘&’ token
make[2]: *** [../../../SGeMS/lib/linux/obj/utils/error_messages_handler.o] Errore 1
make[2]: uscita dalla directory «/home/marco/GsTLAppli-qt4/GsTLAppli/utils»
make[1]: *** [sub-utils] Errore 2
make[1]: uscita dalla directory «/home/marco/GsTLAppli-qt4/GsTLAppli»
make: *** [sub-GsTLAppli] Errore 2

P.S. I built both SIMVoleon and SGeMS on ubuntu 9.10

Hello, could you please post your values of GSTLHOME, GSTLAPPLI_HOME (in .qmake.cache), and the output of echo $LD_LIBRARY_PATH?

these are the values we put in .qmake.cache:

GSTLHOME = /home/marco/GsTL
GSTLAPPLI_HOME = /home/marco/SGeMS

and this is the output of echo$LD_LIBRARY_PATH:

/home/marco/SGeMS-2.0/lib/linux:/home/marco/SGeMS-2.0/plugins/designer:/usr/local/lib/

Meanwhile we modified the paths of a lot of files that were included with the wrong path in some other files (like manager.h, manager.cpp directory.h ecc..)

GSTLAPPLI_HOME = /home/marco/SGeMS
or
GSTLAPPLI_HOME = /home/marco/SGeMS-2.0 ?

we put
GSTLAPPLI_HOME = /home/marco/SGeMS

You are using Qt3 with SGeMS Qt4 version. Qt3 and QT4 are not compatible. To use the Qt3 version (which is the version of the book) you must get the code from the cvs with the module name GsTLAppli. It seems that you either took the svn version (which is the latest) or the cvs version with the module GsTLAppli-qt4 (which is being ported to the svn repository).

I know that it may seems complicated but if you want the book version of sgems use cvs with the module GsTLAppli and Qt3. For the newer version (to be considered beta) use the svn repository with Qt4.

Hope that help..
Regards,Alex
p.s. I would love to have someone to help us out to build a debian package for an easy installation.

I'm sorry, but I just started to use ubuntu 2 months ago, so I'm not able to use (and work on) Debian.
Thanks for the suggestion you gave me about the installation of SGeMS, the wrong version of Qt was only one of the errors Imade, but now all is working properly.

Marco Bonamore

Hi, I'm trying to compile SGeMS (Qt3) on Ubuntu 9.10, I followed the instructions available on bigbrovar website, but no success, so I downloaded the source from the CVS the module name GsTLAppli and no success, so I'm ensure sure that the compiler uses the full boost library and no success. Here is the last part of the make that appears:


cd geostat && make -f Makefile
make[2]: se ingresa al directorio `/home/hector/SGeMS-otra/GsTLAppli/GsTLAppli/geostat'
g++ -c -pipe -g -Wall -W -O0 -D_REENTRANT -fPIC -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -I/usr/share/qt3/mkspecs/default -I. -I. -Ifiltersim_std -Isnesim_std -I../../../GsTL -I../../../GsTLAppli -I../../../GsTL -I../../../GsTLAppli -I/usr/include/python2.4 -I/usr/include/qt3 -o ../../lib/linux/obj/geostat/library_geostat_init.o library_geostat_init.cpp

...

from library_geostat_init.cpp:46:
../../../GsTLAppli/GsTLAppli/geostat/filtersim_std/prototype_list.h: In member function ‘void PrototypeList::create_prototype_list()’:
../../../GsTLAppli/GsTLAppli/geostat/filtersim_std/prototype_list.h:177: error: ‘clock_t’ in namespace ‘std’ does not name a type
../../../GsTLAppli/GsTLAppli/geostat/filtersim_std/prototype_list.h:202: error: ‘clock_t’ in namespace ‘std’ does not name a type
../../../GsTLAppli/GsTLAppli/geostat/filtersim_std/prototype_list.h:203: error: ‘timer_end’ was not declared in this scope
../../../GsTLAppli/GsTLAppli/geostat/filtersim_std/prototype_list.h:203: error: ‘timer_start’ was not declared in this scope
make[2]: *** [../../lib/linux/obj/geostat/library_geostat_init.o] Error 1
make[2]: se sale del directorio `/home/hector/SGeMS-otra/GsTLAppli/GsTLAppli/geostat'
make[1]: *** [sub-geostat] Error 2
make[1]: se sale del directorio `/home/hector/SGeMS-otra/GsTLAppli/GsTLAppli'
make: *** [sub-GsTLAppli] Error 2

But I don't known what I have to do, I hope someone can help me.

Thanks for your time.

Update: I solve this problem adding the line

#include <ctime> below the lines

#include <list>
#include <sstream>

In the file:
GsTLAppli/GsTLAppli/geostat/filtersim_std/prototype_list.h

Then I obtained a similar error and solved adding

#include <cstdlib> below the line

#include <string>

In the file:
GsTLAppli/GsTLAppli/main/lib_initializar.cpp

Then make compiles the program without errors but at the time of running the program ./GsTLAppli/bin/linux/s-gems what appear instead of the program is segmentation fault

:( I don't known what to do.

Ii followed the instructions on http://sgems.sourceforge.net/?q=node/40, but fail. During making the GsTLAppli Project , i encountered the following Errors: g++ -Wl,-O1 -o ../../bin/linux/sgems ../../bin/linux/obj/main/lib_initializer.o ../../bin/linux/obj/main/main.o -L/usr/lib -L/home/zhougw/SGeMS/lib/linux -L/usr/lib -lpython2.6 -lpthread -lQtXml -lQtGui -lQtCore -lQtUiTools ../../bin/linux/obj/main/lib_initializer.o: In function `Lib_initializer::release()': lib_initializer.cpp:(.text+0x7): undefined reference to `Root::instance()' ../../bin/linux/obj/main/lib_initializer.o:lib_initializer.cpp:(.text+0x70): more undefined references to `Root::instance()' follow ../../bin/linux/obj/main/lib_initializer.o: In function `Lib_initializer::minimal_init()': lib_initializer.cpp:(.text+0x810): undefined reference to `GsTLcerr' lib_initializer.cpp:(.text+0x876): undefined reference to `libGsTLAppli_actions_init' lib_initializer.cpp:(.text+0x87b): undefined reference to `libGsTLAppli_appli_init' lib_initializer.cpp:(.text+0x881): undefined reference to `libGsTLAppli_filters_init' lib_initializer.cpp:(.text+0x886): undefined reference to `libGsTLAppli_geostat_init' lib_initializer.cpp:(.text+0x88b): undefined reference to `libGsTLAppli_grid_init' ../../bin/linux/obj/main/lib_initializer.o: In function `Lib_initializer::init()': lib_initializer.cpp:(.text+0x1561): undefined reference to `GsTLlog' ../../bin/linux/obj/main/main.o: In function `gui_main(int, char**)': main.cpp:(.text+0x932): undefined reference to `GsTLlog' main.cpp:(.text+0x954): undefined reference to `GsTLcerr' main.cpp:(.text+0x973): undefined reference to `GsTLlog' main.cpp:(.text+0xc31): undefined reference to `SoVolumeRendering::init()' main.cpp:(.text+0xc57): undefined reference to `SoQt::init(QWidget*)' main.cpp:(.text+0xc73): undefined reference to `GsTLcerr' main.cpp:(.text+0xc9a): undefined reference to `GsTLcout' main.cpp:(.text+0x1037): undefined reference to `Root::instance()' main.cpp:(.text+0x10f8): undefined reference to `typeinfo for GsTL_project' ../../bin/linux/obj/main/main.o:(.rodata._ZTV10Std_scribe[vtable for Std_scribe]+0x14): undefined reference to `Scribe::subscribe(Channel&)' ../../bin/linux/obj/main/main.o:(.rodata._ZTV10Std_scribe[vtable for Std_scribe]+0x18): undefined reference to `Scribe::unsubscribe(Channel&)' ../../bin/linux/obj/main/main.o:(.rodata._ZTI10Std_scribe[typeinfo for Std_scribe]+0x8): undefined reference to `typeinfo for Scribe' collect2: ld returned 1 exit status make[2]: *** [../../bin/linux/sgems] Error 1 make[2]:se sale del directorio `/home/zhougw/SGeMS/GsTLAppli/main' make[1]: *** [sub-main-make_default] Error 1 i have tried my best, but i have not solved the problems. somebody can help me,please?
Hello, just to inform about some compilation issues of revision 53:
  1. In the Makefiles there is some problem with gstl_kdtree2.cpp and GsTLkdtree2.cpp... I solved this by changing the "GsTLkdtree2" into "gstl_kdtree2", but probably developers can solve this in a clever way.
  2. some inclusion problems in GsTL for files CGLA.h and CommonDefs.h. I just deleted "Common/" from the #include...

Just in case anyone should be interested me and my colleague Jan Frydendall have compiled a document (not least based on the comments on this thread) describing how to install SGeMS from subversion/cvs source code on Linux (tested on Ubuntu 9.10 and 10.04 (released today)).

We also made two scripts that can be used to automatically perform all the steps in the document: downloading and compilation of SimVoleon, GsTL and SGeMS.

The guide and the script can be downloaded here :
http://imgp.imm.dtu.dk/compile_sgems.php

have a nice day all
- Thomas

Great script! Really saved me from a lot of scrambling I was getting into. Thanks!

I used this:
http://imgp.imm.dtu.dk/compile_sgems.php

but have to say, that if you already installed Qt3-dev, it will not working, so at first you have to remove Qt3-dev and its dependencies via Synaptic Package Manager, and after run the sh file! It works fine - not only on fresh installations!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.