Closed AspirinCode closed 1 year ago
Now it looks like a problem with the OpenBabel installation. How did you install that? The error messages indicate that it can find the header files, but not the library.
compiled and installed OpenBabel2.4.1
What did the CMake log say about OpenBabel? You could try to specify the locations of OpenBabel to CMake. I usually use ccmake to get a list of all settings and make sure that they are correct.
I did not test mychem against OpenBabel v2.4.1. Some files may need an update. I will check this asap!
Hello, I'd really appreciate the help. I'm having a similar but somewhat different issue. After applying the 'make' command, I get this message:
10-124-219-136:build petersullivan$ make
Scanning dependencies of target mychem-lib
[ 3%] Building C object src/CMakeFiles/mychem-lib.dir/conversion.c.o
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:46:
/usr/local/include/mysql/my_global.h:3:2: warning: This file should not be included by clients, include only
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:47:
/usr/local/include/mysql/my_sys.h:3:2: warning: This file should not be included by clients, include only
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:49:
/usr/local/include/mysql/m_ctype.h:43:3: error: unknown type name 'uint16'; did you mean 'uint'?
uint16 toupper;
^~
uint
/usr/include/sys/types.h:92:23: note: 'uint' declared here
typedef unsigned int uint; / Sys V compatibility /
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:49:
/usr/local/include/mysql/m_ctype.h:44:3: error: unknown type name 'uint16'; did you mean 'uint'?
uint16 tolower;
^~
uint
/usr/include/sys/types.h:92:23: note: 'uint' declared here
typedef unsigned int uint; / Sys V compatibility /
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:49:
/usr/local/include/mysql/m_ctype.h:45:3: error: unknown type name 'uint16'; did you mean 'uint'?
uint16 sort;
^~
uint
/usr/include/sys/types.h:92:23: note: 'uint' declared here
typedef unsigned int uint; / Sys V compatibility /
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:49:
/usr/local/include/mysql/m_ctype.h:54:3: error: unknown type name 'uchar'
uchar pctype;
^
/usr/local/include/mysql/m_ctype.h:55:3: error: unknown type name 'uchar'
uchar ctype;
^
/usr/local/include/mysql/m_ctype.h:100:3: error: unknown type name 'uint16'; did you mean 'uint'?
uint16 from;
^~
uint
/usr/include/sys/types.h:92:23: note: 'uint' declared here
typedef unsigned int uint; / Sys V compatibility /
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:49:
/usr/local/include/mysql/m_ctype.h:101:3: error: unknown type name 'uint16'; did you mean 'uint'?
uint16 to;
^~
uint
/usr/include/sys/types.h:92:23: note: 'uint' declared here
typedef unsigned int uint; / Sys V compatibility /
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:49:
/usr/local/include/mysql/m_ctype.h:102:3: error: unknown type name 'uchar'
uchar tab;
^
/usr/local/include/mysql/m_ctype.h:137:16: error: unknown type name 'uchar'
const uchar , size_t, const uchar , size_t, my_bool);
^
/usr/local/include/mysql/m_ctype.h:137:39: error: unknown type name 'uchar'
const uchar , size_t, const uchar , size_t, my_bool);
^
/usr/local/include/mysql/m_ctype.h:139:32: error: unknown type name 'uchar'
const uchar , size_t, const uchar , size_t,
^
/usr/local/include/mysql/m_ctype.h:139:55: error: unknown type name 'uchar'
const uchar , size_t, const uchar , size_t,
^
/usr/local/include/mysql/m_ctype.h:142:26: error: unknown type name 'uchar'
uchar , size_t, const uchar , size_t);
^
/usr/local/include/mysql/m_ctype.h:142:49: error: unknown type name 'uchar'
uchar , size_t, const uchar , size_t);
^
/usr/local/include/mysql/m_ctype.h:146:4: error: unknown type name 'pchar'; did you mean 'char'?
pchar w_prefix, pchar w_one, pchar w_many,
^~~~~
char
/usr/local/include/mysql/m_ctype.h:146:20: error: unknown type name 'pchar'; did you mean 'char'?
pchar w_prefix, pchar w_one, pchar w_many,
^~~~~
char
/usr/local/include/mysql/m_ctype.h:146:33: error: unknown type name 'pchar'; did you mean 'char'?
pchar w_prefix, pchar w_one, pchar w_many,
^~~~~
char
/usr/local/include/mysql/m_ctype.h:163:55: error: unknown type name 'uchar'
void (hash_sort)(struct charset_info_st cs, const uchar key, size_t len,
^
/usr/local/include/mysql/m_ctype.h:164:7: error: unknown type name 'ulong'
ulong nr1, ulong *nr2);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make[2]: [src/CMakeFiles/mychem-lib.dir/conversion.c.o] Error 1
make[1]: [src/CMakeFiles/mychem-lib.dir/all] Error 2
make: *** [all] Error 2
10-124-219-136:build petersullivan$ make
Scanning dependencies of target mychem-lib
[ 3%] Building C object src/CMakeFiles/mychem-lib.dir/conversion.c.o
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:46:
/usr/local/include/mysql/my_global.h:484:10: fatal error: 'my_compiler.h' file not found
^~~~~~~~~~~~~~~
1 error generated.
make[2]: [src/CMakeFiles/mychem-lib.dir/conversion.c.o] Error 1
make[1]: [src/CMakeFiles/mychem-lib.dir/all] Error 2
make: *** [all] Error 2
10-124-219-136:build petersullivan$ make
[ 3%] Building C object src/CMakeFiles/mychem-lib.dir/conversion.c.o
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31:
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:46:
/usr/local/include/mysql/my_global.h:484:10: warning: non-portable path to file '
^~~~~~~~~~~~~~~
<My_compiler.h>
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31: In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:46: In file included from /usr/local/include/mysql/my_global.h:484: /usr/local/include/mysql/my_compiler.h:1493:1: error: non-ASCII characters are not allowed outside of literals and identifiers © 2018 GitHub, Inc. ^~ /usr/local/include/mysql/my_compiler.h:1493:4: error: expected identifier or '(' © 2018 GitHub, Inc. ^ In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31: In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:46: /usr/local/include/mysql/my_global.h:545:9: error: unknown type name 'SOCKET_SIZE_TYPE' typedef SOCKET_SIZE_TYPE size_socket; ^ /usr/local/include/mysql/my_global.h:722:2: error: "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
^ /usr/local/include/mysql/my_global.h:791:9: warning: 'isnan' macro redefined [-Wmacro-redefined]
^
/usr/include/math.h:178:9: note: previous definition is here
^
In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.c:31: In file included from /Users/petersullivan/Documents/computer-related/MySQL/mychem-code-0.9.3/src/conversion.h:46: /usr/local/include/mysql/my_global.h:1029:10: fatal error: 'my_dbug.h' file not found
^~~~~~~~~~~
2 warnings and 5 errors generated. make[2]: [src/CMakeFiles/mychem-lib.dir/conversion.c.o] Error 1 make[1]: [src/CMakeFiles/mychem-lib.dir/all] Error 2 make: *** [all] Error 2
Can you share the build/CMakeCache.txt
file?
[root@aspirin build]# make Scanning dependencies of target mychem-lib [ 3%] Building C object src/CMakeFiles/mychem-lib.dir/conversion.c.o In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/conversion.h:45:0, from /home/Aspirin/Downloads/mychem-0.9.3/src/conversion.c:31: /usr/local/mysql/include/my_global.h:362:6: warning: "_WIN32" is not defined [-Wundef]
if (_WIN32)
^ /usr/local/mysql/include/my_global.h:417:6: warning: "__cplusplus" is not defined [-Wundef]
if (__cplusplus >= 201103L)
^ [ 7%] Building CXX object src/CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:40:0: /home/Aspirin/Downloads/mychem-0.9.3/src/fingerprints/finger2.cpp:48:21: warning: unused parameter ‘fp’ [-Wunused-parameter] virtual std::string DescribeBits(const std:: vector fp, bool bSet=true) ^ /home/Aspirin/Downloads/mychem-0.9.3/src/fingerprints/finger2.cpp:48:21: warning: unused parameter ‘bSet’ [-Wunused-parameter] In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:41:0: /home/Aspirin/Downloads/mychem-0.9.3/src/fingerprints/finger3.cpp: In member function ‘virtual bool OpenBabel::PatternFP::GetFingerprint(OpenBabel::OBBase*, std::vector&, int)’: /home/Aspirin/Downloads/mychem-0.9.3/src/fingerprints/finger3.cpp:93:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while(n < _bitcount) ^ /home/Aspirin/Downloads/mychem-0.9.3/src/fingerprints/finger3.cpp: In member function ‘virtual std::string OpenBabel::PatternFP::DescribeBits(std::vector, bool)’: /home/Aspirin/Downloads/mychem-0.9.3/src/fingerprints/finger3.cpp:220:36: warning: operation on ‘div’ may be undefined [-Wsequence-point] ngrp = (num + div -1)/div--; //rounds up ^ [ 11%] Building C object src/CMakeFiles/mychem-lib.dir/helper.c.o In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/helper.h:45:0, from /home/Aspirin/Downloads/mychem-0.9.3/src/helper.c:31: /usr/local/mysql/include/my_global.h:362:6: warning: "_WIN32" is not defined [-Wundef]
if (_WIN32)
^ /usr/local/mysql/include/my_global.h:417:6: warning: "__cplusplus" is not defined [-Wundef]
if (__cplusplus >= 201103L)
^ [ 14%] Building CXX object src/CMakeFiles/mychem-lib.dir/helper_wrapper.cpp.o [ 18%] Building C object src/CMakeFiles/mychem-lib.dir/modification.c.o In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/modification.h:45:0, from /home/Aspirin/Downloads/mychem-0.9.3/src/modification.c:31: /usr/local/mysql/include/my_global.h:362:6: warning: "_WIN32" is not defined [-Wundef]
if (_WIN32)
^ /usr/local/mysql/include/my_global.h:417:6: warning: "__cplusplus" is not defined [-Wundef]
if (__cplusplus >= 201103L)
^ [ 22%] Building CXX object src/CMakeFiles/mychem-lib.dir/modification_wrapper.cpp.o [ 25%] Building C object src/CMakeFiles/mychem-lib.dir/molmatch.c.o In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/molmatch.h:45:0, from /home/Aspirin/Downloads/mychem-0.9.3/src/molmatch.c:31: /usr/local/mysql/include/my_global.h:362:6: warning: "_WIN32" is not defined [-Wundef]
if (_WIN32)
^ /usr/local/mysql/include/my_global.h:417:6: warning: "__cplusplus" is not defined [-Wundef]
if (__cplusplus >= 201103L)
^ [ 29%] Building CXX object src/CMakeFiles/mychem-lib.dir/molmatch_wrapper.cpp.o [ 33%] Building C object src/CMakeFiles/mychem-lib.dir/property.c.o In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/property.h:47:0, from /home/Aspirin/Downloads/mychem-0.9.3/src/property.c:33: /usr/local/mysql/include/my_global.h:362:6: warning: "_WIN32" is not defined [-Wundef]
if (_WIN32)
^ /usr/local/mysql/include/my_global.h:417:6: warning: "__cplusplus" is not defined [-Wundef]
if (__cplusplus >= 201103L)
^ [ 37%] Building CXX object src/CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o In file included from /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:41:0: /home/Aspirin/Downloads/mychem-0.9.3/src/descriptors/groupcontrib.cpp: In member function ‘virtual double OpenBabel::OBGroupContrib::Predict(OpenBabel::OBBase, std::string)’: /home/Aspirin/Downloads/mychem-0.9.3/src/descriptors/groupcontrib.cpp:160:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int index = 0; index < tmpmol.NumAtoms(); index++) { ^ /home/Aspirin/Downloads/mychem-0.9.3/src/descriptors/groupcontrib.cpp: At global scope: /home/Aspirin/Downloads/mychem-0.9.3/src/descriptors/groupcontrib.cpp:104:10: warning: unused parameter ‘param’ [-Wunused-parameter] double OBGroupContrib::Predict(OBBase pOb, string param) ^ [ 40%] Building CXX object src/CMakeFiles/mychem-lib.dir/serialization.cpp.o [ 44%] Building CXX object src/CMakeFiles/mychem-lib.dir/dlhandler_unix.cpp.o Linking CXX shared library libmychem.so CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o: In function conversion': /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:71: undefined reference toOpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o: In function conversionV3000': /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:113: undefined reference toOpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o: In function V3000conversion': /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:156: undefined reference toOpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o: In function CMLconversion': /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:191: undefined reference toOpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o: In function conversionCML': /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:223: undefined reference toOpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o:/home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:304: more undefined references to OpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' follow CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o: In functionconversionFPT': /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:256: undefined reference to OpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o: In functionserializeMolecule': /home/Aspirin/Downloads/mychem-0.9.3/src/conversion_wrapper.cpp:335: undefined reference to OpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/modification_wrapper.cpp.o: In functionob_add_hydrogens': /home/Aspirin/Downloads/mychem-0.9.3/src/modification_wrapper.cpp:61: undefined reference to OpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/modification_wrapper.cpp.o: In functionob_remove_hydrogens': /home/Aspirin/Downloads/mychem-0.9.3/src/modification_wrapper.cpp:91: undefined reference to OpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/modification_wrapper.cpp.o: In functionob_strip_salts': /home/Aspirin/Downloads/mychem-0.9.3/src/modification_wrapper.cpp:120: undefined reference to OpenBabel::OBConversion::SetInAndOutFormats(char const, char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In functiongetMolWeight': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:68: undefined reference to OpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In functiongetExactMass': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:92: undefined reference to OpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In functiongetAtomCount': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:116: undefined reference to OpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In functiongetHeavyAtomCount': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:140: undefined reference to OpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In functiongetBondCount': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:164: undefined reference to OpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o:/home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:188: more undefined references toOpenBabel::OBConversion::SetInFormat(char const)' follow CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In function getRotableBondCount': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:190: undefined reference toOpenBabel::OBMol::NumRotors()' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In function getTotalCharge': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:212: undefined reference toOpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In function getFormula': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:237: undefined reference toOpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In function getAcceptors': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:262: undefined reference toOpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In function getDonors': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:292: undefined reference toOpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o: In function getPSA': /home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:323: undefined reference toOpenBabel::OBConversion::SetInFormat(char const)' CMakeFiles/mychem-lib.dir/property_wrapper.cpp.o:/home/Aspirin/Downloads/mychem-0.9.3/src/property_wrapper.cpp:351: more undefined references to OpenBabel::OBConversion::SetInFormat(char const)' follow CMakeFiles/mychem-lib.dir/serialization.cpp.o: In functionunserializeOBMol(OpenBabel::OBBase, char const, bool)': /home/Aspirin/Downloads/mychem-0.9.3/src/serialization.cpp:207: undefined reference to `OpenBabel::OBMol::AddAtom(OpenBabel::OBAtom&)' collect2: error: ld returned 1 exit status make[2]: [src/libmychem.so.0.9.3] Error 1 make[1]: [src/CMakeFiles/mychem-lib.dir/all] Error 2 make: *** [all] Error 2 [root@aspirin build]#
have new error!!!