Problem building avogadro - make fails on primitivelist.cpp

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

===================================================================
Jens Thomas, email: j.m.h.thomas@dl.ac.uk
STFC Daresbury Lab, tel: +44-1925-603849
Warrington, fax: +44-1925-603634
WA4 4AD, UK. http: http://www.cse.scitech.ac.uk

(Fri, Nov 02, 2007 at 03:05:50PM +0000) Jens Thomas j.m.h.thomas@dl.ac.uk:

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.

You’re right. Most likely what you should do is just install Eigen
because it’s not as important that it be used from the build directory.
In fact you almost rarely update Eigen.

However, linking against your actual build of OpenBabel is in fact
very useful because you may make changes to OB and have to test the
impact.

Anyways, try to do a make install in the ‘eigen/build’ directory and
then ignore the -DEIGEN_INCLUDE_DIR call.

Most likely when i was testing this I did use that '-DEIGEN_INCLUDE_DIR’
but I had also installed eigen.

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

===================================================================
Jens Thomas, email: j.m.h.thomas@dl.ac.uk
STFC Daresbury Lab, tel: +44-1925-603849
Warrington, fax: +44-1925-603634
WA4 4AD, UK. http: http://www.cse.scitech.ac.uk


This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel

On Friday 02 November 2007 11:05:50 Jens Thomas wrote:

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.

Welcome - let us know if there is anything we can help with. I am going to try
and write up some tutorials very soon and we were also talking about writing
a few guides for new developers.

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.

Yes it doesn’t build anything, the main point of the build system is to allow
you to tell it where to place the installed header files. We should probably
update this section of the build instructions. Thanks for pointing it out, I
personally have it installed as a system library running on Gentoo Linux.

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.

Short of installing the header files into /usr/local/include this seems like a
reasonable solution. Donald may know better though.

I hope that’s helpful. If you need any more information or I followed
the instructions incorrectly, please get back to me.

As far as I can see your solution seems fine. If Donald doesn’t know of a
better solution I will update the build instructions accordingly. We are very
much open to any feedback you might have and I am currently working on a few
new features as time permits.

Thanks,

Marcus