Problems compiling MIFit on CentOS 5.5 (x86_64)

35 views
Skip to first unread message

JohnG

unread,
Sep 1, 2010, 3:35:34 AM9/1/10
to MIFit
I'm attempting to install MIFit (from MIFit-2010.05-source.tar.gz) and
am having problems with the compilation process.

After extracting and running qmake (/usr/lib64/qt4/bin/qmake) in the
source directory I get the following:

# qmake -r MI.pro PREFIX=/opt/MIFit
Reading /home/packages/MIFitsrc/MIFit/libs/libs.pro
Reading /home/packages/MIFitsrc/MIFit/libs/opengl/opengl.pro
(... snip ...)
/home/packages/MIFitsrc/MIFit/apps/MIFit/main/main.pro:31: Unknown
replace function: qtLibraryTarget
/home/packages/MIFitsrc/MIFit/apps/MIFit/main/main.pro:32: Unknown
replace function: qtLibraryTarget
/home/packages/MIFitsrc/MIFit/apps/MIFit/main/main.pro:31: Unknown
replace function: qtLibraryTarget
/home/packages/MIFitsrc/MIFit/apps/MIFit/main/main.pro:32: Unknown
replace function: qtLibraryTarget
Reading /home/packages/MIFitsrc/MIFit/MIExpert/MIExpert.pro

# make
(... snip ...)
make[2]: Entering directory `/home/packages/MIFitsrc/MIFit/libs/map'
g++ -c -m64 -pipe -O2 -fPIC -Wall -W -Wno-unknown-pragmas -
D_REENTRANT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -
DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/
linux-g++-64 -I. -I/usr/lib64/qt4/include/QtCore -I/usr/lib64/qt4/
include/QtCore -I/usr/lib64/qt4/include/QtNetwork -I/usr/lib64/qt4/
include/QtNetwork -I/usr/lib64/qt4/include/QtGui -I/usr/lib64/qt4/
include/QtGui -I/usr/lib64/qt4/include/QtOpenGL -I/usr/lib64/qt4/
include/QtOpenGL -I/usr/lib64/qt4/include/QtXml -I/usr/lib64/qt4/
include/QtXml -I/usr/lib64/qt4/include -I../../libs -I/usr/include/X11
-Imoc -I. -o CMapHeaderBase.o CMapHeaderBase.cpp
In file included from ../../libs/umtz/umtzlib.h:10,
from ../../libs/umtz/mmtzlib.h:63,
from CMapHeaderBase.cpp:17:
../../libs/umtz/library.h:521:4: error: #error "Can't determine
machine number format"
CMapHeaderBase.cpp: In copy constructor
‘CMapHeaderBase::CMapHeaderBase(const CMapHeaderBase&)’:
CMapHeaderBase.cpp:72: warning: base class ‘class QObject’ should be
explicitly initialized in the copy constructor
make[2]: *** [CMapHeaderBase.o] Error 1
make[2]: Leaving directory `/home/packages/MIFitsrc/MIFit/libs/map'
make[1]: *** [sub-map-make_default] Error 2
make[1]: Leaving directory `/home/packages/MIFitsrc/MIFit/libs'
make: *** [sub-libs-make_default-ordered] Error 2


Checks and additional info:

- I've made sure that /usr/lib64/qt4/bin is in the path
- I'm running the following kernel: 2.6.18-194.11.3.el5
- The following packages have been installed from the CentOS
repository: qt4, qt4-devel, qt4-doc

I can provide more details.

Regards,

John


Bradley Smith

unread,
Sep 1, 2010, 12:01:12 PM9/1/10
to MIFit
MIFit may be built from the source code using the Qt SDK (version
2009.03 or later) and Boost (version 1.39.0 or later). These can be
downloaded from http://qt.nokia.com/downloads/sdk-linux-x11-64bit-cpp
and http://www.boost.org/users/download/.

The version of Qt included with CentOS 5.5 is probably not recent
enough. The Linux distributions tend to lag behind.

Bradley

JohnG

unread,
Sep 3, 2010, 3:03:01 AM9/3/10
to MIFit
Thanks for the tips Bradley.

Admittedly I'm having a difficult time getting Qt SDK (2010.04) to
install on my machine even though I was able to install the Boost
libraries without too much difficulty.

I was wondering if you have a "non-bleeding edge" version of MIFit
that can be compiled with earlier versions of Qt such as qt-devel (v
4.2.1-1) ?

Appreciated,

John

On Sep 2, 2:01 am, Bradley Smith <brad...@baysmith.com> wrote:
> MIFit may be built from the source code using the Qt SDK (version
> 2009.03 or later) and Boost (version 1.39.0 or later). These can be
> downloaded fromhttp://qt.nokia.com/downloads/sdk-linux-x11-64bit-cpp
> andhttp://www.boost.org/users/download/.

Bradley Smith

unread,
Sep 3, 2010, 3:12:23 AM9/3/10
to MIFit
The MIFit project doesn't have the resources to support multiple
versions of Qt. If the latest Qt SDK will not install, the next best
option would be to build the latest Qt from sources. Although it takes
awhile to build, it would probably be worth the effort since Qt 4.2.1
is about 4 years old and Qt has made significant improvements since
that version.

Bradley

JohnG

unread,
Sep 5, 2010, 10:01:08 PM9/5/10
to MIFit
Hi Bradley,

Fair point. (If I had more experience I'd be happy to assist in
packaging MIFit for specific popular Linux OSes)....

This time I was able to install Qt SDK into the default location (/opt/
qtsdk-2010.04), include /opt/qtsdk-2010.04/qt/bin in the path and
check that the boost libraries are in the library cache:

# /sbin/ldconfig -p | grep boost
libboost_wserialization.so.1.44.0 (libc6,x86-64) => /opt/boost_1_44_0/
stage/lib/libboost_wserialization.so.1.44.0
libboost_wserialization.so (libc6,x86-64) => /opt/boost_1_44_0/stage/
lib/libboost_wserialization.so
libboost_wave.so.1.44.0 (libc6,x86-64) => /opt/boost_1_44_0/stage/lib/
libboost_wave.so.1.44.0
libboost_wave.so (libc6,x86-64) => /opt/boost_1_44_0/stage/lib/
libboost_wave.so
libboost_unit_test_framework.so.1.44.0 (libc6,x86-64) => /opt/
boost_1_44_0/stage/lib/libboost_unit_test_framework.so.1.44.0
libboost_unit_test_framework.so (libc6,x86-64) => /opt/boost_1_44_0/
stage/lib/libboost_unit_test_framework.so
libboost_thread.so.1.44.0 (libc6,x86-64) => /opt/boost_1_44_0/stage/
lib/libboost_thread.so.1.44.0
libboost_thread.so (libc6,x86-64) => /opt/boost_1_44_0/stage/lib/
libboost_thread.so
libboost_system.so.1.44.0 (libc6,x86-64) => /opt/boost_1_44_0/stage/
lib/libboost_system.so.1.44.0
libboost_system.so (libc6,x86-64) => /opt/boost_1_44_0/stage/lib/
libboost_system.so

(etc...)

- The qmake step is successful (after a create an empty file conf.pri
in the build directory)

- However the make process fails:

FlexTorsion.cpp:3:42: error: boost/graph/adjacency_list.hpp: No such
file or directory
FlexTorsion.cpp:4:48: error: boost/graph/breadth_first_search.hpp: No
such file or directory
FlexTorsion.cpp:5:40: error: boost/graph/graph_traits.hpp: No such
file or directory
FlexTorsion.cpp:6:36: error: boost/graph/visitors.hpp: No such file or
directory
FlexTorsion.cpp:13: error: ‘boost’ has not been declared
FlexTorsion.cpp:13: error: expected initializer before ‘<’ token
FlexTorsion.cpp:14: error: ‘boost’ has not been declared
FlexTorsion.cpp:14: error: expected initializer before ‘<’ token
FlexTorsion.cpp:268: error: expected ‘,’ or ‘...’ before ‘&’ token
FlexTorsion.cpp:268: error: ISO C++ forbids declaration of ‘AtomGraph’
with no type
FlexTorsion.cpp: In function ‘int conflib::SumDistances(int)’:
FlexTorsion.cpp:272: error: ‘distances’ was not declared in this scope
FlexTorsion.cpp:272: error: ‘graph’ was not declared in this scope
FlexTorsion.cpp:272: error: ‘num_vertices’ was not declared in this
scope
FlexTorsion.cpp:276: error: ‘source’ was not declared in this scope
FlexTorsion.cpp:276: error: ‘vertex’ was not declared in this scope
FlexTorsion.cpp:277: error: ‘boost’ has not been declared
FlexTorsion.cpp:277: error: ‘record_distances’ was not declared in
this scope
FlexTorsion.cpp:277: error: ‘make_bfs_visitor’ was not declared in
this scope
FlexTorsion.cpp:277: error: ‘visitor’ was not declared in this scope
FlexTorsion.cpp:277: error: ‘breadth_first_search’ was not declared in
this scope
FlexTorsion.cpp: At global scope:
FlexTorsion.cpp:268: warning: unused parameter ‘AtomGraph’
FlexTorsion.cpp:283: error: expected ‘,’ or ‘...’ before ‘*’ token
FlexTorsion.cpp:283: error: ISO C++ forbids declaration of
‘AtomGraphIndex’ with no type
FlexTorsion.cpp: In function ‘void conflib::GatherFlexAtoms(int)’:
FlexTorsion.cpp:286: error: ‘res’ was not declared in this scope
FlexTorsion.cpp:288: error: ‘distances’ was not declared in this scope
FlexTorsion.cpp:290: error: ‘atoms’ was not declared in this scope
FlexTorsion.cpp: At global scope:
FlexTorsion.cpp:283: warning: unused parameter ‘AtomGraphIndex’
FlexTorsion.cpp: In function ‘chemlib::MIAtom*
conflib::SetUpTorsion(const chemlib::RESIDUE*, const
std::vector<chemlib::Bond, std::allocator<chemlib::Bond> >&,
chemlib::MIAtom*, chemlib::MIAtom*, std::vector<chemlib::MIAtom*,
std::allocator<chemlib::MIAtom*> >&)’:
FlexTorsion.cpp:301: error: ‘AtomGraph’ was not declared in this scope
FlexTorsion.cpp:301: error: expected `;' before ‘ag’
FlexTorsion.cpp:325: error: ‘ag’ was not declared in this scope
FlexTorsion.cpp:325: error: ‘add_edge’ was not declared in this scope
FlexTorsion.cpp:328: error: ‘AtomGraphIndex’ was not declared in this
scope
FlexTorsion.cpp:328: error: ‘d2’ was not declared in this scope
FlexTorsion.cpp:328: error: expected type-specifier before
‘AtomGraphIndex’
FlexTorsion.cpp:328: error: expected `;' before ‘AtomGraphIndex’
FlexTorsion.cpp:329: error: ‘d3’ was not declared in this scope
FlexTorsion.cpp:329: error: expected type-specifier before
‘AtomGraphIndex’
FlexTorsion.cpp:329: error: expected `;' before ‘AtomGraphIndex’
FlexTorsion.cpp:332: error: ‘ag’ was not declared in this scope
FlexTorsion.cpp:344: error: type ‘<type error>’ argument given to
‘delete’, expected pointer
FlexTorsion.cpp:345: error: type ‘<type error>’ argument given to
‘delete’, expected pointer
make[2]: *** [FlexTorsion.o] Error 1
make[2]: Leaving directory `/opt/MIFit/libs/conflib'
make[1]: *** [sub-conflib-make_default] Error 2
make[1]: Leaving directory `/opt/MIFit/libs'
make: *** [sub-libs-make_default-ordered] Error 2


If you have an suggestions to go beyond this step that would be
appreciated,

Cheers,

John

Bradley Smith

unread,
Sep 6, 2010, 12:56:49 AM9/6/10
to mi...@googlegroups.com
If the boost is not in a standard location, you will need to add an
option to the qmake command with the location of boost. Perhaps
something like "qmake -r MI.pro PREFIX=/opt/MIFit
BOOST=/opt/boost_1_44_ 0".

Bradley

Reply all
Reply to author
Forward
0 new messages