Hello!
I’m starting out delving into avogardro and I just thought I’d mention a
problem that I hit building it on an OpenSuse 10.2 Pentium IV box, in
case someone else gets bitten by it, or there should be a fix for it.
I followed the very helpful instructions on the wiki at:
http://avogadro.sourceforge.net/wiki/Building:Development_Version#Linux
However, I’m firstly not sure what the point of running cmake and build
in the eigen directory is, as it doesn’t appear to do a lot and in the
configure step for avogadro, the build directory isn’t used to source
the header files.
Anyway, I ran cmake for avogardo with the following script:
cmake
-DOPENBABEL2_INCLUDE_DIR=/c/ccg/share/software/avogadro/openbabel/include
-DOPENBABEL2_LIBRARIES=/c/ccg/share/software/avogadro/openbabel/src/.libs/libopenbabel.so
-DEIGEN_INCLUDE_DIR=/c/ccg/share/software/avogadro/eigen/src
-DOPENBABEL2_EXECUTABLE:FILEPATH=/c/ccg/share/software/avogadro/openbabel/tools/babel
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
…
I had to include the OPENBABEL2_EXECUTABLE definition as otherwise it
found an older version of openbabel I had installed a while back and I
added the verbose makefile flag to make it easier to pick up errors.
When I ran make, the make failed as follows:
/usr/bin/c++ -Davogadro_lib_EXPORTS -Wnon-virtual-dtor
-Wno-long-long -ansi -Wundef -Wcast-ali gn -Wchar-subscripts -Wall -W
-Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fn
o-common -fPIC -I/usr/local/Trolltech/Qt-4.3.2/include
-I/usr/local/Trolltech/Qt-4.3.2/include/QtO penGL
-I/usr/local/Trolltech/Qt-4.3.2/include/QtGui
-I/usr/local/Trolltech/Qt-4.3.2/include/QtCore
-I/c/ccg/share/software/avogadro/avogadro/libavogadro/include
-I/c/ccg/share/software/avogadro/av ogadro
-I/c/ccg/share/software/avogadro/avogadro/build/libavogadro/src
-I/c/ccg/share/software/avo gadro/avogadro/build/libavogadro/src/…
-I/c/ccg/share/software/avogadro/openbabel/include -I/c/cc
g/share/software/avogadro/eigen/src -D_BSD_SOURCE -DQT_SHARED
-DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_ CORE_LIB -o
libavogadro/src/CMakeFiles/avogadro-lib.dir/primitivelist.o -c
/c/ccg/share/software/a vogadro/avogadro/libavogadro/src/primitivelist.cpp
In file included from
/c/ccg/share/software/avogadro/avogadro/libavogadro/include/avogadro/primiti
ve.h:1,
from
/c/ccg/share/software/avogadro/avogadro/libavogadro/include/avogadro/…/…/s
rc/primitivelist.h:29,
from
/c/ccg/share/software/avogadro/avogadro/libavogadro/include/avogadro/primiti
velist.h:1,
from
/c/ccg/share/software/avogadro/avogadro/libavogadro/src/primitivelist.cpp:27
:
/c/ccg/share/software/avogadro/avogadro/libavogadro/include/avogadro/…/…/src/primitive.h:35:26:
error: eigen/vector.h: No such file or directory
I think the problem is that the primitivelist.ccp file expects the eigen
header files to be in directory called “eigen”, but by following the
instructions, you end up pointing the build at header files that
actually live in a directory called src. I was able to work around this
by make a symlink called eigen in the
/c/ccg/share/software/avogadro/eigen/src directory that pointed at . ,
but it’s obviously not ideal.
I hope that’s helpful. If you need any more information or I followed
the instructions incorrectly, please get back to me.
Best wishes,
Jens