Compiling the code

Help
David Koes
2011-06-08
2014-04-26
1 2 3 > >> (Page 1 of 3)
  • David Koes
    David Koes
    2011-06-08

    The easiest way to get the code compiled is to checkout the repository using
    Eclipse (for C/C++ development; that is, the CDT package needs to be installed
    as well as the subversive package). The auto-generated Makefile will then
    build the code, provided you have all the required packages installed. The
    third party dependencies are:

    Boost (currently building against version 1.45)
    http://www.boost.org/

    JsonCpp http://jsoncpp.sourceforge.net/

    FastCGI http://www.fastcgi.com

    cgicc http://www.gnu.org/software/cgicc/

    tcmalloc (google performance tools) http://code.google.com/p/google-perftools/

    OpenBabel http://openbabel.org/

    You can set the include and library paths to point to the appropriate place on
    your installation by going to Project->Properties->C/C++ Build->Settings

    Make sure Configuration is set to so you only need to change the settings
    once.

    You add include directories in GCC C++ Compiler->Includes and modify library
    settings in GCC C++ Linker->Libraries

    The following libraries should already being linked with:

    json_cpp

    boost_date_time

    fcgi fcgi++

    cgicc

    tcmalloc_minimal

    boost_iostreams

    boost_system

    boost_program_options

    boost_thread

    boost_filesystem

    openbabel

    Make sure that they are all either in your default library search path, or
    their location is added to the library search path.

     
    Last edit: David Koes 2012-09-06
  • Noel O'Boyle
    Noel O'Boyle
    2011-06-14

    eigen3 is also required.

     
  • David Koes
    David Koes
    2011-07-11

    The makefiles auto-generated from Eclipse can be found here: http://smoothdock.ccbb.pitt.edu/pharmer/makes.tgz

    Unpack them in pharmer directory as a possible workaround of having to use
    Eclipse.

     
    Last edit: David Koes 2012-09-06
  • I have tried to compile the code but ran into some errors. Below is the error
    message until the first error:

    Building file: ../BoundingBox.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include/openbabel-2.0 -I/usr -I/usr/include/jsoncpp
    -I/usr/include/eigen3 -I/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD
    -MP -MF"BoundingBox.d" -MT"BoundingBox.d" -o"BoundingBox.o"
    "../BoundingBox.cpp"

    In file included from /usr/include/ctype.h:27:0,

    from /usr/include/getopt.h:35,

    from ../BoundingBox.h:30,

    from ../BoundingBox.cpp:20:

    /usr/include/sys/cdefs.h:46:44: error: missing binary operator before token
    "("

    Line 46 from cdefs.h is:

    if !defined cplusplus && GNUC_PREREQ (3, 3)

    I have already tried to include getopt.h but this was not successful.

     
  • David Koes
    David Koes
    2011-07-14

    Some more details, such as your compiler version and system setup, would be
    helpful. In googling the error, it seems this may be a problem on a case-
    insensitive file system (such as a Mac) and the wrong include files being
    included.

    The way I would debug this would be to run that single commandline in
    preprocessor mode so I can see what the error is after (or during)
    preprocessing, and then figure out what file is causing the invalid
    substitution. So

    g++ -I/usr/include/openbabel-2.0 -I/r -I/usr/include/jsoncpp
    -I/usr/include/eigen3 -I/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD
    -MP ../BoundingBox.cpp -E

     
  • Hi,

    I'm running Ubuntu 11.04 on a laptop with a intel i7 processor.

    The compiler I use is: gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2

    The information from the command until the first error is appended below:

    1 "../BoundingBox.cpp"

    1 "/media/Data/programs/pharmsearch/pharmer/Debug//"

    1 "<built-in>"

    define STDC 1

    define __cplusplus 1

    define STDC_HOSTED 1

    define GNUC 4

    define GNUC_MINOR 5

    define GNUC_PATCHLEVEL 2

    define GNUG 4

    define SIZE_TYPE long unsigned int

    define PTRDIFF_TYPE long int

    define WCHAR_TYPE int

    define WINT_TYPE unsigned int

    define INTMAX_TYPE long int

    define UINTMAX_TYPE long unsigned int

    define CHAR16_TYPE short unsigned int

    define CHAR32_TYPE unsigned int

    define SIG_ATOMIC_TYPE int

    define INT8_TYPE signed char

    define INT16_TYPE short int

    define INT32_TYPE int

    define INT64_TYPE long int

    define UINT8_TYPE unsigned char

    define UINT16_TYPE short unsigned int

    define UINT32_TYPE unsigned int

    define UINT64_TYPE long unsigned int

    define INT_LEAST8_TYPE signed char

    define INT_LEAST16_TYPE short int

    define INT_LEAST32_TYPE int

    define INT_LEAST64_TYPE long int

    define UINT_LEAST8_TYPE unsigned char

    define UINT_LEAST16_TYPE short unsigned int

    define UINT_LEAST32_TYPE unsigned int

    define UINT_LEAST64_TYPE long unsigned int

    define INT_FAST8_TYPE signed char

    define INT_FAST16_TYPE long int

    define INT_FAST32_TYPE long int

    define INT_FAST64_TYPE long int

    define UINT_FAST8_TYPE unsigned char

    define UINT_FAST16_TYPE long unsigned int

    define UINT_FAST32_TYPE long unsigned int

    define UINT_FAST64_TYPE long unsigned int

    define INTPTR_TYPE long int

    define UINTPTR_TYPE long unsigned int

    define GXX_WEAK 1

    define __DEPRECATED 1

    define __GXX_RTTI 1

    define __EXCEPTIONS 1

    define __GXX_ABI_VERSION 1002

    define SCHAR_MAX 127

    define SHRT_MAX 32767

    define INT_MAX 2147483647

    define LONG_MAX 9223372036854775807L

    define LONG_LONG_MAX 9223372036854775807LL

    define WCHAR_MAX 2147483647

    define WCHAR_MIN (-WCHAR_MAX - 1)

    define WINT_MAX 4294967295U

    define WINT_MIN 0U

    define PTRDIFF_MAX 9223372036854775807L

    define SIZE_MAX 18446744073709551615UL

    define CHAR_BIT 8

    define INTMAX_MAX 9223372036854775807L

    define __INTMAX_C(c) c ## L

    define UINTMAX_MAX 18446744073709551615UL

    define __UINTMAX_C(c) c ## UL

    define SIG_ATOMIC_MAX 2147483647

    define SIG_ATOMIC_MIN (-SIG_ATOMIC_MAX - 1)

    define INT8_MAX 127

    define INT16_MAX 32767

    define INT32_MAX 2147483647

    define INT64_MAX 9223372036854775807L

    define UINT8_MAX 255

    define UINT16_MAX 65535

    define UINT32_MAX 4294967295U

    define UINT64_MAX 18446744073709551615UL

    define INT_LEAST8_MAX 127

    define __INT8_C(c) c

    define INT_LEAST16_MAX 32767

    define __INT16_C(c) c

    define INT_LEAST32_MAX 2147483647

    define __INT32_C(c) c

    define INT_LEAST64_MAX 9223372036854775807L

    define __INT64_C(c) c ## L

    define UINT_LEAST8_MAX 255

    define __UINT8_C(c) c

    define UINT_LEAST16_MAX 65535

    define __UINT16_C(c) c

    define UINT_LEAST32_MAX 4294967295U

    define __UINT32_C(c) c ## U

    define UINT_LEAST64_MAX 18446744073709551615UL

    define __UINT64_C(c) c ## UL

    define INT_FAST8_MAX 127

    define INT_FAST16_MAX 9223372036854775807L

    define INT_FAST32_MAX 9223372036854775807L

    define INT_FAST64_MAX 9223372036854775807L

    define UINT_FAST8_MAX 255

    define UINT_FAST16_MAX 18446744073709551615UL

    define UINT_FAST32_MAX 18446744073709551615UL

    define UINT_FAST64_MAX 18446744073709551615UL

    define INTPTR_MAX 9223372036854775807L

    define UINTPTR_MAX 18446744073709551615UL

    define FLT_EVAL_METHOD 0

    define DEC_EVAL_METHOD 2

    define FLT_RADIX 2

    define FLT_MANT_DIG 24

    define FLT_DIG 6

    define FLT_MIN_EXP (-125)

    define FLT_MIN_10_EXP (-37)

    define FLT_MAX_EXP 128

    define FLT_MAX_10_EXP 38

    define FLT_MAX 3.40282346638528859812e+38F

    define FLT_MIN 1.17549435082228750797e-38F

    define FLT_EPSILON 1.19209289550781250000e-7F

    define FLT_DENORM_MIN 1.40129846432481707092e-45F

    define FLT_HAS_DENORM 1

    define FLT_HAS_INFINITY 1

    define FLT_HAS_QUIET_NAN 1

    define DBL_MANT_DIG 53

    define DBL_DIG 15

    define DBL_MIN_EXP (-1021)

    define DBL_MIN_10_EXP (-307)

    define DBL_MAX_EXP 1024

    define DBL_MAX_10_EXP 308

    define DBL_MAX ((double)1.79769313486231570815e+308L)

    define DBL_MIN ((double)2.22507385850720138309e-308L)

    define DBL_EPSILON ((double)2.22044604925031308085e-16L)

    define DBL_DENORM_MIN ((double)4.94065645841246544177e-324L)

    define DBL_HAS_DENORM 1

    define DBL_HAS_INFINITY 1

    define DBL_HAS_QUIET_NAN 1

    define LDBL_MANT_DIG 64

    define LDBL_DIG 18

    define LDBL_MIN_EXP (-16381)

    define LDBL_MIN_10_EXP (-4931)

    define LDBL_MAX_EXP 16384

    define LDBL_MAX_10_EXP 4932

    define DECIMAL_DIG 21

    define LDBL_MAX 1.18973149535723176502e+4932L

    define LDBL_MIN 3.36210314311209350626e-4932L

    define LDBL_EPSILON 1.08420217248550443401e-19L

    define LDBL_DENORM_MIN 3.64519953188247460253e-4951L

    define LDBL_HAS_DENORM 1

    define LDBL_HAS_INFINITY 1

    define LDBL_HAS_QUIET_NAN 1

    define DEC32_MANT_DIG 7

    define DEC32_MIN_EXP (-94)

    define DEC32_MAX_EXP 97

    define DEC32_MIN 1E-95DF

    define DEC32_MAX 9.999999E96DF

    define DEC32_EPSILON 1E-6DF

    define DEC32_SUBNORMAL_MIN 0.000001E-95DF

    define DEC64_MANT_DIG 16

    define DEC64_MIN_EXP (-382)

    define DEC64_MAX_EXP 385

    define DEC64_MIN 1E-383DD

    define DEC64_MAX 9.999999999999999E384DD

    define DEC64_EPSILON 1E-15DD

    define DEC64_SUBNORMAL_MIN 0.000000000000001E-383DD

    define DEC128_MANT_DIG 34

    define DEC128_MIN_EXP (-6142)

    define DEC128_MAX_EXP 6145

    define DEC128_MIN 1E-6143DL

    define DEC128_MAX 9.999999999999999999999999999999999E6144DL

    define DEC128_EPSILON 1E-33DL

    define DEC128_SUBNORMAL_MIN 0.000000000000000000000000000000001E-6143DL

    define REGISTER_PREFIX

    define USER_LABEL_PREFIX

    define VERSION "4.5.2"

    define GNUC_GNU_INLINE 1

    define _LP64 1

    define LP64 1

    define NO_INLINE 1

    define FINITE_MATH_ONLY 0

    define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1

    define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1

    define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1

    define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1

    define __GCC_HAVE_DWARF2_CFI_ASM 1

    define __PRAGMA_REDEFINE_EXTNAME 1

    define SSP 1

    define SIZEOF_INT 4

    define SIZEOF_LONG 8

    define SIZEOF_LONG_LONG 8

    define SIZEOF_SHORT 2

    define SIZEOF_FLOAT 4

    define SIZEOF_DOUBLE 8

    define SIZEOF_LONG_DOUBLE 16

    define SIZEOF_SIZE_T 8

    define SIZEOF_WCHAR_T 4

    define SIZEOF_WINT_T 4

    define SIZEOF_PTRDIFF_T 8

    define SIZEOF_POINTER 8

    define __amd64 1

    define amd64 1

    define __x86_64 1

    define x86_64 1

    define __k8 1

    define k8 1

    define MMX 1

    define SSE 1

    define SSE2 1

    define SSE_MATH 1

    define SSE2_MATH 1

    define gnu_linux 1

    define __linux 1

    define linux 1

    define linux 1

    define __unix 1

    define unix 1

    define unix 1

    define ELF 1

    define DECIMAL_BID_FORMAT 1

    define BIGGEST_ALIGNMENT 16

    1 "<command-line>"

    define _GNU_SOURCE 1

    define _FORTIFY_SOURCE 2

    1 "../BoundingBox.cpp"

    20 "../BoundingBox.cpp"

    1 "../BoundingBox.h" 1

    28 "../BoundingBox.h"

    define BOUNDINGBOX_H_

    1 "/usr/include/getopt.h" 1 3 4

    24 "/usr/include/getopt.h" 3 4

    define _GETOPT_H 1

    35 "/usr/include/getopt.h" 3 4

    1 "/usr/include/ctype.h" 1 3 4

    25 "/usr/include/ctype.h" 3 4

    define _CTYPE_H 1

    1 "/usr/include/sys/cdefs.h" 1 3 4

    21 "/usr/include/sys/cdefs.h" 3 4

    define _SYS_CDEFS_H 1

    1 "/usr/include/jsoncpp/features.h" 1 3 4

    define CPPTL_JSON_FEATURES_H_INCLUDED

    1 "/usr/include/jsoncpp/forwards.h" 1 3 4

    define JSON_FORWARDS_H_INCLUDED

    1 "/usr/include/jsoncpp/config.h" 1 3 4

    define JSON_CONFIG_H_INCLUDED

    24 "/usr/include/jsoncpp/config.h" 3 4

    define JSON_USE_EXCEPTION 1

    40 "/usr/include/jsoncpp/config.h" 3 4

    define JSON_API

    5 "/usr/include/jsoncpp/forwards.h" 2 3 4

    namespace Json {

    In file included from /usr/include/ctype.h:27:0,

    from /usr/include/getopt.h:35,

    from ../BoundingBox.h:30,

    from ../BoundingBox.cpp:20:

    /usr/include/sys/cdefs.h:46:44: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:50:44: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:135:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:148:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:206:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:215:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:224:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:233:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:245:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:255:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:264:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:272:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:286:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:294:43: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:317:19: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:326:20: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:331:20: error: missing binary operator before token
    "("

    /usr/include/sys/cdefs.h:338:19: error: missing binary operator before token
    "("

    class FastWriter;

    class StyledWriter;

    class Reader;

    class Features;

    typedef int Int;

    typedef unsigned int UInt;

    class StaticString;

    class Path;

    class PathArgument;

    class Value;

    class ValueIteratorBase;

    class ValueIterator;

    class ValueConstIterator;

    36 "/usr/include/jsoncpp/forwards.h" 3 4

    }

    Hopefully this information is useful.

    Thanks in advance

     
  • I am trying to compile Pharmer code on an OpenSuse 11.4.

    In the opensuse repositories I cannot find cgicc, tcmalloc and eigen3 and I
    was not successful to compile these packages from source code.

    Therefore, the make-files you posted do not work properly.

    Can you suggest a linux distribution where installing all required
    dependencies (and eventually pharmer) is more straightforward?

     
  • David Koes
    David Koes
    2011-07-15

    nobody: cdefs.h is including features.h. It wants /usr/include/features.h, but
    because your include paths have /usr/include/jsoncpp in them with a higher
    priority, that is getting included instead and messing everything up. Put
    -I/usr/include/jsoncpp at the end of the commandline, after -I/usr/include.

     
  • David Koes
    David Koes
    2011-07-15

    adr1803: tcmalloc is in the google-perftools package, but I don't see cgicc or
    eigen3 in the opensuse repository either.

    I use Ubuntu 10.04 at work and 11.04 at home. Ubuntu has google-perftools and
    cgicc and their repository, but only eigen2. However, since eigen is a
    template (header-only) library it should be straightforward to install (no
    compilation necessary, just put the files in the right place).

     
  • I am trying to compile now the code with Ubuntu 11.04.

    I installed and configured all dependencies but I obtain the following error.

    Building file: ../BoundingBox.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/json -I/usr/include/boost
    -I/usr/local/include -I/usr/local/include/eigen3 -I/usr/include/openbabel-2.0
    -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"BoundingBox.d" -MT"BoundingBox.d"
    -o"BoundingBox.o" "../BoundingBox.cpp"

    Finished building: ../BoundingBox.cpp

    Building file: ../Corresponder.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/json -I/usr/include/boost
    -I/usr/local/include -I/usr/local/include/eigen3 -I/usr/include/openbabel-2.0
    -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Corresponder.d"
    -MT"Corresponder.d" -o"Corresponder.o" "../Corresponder.cpp"

    In file included from ../pharmerdb.h:45:0,

    from ../Corresponder.h:30,

    from ../Corresponder.cpp:27:

    ../pharmarec.h:239:57: error: ‘Json’ has not been declared

    ../pharmarec.h:239:68: error: expected ‘,’ or ‘...’ before ‘&’ token

    ../pharmarec.h:253:31: warning: ‘convertPharmaJson’ initialized and declared
    ‘extern’

    ../pharmarec.h:253:31: error: ‘Json’ has not been declared

    ../pharmarec.h:253:44: error: ‘root’ was not declared in this scope

    ../pharmarec.h:253:50: error: expected primary-expression before ‘const’

    ../pharmarec.h:253:83: error: initializer expression list treated as compound
    expression

    ../pharmarec.h:260:53: error: ‘Json’ has not been declared

    ../pharmarec.h:260:64: error: expected ‘,’ or ‘...’ before ‘&’ token

    In file included from ../ThreePointData.h:28:0,

    from ../pharmerdb.h:46,

    from ../Corresponder.h:30,

    from ../Corresponder.cpp:27:

    ../TripletFingerprint.h:46:57: error: unable to emulate ‘TI’

    ../TripletFingerprint.h:47:47: error: unable to emulate ‘TI’

    In file included from ../pharmerdb.h:46:0,

    from ../Corresponder.h:30,

    from ../Corresponder.cpp:27:

    ../ThreePointData.h:34:57: error: unable to emulate ‘TI’

    ../ThreePointData.h:50:24: warning: width of ‘ThreePointData::molPos’ exceeds
    its type

    In file included from ../tripletmatching.h:41:0,

    from ../cors.h:35,

    from ../Corresponder.h:32,

    from ../Corresponder.cpp:27:

    ../params.h:74:18: error: ‘Json’ has not been declared

    ../params.h:74:29: error: expected ‘)’ before ‘&’ token

    ../Corresponder.cpp:28:105: error: expected ‘}’ at end of input

    In file included from ../tripletmatching.h:41:0,

    from ../cors.h:35,

    from ../Corresponder.h:32,

    from ../Corresponder.cpp:27:

    ../params.h:71:2: error: expected unqualified-id at end of input

    make: *** Error 1

    Thanks for any help!

     
  • David Koes
    David Koes
    2011-07-25

    I would guess that the json_cpp
    (http://jsoncpp.sourceforge.net/)
    headers are not in /usr/include/json

     
  • I installed jsoncpp following this installing
    guide
    .

    Unfortunately I still have problems when making the build. See below.

    Would you be so kind to give me further suggestions on how to solve these
    issues?

    * Build of configuration Release for project pharmer *

    make -j2 -j4 all

    Building file: ../BoundingBox.cpp

    Building file: ../Corresponder.cpp

    Invoking: GCC C++ Compiler

    Building file: ../PMol.cpp

    g++ -I/usr/include -I/usr/include/json -I/usr/include/boost
    -I/usr/local/include -I/usr/local/include/eigen3 -I/usr/include/openbabel-2.0
    -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"BoundingBox.d" -MT"BoundingBox.d"
    -o"BoundingBox.o" "../BoundingBox.cpp"

    Invoking: GCC C++ Compiler

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/json -I/usr/include/boost
    -I/usr/local/include -I/usr/local/include/eigen3 -I/usr/include/openbabel-2.0
    -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Corresponder.d"
    -MT"Corresponder.d" -o"Corresponder.o" "../Corresponder.cpp"

    Building file: ../PharmerQuery.cpp

    g++ -I/usr/include -I/usr/include/json -I/usr/include/boost
    -I/usr/local/include -I/usr/local/include/eigen3 -I/usr/include/openbabel-2.0
    -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"PMol.d" -MT"PMol.d" -o"PMol.o"
    "../PMol.cpp"

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/json -I/usr/include/boost
    -I/usr/local/include -I/usr/local/include/eigen3 -I/usr/include/openbabel-2.0
    -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"PharmerQuery.d"
    -MT"PharmerQuery.d" -o"PharmerQuery.o" "../PharmerQuery.cpp"

    In file included from /usr/include/c++/4.5/cwchar:47:0,

    from /usr/include/c++/4.5/bits/postypes.h:42,

    from /usr/include/c++/4.5/iosfwd:42,

    from /usr/include/c++/4.5/ios:39,

    from /usr/include/c++/4.5/ostream:40,

    from /usr/include/c++/4.5/iostream:40,

    from ../PharmerQuery.h:33,

    from ../PharmerQuery.cpp:27:

    /usr/include/wchar.h:75:43: error: missing binary operator before token "("In
    file included from /usr/include/c++/4.5/cwchar:47:0,

    from /usr/include/c++/4.5/bits/postypes.h:42,

    from /usr/include/c++/4.5/iosfwd:42,

    from /usr/include/c++/4.5/ios:39,

    from /usr/include/c++/4.5/ostream:40,

    from /usr/include/c++/4.5/iostream:40,

    from ../pharmerdb.h:36,

    from ../Corresponder.h:30,

    from ../Corresponder.cpp:27:

    /usr/include/wchar.h:75:43: error: missing binary operator before token "("

    In file included from /usr/include/sched.h:43:0,

    from /usr/include/pthread.h:25,

    from /usr/include/c++/4.5/i686-linux-gnu/bits/gthr-default.h:41,

    from /usr/include/c++/4.5/i686-linux-gnu/bits/gthr.h:162,

    from /usr/include/c++/4.5/ext/atomicity.h:34,

    from /usr/include/c++/4.5/bits/ios_base.h:41,

    from /usr/include/c++/4.5/ios:43,

    from /usr/include/c++/4.5/ostream:40,

    from /usr/include/c++/4.5/iostream:40,

    from ../pharmerdb.h:36,

    from ../Corresponder.h:30,

    from ../Corresponder.cpp:27:

    /usr/include/bits/sched.h:129:20: error: missing binary operator before token
    "("

    /usr/include/bits/sched.h:167:20: error: missing binary operator before token
    "("

    In file included from /usr/include/sched.h:43:0,

    from /usr/include/pthread.h:25,

    from /usr/include/c++/4.5/i686-linux-gnu/bits/gthr-default.h:41,

    from /usr/include/c++/4.5/i686-linux-gnu/bits/gthr.h:162,

    from /usr/include/c++/4.5/ext/atomicity.h:34,

    from /usr/include/c++/4.5/bits/ios_base.h:41,

    from /usr/include/c++/4.5/ios:43,

    from /usr/include/c++/4.5/ostream:40,

    from /usr/include/c++/4.5/iostream:40,

    from ../PharmerQuery.h:33,

    from ../PharmerQuery.cpp:27:

    /usr/include/bits/sched.h:129:20: error: missing binary operator before token
    "("

    /usr/include/bits/sched.h:167:20: error: missing binary operator before token
    "("

    OMISSIS

    /usr/include/boost/filesystem/operations.hpp:918:9: error: ‘__assert_fail’ was
    not declared in this scope

    make: *** Error 1

     
  • David Koes
    David Koes
    2011-08-04

    Please the comments above. nobody had the same problem.

     
  • OK, nobody had the same problem.

    But I would like to know if you have some suggestions on how to solve it.

     
  • David Koes
    David Koes
    2011-08-09

    Sorry, that was suppose to same please read the comments above. However,
    to save you all that effort, here's the answer:

    nobody: cdefs.h is including features.h. It wants /usr/include/features.h, but
    because your include paths have /usr/include/jsoncpp in them with a higher
    priority, that is getting included instead and messing everything up. Put
    -I/usr/include/jsoncpp at the end of the commandline, after -I/usr/include.

     
  • MSanders
    MSanders
    2011-08-10

    Hi David,

    I'm trying to compile pharmer and get the following output with one error:

    * Build of configuration Debug for project pharmer *

    make -j2 -j4 all

    Building file: ../BoundingBox.cpp

    Building file: ../Corresponder.cpp

    Building file: ../PMol.cpp

    Building file: ../PharmerQuery.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"BoundingBox.d" -MT"BoundingBox.d" -o"BoundingBox.o" "../BoundingBox.cpp"

    Invoking: GCC C++ Compiler

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"Corresponder.d" -MT"Corresponder.d" -o"Corresponder.o"
    "../Corresponder.cpp"

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"PMol.d"
    -MT"PMol.d" -o"PMol.o" "../PMol.cpp"

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"PharmerQuery.d" -MT"PharmerQuery.d" -o"PharmerQuery.o"
    "../PharmerQuery.cpp"

    Finished building: ../BoundingBox.cpp

    Building file: ../PharmerServer.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"PharmerServer.d" -MT"PharmerServer.d" -o"PharmerServer.o"
    "../PharmerServer.cpp"

    Finished building: ../PMol.cpp

    Building file: ../QueryTripletFingerprint.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"QueryTripletFingerprint.d" -MT"QueryTripletFingerprint.d"
    -o"QueryTripletFingerprint.o" "../QueryTripletFingerprint.cpp"

    Finished building: ../Corresponder.cpp

    Building file: ../RMSD.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"RMSD.d"
    -MT"RMSD.d" -o"RMSD.o" "../RMSD.cpp"

    Finished building: ../QueryTripletFingerprint.cpp

    Building file: ../SphereGrid.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"SphereGrid.d" -MT"SphereGrid.d" -o"SphereGrid.o" "../SphereGrid.cpp"

    Finished building: ../PharmerServer.cpp

    Building file: ../ThreePointData.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"ThreePointData.d" -MT"ThreePointData.d" -o"ThreePointData.o"
    "../ThreePointData.cpp"

    Finished building: ../SphereGrid.cpp

    Building file: ../Triplet.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"Triplet.d" -MT"Triplet.d" -o"Triplet.o" "../Triplet.cpp"

    Finished building: ../RMSD.cpp

    Building file: ../TripletFingerprint.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"TripletFingerprint.d" -MT"TripletFingerprint.d" -o"TripletFingerprint.o"
    "../TripletFingerprint.cpp"

    Finished building: ../PharmerQuery.cpp

    Building file: ../basis.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"basis.d" -MT"basis.d" -o"basis.o" "../basis.cpp"

    Finished building: ../basis.cpp

    Building file: ../cgi.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"cgi.d"
    -MT"cgi.d" -o"cgi.o" "../cgi.cpp"

    Finished building: ../TripletFingerprint.cpp

    Building file: ../main.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d"
    -MT"main.d" -o"main.o" "../main.cpp"

    Finished building: ../cgi.cpp

    Building file: ../pharmarec.cpp

    Invoking: GCC C++ Compiler

    g++ -I/usr/include -I/usr/include/openbabel-2.0 -I/usr/include/eigen3
    -I/usr0/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
    -MF"pharmarec.d" -MT"pharmarec.d" -o"pharmarec.o" "../pharmarec.cpp"

    ../pharmarec.cpp: In function ‘void getPharmaPointsMC(const Pharmas&,
    OpenBabel::OBMol&, std::vector<std::vector<PharmaPoint> >&)’:

    ../pharmarec.cpp:654:36: error: ‘AllUnique’ is not a member of
    ‘OpenBabel::OBSmartsPattern’

    make: *** Error 1

    make: *** Waiting for unfinished jobs....

    Finished building: ../ThreePointData.cpp

    Finished building: ../Triplet.cpp

    Finished building: ../main.cpp

    How should I fix this?

     
  • David Koes
    David Koes
    2011-08-10

    You need a more recent version of openbabel. Version 2.2.3 or later should
    work.

     
  • Hi,

    I have now used a different openbabel and that indeed solved this issue.

    However I now have a different error:

    Finished building: ../main.cpp

    Building target: pharmer

    Invoking: GCC C++ Linker

    g++ -o"pharmer" ./BoundingBox.o ./Corresponder.o ./PMol.o ./PharmerQuery.o
    ./PharmerServer.o ./QueryTripletFingerprint.o ./RMSD.o ./SphereGrid.o
    ./ThreePointData.o ./Triplet.o ./TripletFingerprint.o ./basis.o ./cgi.o
    ./main.o ./pharmarec.o ./pharmerdb.o ./tripletmatching.o ./tinyxml/tinystr.o
    ./tinyxml/tinyxml.o ./tinyxml/tinyxmlerror.o ./tinyxml/tinyxmlparser.o
    ./CommandLine2/CommandLine.o -ljson_cpp -lboost_date_time -lfcgi -lfcgi++
    -lcgicc -ltcmalloc_minimal -lboost_iostreams -lboost_system
    -lboost_program_options -lboost_thread -lboost_filesystem -lopenbabel

    /usr/bin/ld: cannot find -ljson_cpp

    /usr/bin/ld: cannot find -lboost_date_time

    /usr/bin/ld: cannot find -lboost_system

    /usr/bin/ld: cannot find -lboost_program_options

    /usr/bin/ld: cannot find -lboost_thread

    /usr/bin/ld: cannot find -lboost_filesystem

    collect2: ld returned 1 exit status

    make: *** Error 1

    I have installed boost via the package manager in Ubuntu 11.04.

    I'm not an expert in building with C++. Could you maybe help me to solve this
    issue?

    Thanks.

     
  • hello,

    is there any chance that there will be some windows installers in near future?
    all this compiling under linux is pretty discouraging for people who would
    like to use the method but are just humble bench medicinal chemists.

     
  • Hi,

    I tried your make files under ubuntu 10.04 and got the following error

    make: *** No rule to make target BoundingBox.o', needed bypharmer'. Stop.

    is there some way around this? thank you

     
  • Hi,

    I also tried your make files under Ubuntu 11.04 with 64 bits and got the
    following error:

    (I would make sure that the json_cpp
    (http://jsoncpp.sourceforge.net/)
    headers are in /usr/include/json)


    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$ make

    make: Warning: File `PMol.cpp' has modification time 1.6e+06 s in the future

    g++ -c -o Corresponder.o Corresponder.cpp

    In file included from pharmerdb.h:45:0,

    from Corresponder.h:30,

    from Corresponder.cpp:27:

    pharmarec.h:239:57: error: ‘Json’ has not been declared

    pharmarec.h:239:68: error: expected ‘,’ or ‘...’ before ‘&’ token

    pharmarec.h:256:31: warning: ‘convertPharmaJson’ initialized and declared
    ‘extern’

    pharmarec.h:256:31: error: ‘Json’ has not been declared

    pharmarec.h:256:44: error: ‘root’ was not declared in this scope

    pharmarec.h:256:50: error: expected primary-expression before ‘const’

    pharmarec.h:256:83: error: initializer expression list treated as compound
    expression

    pharmarec.h:263:53: error: ‘Json’ has not been declared

    pharmarec.h:263:64: error: expected ‘,’ or ‘...’ before ‘&’ token

    In file included from tripletmatching.h:41:0,

    from cors.h:35,

    from Corresponder.h:32,

    from Corresponder.cpp:27:

    params.h:74:18: error: ‘Json’ has not been declared

    params.h:74:29: error: expected ‘)’ before ‘&’ token

    Corresponder.cpp:28:105: error: expected ‘}’ at end of input

    In file included from tripletmatching.h:41:0,

    from cors.h:35,

    from Corresponder.h:32,

    from Corresponder.cpp:27:

    params.h:71:2: error: expected unqualified-id at end of input

    make: *** Error 1

    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$ clear

    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$ make

    make: Warning: File `PMol.cpp' has modification time 1.6e+06 s in the future

    g++ -c -o Corresponder.o Corresponder.cpp

    In file included from pharmerdb.h:45:0,

    from Corresponder.h:30,

    from Corresponder.cpp:27:

    pharmarec.h:239:57: error: ‘Json’ has not been declared

    pharmarec.h:239:68: error: expected ‘,’ or ‘...’ before ‘&’ token

    pharmarec.h:256:31: warning: ‘convertPharmaJson’ initialized and declared
    ‘extern’

    pharmarec.h:256:31: error: ‘Json’ has not been declared

    pharmarec.h:256:44: error: ‘root’ was not declared in this scope

    pharmarec.h:256:50: error: expected primary-expression before ‘const’

    pharmarec.h:256:83: error: initializer expression list treated as compound
    expression

    pharmarec.h:263:53: error: ‘Json’ has not been declared

    pharmarec.h:263:64: error: expected ‘,’ or ‘...’ before ‘&’ token

    In file included from tripletmatching.h:41:0,

    from cors.h:35,

    from Corresponder.h:32,

    from Corresponder.cpp:27:

    params.h:74:18: error: ‘Json’ has not been declared

    params.h:74:29: error: expected ‘)’ before ‘&’ token

    Corresponder.cpp:28:105: error: expected ‘}’ at end of input

    In file included from tripletmatching.h:41:0,

    from cors.h:35,

    from Corresponder.h:32,

    from Corresponder.cpp:27:

    params.h:71:2: error: expected unqualified-id at end of input

    make: *** Error 1

    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$


    Kindly help me to resolve the problem immediately!

    Thank you!

     
  • David Koes
    David Koes
    2012-03-27

    First, apologies to those who posted months ago to whom I never responded. I'm
    suppose to get an email notification any time someone posts, and this did not
    happen. If you post here and I don't respond with 48 hours please email me
    directly
    (but post here first).

    I posted in the files section a pre-built linux executable. This is
    dynamically linked, which means you must install all the necessary libraries
    (just run, it will say it can't find a library, search for that library in the
    software center/synaptic, install, repeat). This binary is up-to-date as of
    today.

    stevenrathmann: Since you aren't getting an error about not being able to find
    the json.h include file, I suspect you have some other json.h installed as
    part of some other package. You can test this be changing #include
    <json json.h=""> to use an absolute path, ie #include </usr>
    (and check to make sure that is indeed the json_cpp include file - is should
    include a few other files, all of which define things in the Json namespace).

     
  • Thank you very much, dkoes. Your suggestions or ideas partially work for me!

    These problems have been sorted out applying your suggestions.


    In file included from pharmerdb.h:45:0, from Corresponder.h:30, from
    Corresponder.cpp:27: pharmarec.h:239:57: error: ‘Json’ has not been declared
    pharmarec.h:239:68: error: expected ‘,’ or ‘...’ before ‘&’ token

    ...

    In file included from tripletmatching.h:41:0, from cors.h:35, from
    Corresponder.h:32, from Corresponder.cpp:27: params.h:74:18: error: ‘Json’ has
    not been declared params.h:74:29: error: expected ‘)’ before ‘&’ token
    Corresponder.cpp:28:105: error: expected ‘}’ at end of input


    Then I faced many other errors like: "fcgio.h: No such file or directory" ,
    "curl/curl.h: No such file or directory" and

    below:


    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$ make

    make: Warning: File `PMol.cpp' has modification time 1.5e+06 s in the future

    g++ -c -o PMol.o PMol.cpp

    g++ -c -o pharmerdb.o pharmerdb.cpp

    Building target: pharmer

    Invoking: GCC C++ Linker

    g++ -o"pharmer" ./BoundingBox.o ./Corresponder.o ./PMol.o ./PharmerQuery.o
    ./PharmerServer.o ./QueryTripletFingerprint.o ./RMSD.o ./SphereGrid.o
    ./ThreePointData.o ./Triplet.o ./TripletFingerprint.o ./basis.o ./cgi.o
    ./main.o ./pharmarec.o ./pharmerdb.o ./tripletmatching.o -ljson_cpp
    -lboost_date_time -lfcgi -lfcgi++ -lcgicc -ltcmalloc_minimal -lboost_iostreams
    -lboost_system -lboost_program_options -lboost_thread -lboost_filesystem
    -lopenbabel

    **/usr/bin/ld: cannot find -ljson_cpp
    /usr/bin/ld: cannot find -lfcgi

    /usr/bin/ld: cannot find -lfcgi++**

    collect2: ld returned 1 exit status

    make: *** Error 1

    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$


    I also resolved those problems one by one except "/usr/bin/ld: cannot find
    -ljson_cpp" ! Now I am facing this error only which I didn't.


    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$ make

    make: Warning: File `PMol.cpp' has modification time 1.5e+06 s in the future

    g++ -c -o PMol.o PMol.cpp

    g++ -c -o pharmerdb.o pharmerdb.cpp

    Building target: pharmer

    Invoking: GCC C++ Linker

    g++ -o"pharmer" ./BoundingBox.o ./Corresponder.o ./PMol.o ./PharmerQuery.o
    ./PharmerServer.o ./QueryTripletFingerprint.o ./RMSD.o ./SphereGrid.o
    ./ThreePointData.o ./Triplet.o ./TripletFingerprint.o ./basis.o ./cgi.o
    ./main.o ./pharmarec.o ./pharmerdb.o ./tripletmatching.o -ljson_cpp
    -lboost_date_time -lfcgi -lfcgi++ -lcgicc -ltcmalloc_minimal -lboost_iostreams
    -lboost_system -lboost_program_options -lboost_thread -lboost_filesystem
    -lopenbabel

    /usr/bin/ld: cannot find -ljson_cpp
    collect2: ld returned 1 exit status

    make: *** Error 1

    linuxcomp@linuxcomp:~/Desktop/Pharmer/pharmer$


    Kindly help me to resolve the problem immediately!

    Thank you!

     
  • For your kind information, I want to state you that I also used a pre-built
    linux executable file of "pharmer" (downloaded from files section).

    When I tried to execute it showed that "pharmer: error while loading shared
    libraries: libjson_cpp.so: cannot open shared object file: No such file or
    directory"

    That means there is no "libjson_cpp.so" file there. I searched a lot, no such
    file or directory exists there! I only found two files which look like
    "libjson_cpp.so". One is "libjson_linux-gcc-4.5.2_libmt.so" and another is
    "libjson_linux-gcc-4.5.2_libmt.a"
    . So, what should I do now?

    Kindly help me to resolve the problem, sir!

    Thank you!

     
  • David Koes
    David Koes
    2012-03-28

    It sounds like you haven't installed json_cpp:

    http://jsoncpp.sourceforge.net/

     
1 2 3 > >> (Page 1 of 3)