I'm trying to build latest coot source on a CentOS 6.5 machine, but I get a compilation error for coot-0.8.1-pre/protein_db.cpp, namely it looks like it complains that a class is undefined. Here is the compilation line and error output:
make[1]: Entering directory `/nfs/build/source/coot/linux64/coot-0.8.1-pre/protein_db'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"coot\" -DVERSION=\"0.8.1-pre\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_OPENMP=1 -DFFTW2_PREFIX_S=1 -DHAVE_BOOST=/\*\*/ -DHAVE_PYTHON=\"2.6\" -DHAVE_BOOST_PYTHON=/\*\*/ -I. -I/usr/include/gpp4 -I/usr/local/include -MT protein_db.lo -MD -MP -MF .deps/protein_db.Tpo -c -o protein_db.lo protein_db.cpp
libtool: compile: g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"coot\" -DVERSION=\"0.8.1-pre\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_OPENMP=1 -DFFTW2_PREFIX_S=1 "-DHAVE_BOOST=/**/" -DHAVE_PYTHON=\"2.6\" "-DHAVE_BOOST_PYTHON=/**/" -I. -I/usr/include/gpp4 -I/usr/local/include -MT protein_db.lo -MD -MP -MF .deps/protein_db.Tpo -c protein_db.cpp -fPIC -DPIC -o .libs/protein_db.o
protein_db.cpp: In member function ‘bool ProteinDB::Chain::add_pdb(clipper::String)’:
protein_db.cpp:200: error: ‘mmdb’ has not been declared
protein_db.cpp:200: error: expected unqualified-id before numeric constant
protein_db.cpp:200: error: expected ‘,’ or ‘;’ before numeric constant
protein_db.cpp: In member function ‘void ProteinDB::Chain::lsq_superpose(const ProteinDB::Chain&, const std::vector<double, std::allocator<double> >&)’:
protein_db.cpp:347: error: no matching function for call to ‘clipper::RTop_orth::RTop_orth(std::vector<clipper::Coord_orth, std::allocator<clipper::Coord_orth> >&, std::vector<clipper::Coord_orth, std::allocator<clipper::Coord_orth> >&, std::vector<double, std::allocator<double> >&)’
/usr/include/clipper/core/coords.h:124: note: candidates are: clipper::RTop_orth::RTop_orth(const std::vector<clipper::Coord_orth, std::allocator<clipper::Coord_orth> >&, const std::vector<clipper::Coord_orth, std::allocator<clipper::Coord_orth> >&)
/usr/include/clipper/core/coords.h:122: note: clipper::RTop_orth::RTop_orth(const clipper::Mat33<double>&, const clipper::Vec3<double>&)
/usr/include/clipper/core/coords.h:120: note: clipper::RTop_orth::RTop_orth(const clipper::Mat33<double>&)
/usr/include/clipper/core/coords.h:118: note: clipper::RTop_orth::RTop_orth(const clipper::RTop<double>&)
/usr/include/clipper/core/coords.h:116: note: clipper::RTop_orth::RTop_orth()
/usr/include/clipper/core/coords.h:113: note: clipper::RTop_orth::RTop_orth(const clipper::RTop_orth&)
make[1]: *** [protein_db.lo] Error 1
make[1]: Leaving directory `/nfs/build/source/coot/linux64/coot-0.8.1-pre/protein_db'
make: *** [all-recursive] Error 1
The include statements in protein_db.cpp are:
#include "protein_db.h"
#include <algorithm>
#include <fstream>
The code at around line 200 in protein_db.cpp is,
197
198 bool Chain::add_pdb( const clipper::String file )
199 {
200 const int mmdbflags = mmdb::MMDBF_IgnoreBlankLines | mmdb::MMDBF_IgnoreDuplSeqNum | mmdb::MMDBF_IgnoreNonCoorPDBErrors | mmdb::MMDBF_IgnoreRemarks;
201 clipper::MMDBfile mfile;
202 clipper::MiniMol mol;
203 mfile.SetFlag( mmdbflags );
204 mfile.read_file( file );
205 mfile.import_minimol( mol );
206 if ( mol.size() == 0 ) return false;
...
..
.
On my systsem, mmdb.x86_64 and mmdb-devel.x86_64 packages are installed (1.21-2.el6). These populate /usr/include/mmdb/*.h and for libs gets me/usr/lib64/libmmdb.so.0, /usr/lib64/libmmdb.so.0.0.0, /usr/lib64/libmmdb.so, with the package config file /usr/lib64/pkgconfig/mmdb.pc.
I built and installed mmdb2, which looks like it populated /usr/local/include/*.h and for libs provided apparently only a static library, /usr/local/lib/libmmdb2.a, /usr/local/lib/libmmdb2.la, and the package config file /usr/local/lib/pkgconfig/mmdb2.pc
When I search /usr/include and /usr/local/include for defines like MMDBF_IgnoreBlankLines,I find the same MMDBF_* defines in both /usr/include/mmdb/mmdb_file.h and /usr/local/include/mmdb2/mmdb_root.h. Neither of these header files are (directly) included by protein_db.cpp's include of protein_db.h deom what I can see. The local protein_db.h includes,
#include <clipper/clipper.h>
#include <clipper/clipper-minimol.h>
- which I have under /usr/include clipper (and my system lists that clipper.x86_64 and clipper-devel.x86_64 (2.1-11.20090714cvs.el6) is installed.
So the clipper includes led me to think that maybe mmdb is expected be defined in header files related to the clipper package.
When I search /usr/include and /usr/local/include for statements with "class" and "mmdb" I see there is no entry (case insensitive) for "class mmdb". I do see class statements with MMDBfile, MMDBAtom, MMDBResidue, MMDBChain, MMDBModel, MMDBAtom_List, etc.
In the header files with the MMDBF defines that occur on line 200 of protein_db.cpp, I see the following,
/usr/include/mmdb/mmdb_file.h defines class CMMDBFile,
74 // ======================= CMMDBFile ===========================
75
76
77 // special effect flags
78
79 #define MMDBF_AutoSerials 0x00000001
80 #define MMDBF_NoCoordRead 0x00000002
81 #define MMDBF_SimRWBROOK 0x00000004
82 #define MMDBF_PrintCIFWarnings 0x00000008
83 #define MMDBF_EnforceSpaces 0x00000010
84 #define MMDBF_IgnoreDuplSeqNum 0x00000020
85 #define MMDBF_IgnoreSegID 0x00000040
86 #define MMDBF_IgnoreElement 0x00000080
87 #define MMDBF_IgnoreCharge 0x00000100
88 #define MMDBF_IgnoreNonCoorPDBErrors 0x00000200
89 #define MMDBF_IgnoreUnmatch 0x00000400
90 #define MMDBF_IgnoreBlankLines 0x00000800 <---- e.g., one define used on line 200 in protein_db.cpp
/usr/local/include/mmdb2/mmdb_root.h defines class Root with the same defines.
But no "mmdb" class.
If I change line 200 from protein_db.cpp from,
const int mmdbflags = mmdb::MMDBF_IgnoreBlankLines | mmdb::MMDBF_IgnoreDuplSeqNum | mmdb::MMDBF_IgnoreNonCoorPDBErrors | mmdb::MMDBF_IgnoreRemarks;
to,
const int mmdbflags = CMMDBFile::MMDBF_IgnoreBlankLines | CMMDBFile::MMDBF_IgnoreDuplSeqNum |CMMDBFile::MMDBF_IgnoreNonCoorPDBErrors | CMMDBFile::MMDBF_IgnoreRemarks;
- then I no longer get the mmdb undefined error, but I do get an even longer list of errors from the include file structure.
I've attempted to build coot using the build-it-gtk2-simple script, letting it download the sources, and build (which yields the mmdb undefined error above). When I do this I "export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig"
I also tried going into the ./coot-0.8.1-pre and manually running configure, pointing it to a build of the clipper-2.1 distribution downloaded via the build-it-gtk2-simple script, but I still get the same mmdb undefined error. My guess is there is some conflict between headers for mmdb, mmdb2, and the clipper packages installed on my system, but it's not clear to me how to further diagnose this. Happy to hear suggestions.
|