Compiling Avogadro on MacOS X 10.5

Dear all
I am about to start working with Avogadro and will possibly be involved
in modifying it to the needs of our groups (QM of proteins). I am very
much looking forward to be able to contribute to the Avogadro community
as well as benefiting from it.
As obvious from the subject title, I was trying to compile Avogadro on
my MacBook Pro running MacOS 10.5 (Leopard). I would like to install it
as a developer version (so that it is possible to script it via python,
I’m not exactly sure yet how this looks like).
Anyway, my problem at the moment is that I get the following message
when compiling:

mzh @ ~/build/avogadro $ cmake ~/avogadro
– The C compiler identification is GNU
– The CXX compiler identification is GNU
– Check for working C compiler: /usr/bin/gcc
– Check for working C compiler: /usr/bin/gcc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– The build type is RelWithDebInfo
– Performing Test HAVE_GCC_VISIBILITY
– Performing Test HAVE_GCC_VISIBILITY - Success
– Performing Test COMPILES_WITHOUT_FPERMISSIVE
– Performing Test COMPILES_WITHOUT_FPERMISSIVE - Success
CMake Error at /Applications/CMake
2.6-4.app/Contents/share/cmake-2.6/Modules/FindQt4.cmake:640 (MESSAGE):
Could NOT find QtCore header
Call Stack (most recent call first):
CMakeLists.txt:125 (find_package)

– Configuring incomplete, errors occurred!

I experienced some difficulties in properly installing the Qt framework.
I would very much appreciate it, if somebody could give me some
instructions on how to install the Qt framework so the compilation of
Avogadro works.

If I finally succed in compling a working version, I would happily be
willing to provide support for people who wish to do the same or to
contribute to some further documentation on this subject.

As obvious from the subject title, I was trying to compile Avogadro on
my MacBook Pro running MacOS 10.5 (Leopard). I would like to install
it
as a developer version (so that it is possible to script it via
python,
I’m not exactly sure yet how this looks like).

I experienced some difficulties in properly installing the Qt
framework.
I would very much appreciate it,

Here’s what you should do:

  1. Download the latest version of Qt for Mac:
    http://get.qt.nokia.com/qt/source/qt-mac-cocoa-opensource-4.5.3.dmg

  2. Do a default installation of everything – click on the installer
    package and go through the prompts.

  3. That’s it. If you have difficulties, please post any error messages
    you see or problems you have.

Cheers,
-Geoff

I run the following cmake command as shown below. its looking good until
this normalize-makro starts making trouble. My idea is that perhaps the
openbabel directory is misnamed? notice also the following output to
prove my openbabel version.

mzh @ ~/build/openbabel $ babel -V
Open Babel 2.2.3 – Nov 26 2009 – 17:19:43

the openbabel source directory is called:
mzh @ ~ $ ls src/
avogadro eigen2 openbabel-2.2

mzh @ ~/build/avogadro $ cmake
-DOPENBABEL2_INCLUDE_DIR=~/src/openbabel-2.2/include
-DOPENBABEL2_LIBRARIES=/usr/local/lib/libopenbabel.3.dylib
-DOPENBABEL2_VERSION_MET=true -DEIGEN_INCLUDE_DIR=~/src/eigen2
~/src/avogadro
– The build type is RelWithDebInfo
– Found lupdate: /usr/bin/lupdate
– Found lrelease: /usr/bin/lrelease
– Found lconvert: /usr/bin/lconvert
CMake Error at cmake/modules/MacroEnsureVersion.cmake:95
(NORMALIZE_VERSION):
NORMALIZE_VERSION Macro invoked with incorrect arguments for macro named:
NORMALIZE_VERSION
Call Stack (most recent call first):
cmake/modules/FindOpenBabel2.cmake:108 (macro_ensure_version)
CMakeLists.txt:130 (find_package)

– Git revision found to be d70cc9d
– Found Git revision is: d70cc9d
– Building development version from Git clone.
– Searching for python dependencies…
– [1/5] Boost Python
– Boost Python found…
– [2/5] Python Libraries
– Found PythonLibs: -framework Python
– [3/5] Python Interpreter
– Found PythonInterp: /usr/bin/python2.5
– [4/5] Numpy Module
– Numpy headers found
– [5/5] SIP Module
– Found sip.h header…
– All python dependencies found - Python support enabled
– Threaded OpenGL rendering not enabled
– RPath support enabled for installed binaries and libraries
– Setting new boost python libraries
– Enabled python terminal
– Python site-packages directory: /Library/Python/2.5/site-packages
– docbook tools not found, doc targets disabled
– Configuring incomplete, errors occurred!

Dear all
I am trying to compile Avogadro on Mac OS X 10.5 with Python support
enabled (the release version compiles and runs). Could anyone confirm to
me that it is indeed possible to do so?
I ran into the following error at compile time. I cant tell for sure
where the reason for this error is, but there’s no sign of a “no such
file or directory” message, so I thought it might be something with the
code? I obtain the avogadro source with git, so it should be the latest
version of the code (notice the output when running Avogadro below).

mzh @ ~/build/avogadro $ bin/Avogadro.app/Contents/MacOS/Avogadro
"Avogadro version: 1.0.1 Git: d70cc9d
LibAvogadro version: 1.0.1 Git: d70cc9d"

I am issuing the following configure command:
cmake \

-DOPENBABEL2_INCLUDE_DIR=/usr/local/include/openbabel-2.0
-DOPENBABEL2_LIBRARIES=/usr/local/lib/libopenbabel.3.dylib
-DOPENBABEL2_VERSION_MET=true
-DEIGEN_INCLUDE_DIR=~/src/eigen2
~/src/avogadro/

This is the last part of the make output before it crashes.

[ 59%] Built target propextension
[ 59%] Generating ui_pythonterminalwidget.h
[ 59%] Generating moc_pythonterminal.cxx
[ 59%] Generating moc_highlighter.cxx
Scanning dependencies of target pythonterminal
[ 59%] Building CXX object
libavogadro/src/extensions/CMakeFiles/pythonterminal.dir/pythonterminal.cpp.o
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:
In member function ‘virtual void
Avogadro::PythonTerminalEdit::keyPressEvent(QKeyEvent*)’:
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: ‘HEAD’ was not declared in this scope
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected ;' before ‘:’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘==’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘==’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘==’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘=’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:280: error: expected primary-expression before ‘}’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:280: error: expected;’ before ‘}’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected `;’ before ‘:’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:283:
error: ‘text’ was not declared in this scope
make[2]: ***
[libavogadro/src/extensions/CMakeFiles/pythonterminal.dir/pythonterminal.cpp.o]
Error 1
make[1]: ***
[libavogadro/src/extensions/CMakeFiles/pythonterminal.dir/all] Error 2
make: *** [all] Error 2

One more thing: could you provide me with the exact kind of value for the -DOPENBABEL2_LIBRARIES option? Does it have to provide a library (i.e. .dylib, .3.dylib, .so file) or does it just have to provide the path to the library containing directory (i.e. /usr/local/lib/openbabel/2.2.3)?

If you have installed Open Babel, you do not need to supply the paths for INCLUDES or LIBRARIES. Cmake should find them automatically. I would omit these options.

Best regards,
-Geoff

Hi,

I just checked out the source and looked at pythonterminal.cpp. It appears
that there is a conflict in the code that was not resolved. Since I haven’t
setup my system yet, I’m gonna put the solution here and not in the git
repository (sorry for that). Around line 275 you’ll find

<<<<<<< HEAD:libavogadro/src/extensions/pythonterminal.cpp
}
else if(event->key() == Qt::Key_Return)
{

} else if(event->key() == Qt::Key_Return) {

1.0:libavogadro/src/extensions/pythonterminal.cpp

which is an unresolved issue that has not been taken care of by the
submitter. The <<<<<< lines and >>>>>> tells you where the issue and is not
part of c+++. Neither is =======.

It is an easy fix since you can comment out the stuff that you dont need so
//<<<<<<< HEAD:libavogadro/src/extensions/pythonterminal.cpp
// }
// else if(event->key() == Qt::Key_Return)
// {
//=======
} else if(event->key() == Qt::Key_Return) {
//>>>>>>> 1.0:libavogadro/src/extensions/pythonterminal.cpp

and you should be good to go again.

I hope that someone will put this fix into the repository soon though and I
am deeply sorry that I havent got the time to set up the repositories and
remotes with git - but I got my master thesis defence in less than a week
and therefore have other stuff to care about. :slight_smile:

best,
Casper

On Fri, Nov 27, 2009 at 3:54 PM, Martin Hediger ma.hed@bluewin.ch wrote:

Dear all
I am trying to compile Avogadro on Mac OS X 10.5 with Python support
enabled (the release version compiles and runs). Could anyone confirm to
me that it is indeed possible to do so?
I ran into the following error at compile time. I cant tell for sure
where the reason for this error is, but there’s no sign of a “no such
file or directory” message, so I thought it might be something with the
code? I obtain the avogadro source with git, so it should be the latest
version of the code (notice the output when running Avogadro below).

mzh @ ~/build/avogadro $ bin/Avogadro.app/Contents/MacOS/Avogadro
"Avogadro version: 1.0.1 Git: d70cc9d
LibAvogadro version: 1.0.1 Git: d70cc9d"

I am issuing the following configure command:
cmake \

-DOPENBABEL2_INCLUDE_DIR=/usr/local/include/openbabel-2.0
-DOPENBABEL2_LIBRARIES=/usr/local/lib/libopenbabel.3.dylib
-DOPENBABEL2_VERSION_MET=true
-DEIGEN_INCLUDE_DIR=~/src/eigen2
~/src/avogadro/

This is the last part of the make output before it crashes.

[ 59%] Built target propextension
[ 59%] Generating ui_pythonterminalwidget.h
[ 59%] Generating moc_pythonterminal.cxx
[ 59%] Generating moc_highlighter.cxx
Scanning dependencies of target pythonterminal
[ 59%] Building CXX object

libavogadro/src/extensions/CMakeFiles/pythonterminal.dir/pythonterminal.cpp.o
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:
In member function ‘virtual void
Avogadro::PythonTerminalEdit::keyPressEvent(QKeyEvent*)’:
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected primary-expression before ‘<’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: ‘HEAD’ was not declared in this scope
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:275:
error: expected ;' before ‘:’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘==’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘==’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘==’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:279: error: expected primary-expression before ‘=’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:280: error: expected primary-expression before ‘}’ token /Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:280: error: expected;’ before ‘}’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected primary-expression before ‘>’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:281:
error: expected `;’ before ‘:’ token
/Users/mzh/src/avogadro/libavogadro/src/extensions/pythonterminal.cpp:283:
error: ‘text’ was not declared in this scope
make[2]: ***

[libavogadro/src/extensions/CMakeFiles/pythonterminal.dir/pythonterminal.cpp.o]
Error 1
make[1]: ***
[libavogadro/src/extensions/CMakeFiles/pythonterminal.dir/all] Error 2
make: *** [all] Error 2


Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what’s new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july


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