Hi Noel,

I tried Openbabel - 2.4.1 with updated version of SWIG - 3.0.12. But it didn’t 
help in getting my issue resolved.
I have used Python-3.6.3, CMake-3.7.2, libxml2-2.9.1, Eigen-3.2.8, zlib-1.2.11 
and Java-1.8.0.

Please see the output of cmake and error message of make :
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /opt/scp/software/GCCcore/6.3.0/bin/cc
-- Check for working C compiler: /opt/scp/software/GCCcore/6.3.0/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/scp/software/GCCcore/6.3.0/bin/c++
-- Check for working CXX compiler: /opt/scp/software/GCCcore/6.3.0/bin/c++ -- 
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using included inchi library.
-- Found LibXml2: /opt/scp/software/libxml2/2.9.1-foss-2017a/lib/libxml2.so 
(found version "2.9.1")
-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find wxWidgets (missing:  wxWidgets_LIBRARIES 
wxWidgets_INCLUDE_DIRS)
-- Looking for conio.h
-- Looking for conio.h - not found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for rpc/xdr.h
-- Looking for rpc/xdr.h - found
-- Looking for regex.h
-- Looking for regex.h - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for rint
-- Looking for rint - not found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for sranddev
-- Looking for sranddev - not found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of clock_t
-- Check size of clock_t - done
-- Performing Test SCANDIR_NEEDS_CONST
-- Performing Test SCANDIR_NEEDS_CONST - Failed
-- Performing Test HAVE_GCC_VISIBILITY
-- Performing Test HAVE_GCC_VISIBILITY - Success
-- Checking available shared pointer...
-- Performing Test HAVE_STD_SHARED_PTR
-- Performing Test HAVE_STD_SHARED_PTR - Success
-- Performing Test HAVE_STD_TR1_SHARED_PTR
-- Performing Test HAVE_STD_TR1_SHARED_PTR - Failed
-- Performing Test HAVE_STD_TR1_SHARED_PTR_IN_TR1_HEADER
-- Performing Test HAVE_STD_TR1_SHARED_PTR_IN_TR1_HEADER - Success
-- Use std::shared_ptr in memory
-- Could NOT find Eigen3 (missing:  EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) 
(Required is at least version "2.91.0")
-- Could NOT find Eigen2 (missing:  EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK) 
(Required is at least version "2.0.0")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Checking for module 'cairo'
--   No package 'cairo' found
-- Could NOT find Cairo (missing:  CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS)
-- Could NOT find Cairo. PNG output will NOT be supported.
-- Looking for getopt
-- Looking for getopt - found
-- Attempting to build the GUI
--    wxWidgets not found => GUI will not be built
-- Found PythonInterp: /opt/scp/software/Python/3.6.3-foss-2017a/bin/python 
(found version "3.6.3")
-- Found SWIG: /home/kzgm200/test/swig/bin/swig (found version "3.0.12")
-- Found SWIG: /home/kzgm200/test/swig/bin/swig (found suitable version 
"3.0.12", minimum required is "2.0")
-- Found PythonLibs: 
/opt/scp/software/Python/3.6.3-foss-2017a/lib/libpython3.6m.so (found version 
"3.6.3")
-- Python bindings will be compiled
-- Found JNI: /opt/scp/software/Java/1.8.0_102/jre/lib/amd64/libjawt.so
-- Found Java: /opt/scp/software/Java/1.8.0_102/bin/java (found version 
"1.8.0.102")
-- Java bindings will be compiled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kzgm200/test/openbabel/build

------------------- Error message of make

[ 99%] Building CXX object 
scripts/CMakeFiles/bindings_python.dir/python/openbabel-python.cpp.o
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:
 In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_0(PyObject*, 
int, PyObject**)’:
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34521:61:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg5 = static_cast< bool >(val5); result = 
(int)(arg1)->DiverseConfGen(arg2,arg3,arg4,arg5);
                                                             ^~~~~~~~~~~~~~
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:
 In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_1(PyObject*, 
int, PyObject**)’:
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34536:63:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg4 = static_cast< double >(val4); result = 
(int)(arg1)->DiverseConfGen(arg2,arg3,arg4);
                                                               ^~~~~~~~~~~~~~
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:
 In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_2(PyObject*, 
int, PyObject**)’:
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34549:69:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg3 = static_cast< unsigned int >(val3); result = 
(int)(arg1)->DiverseConfGen(arg2,arg3);
                                                                     
^~~~~~~~~~~~~~
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:
 In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_3(PyObject*, 
int, PyObject**)’:
/home/kzgm200/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34559:63:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg2 = static_cast< double >(val2); result = 
(int)(arg1)->DiverseConfGen(arg2);
                                                               ^~~~~~~~~~~~~~
make[2]: *** 
[scripts/CMakeFiles/bindings_python.dir/python/openbabel-python.cpp.o] Error 1
make[1]: *** [scripts/CMakeFiles/bindings_python.dir/all] Error 2
make: *** [all] Error 2

Thanks & Regards,
Pankaj Jha

From: Kumar Jha, Pankaj
Sent: 05 April 2018 19:25
To: Noel O'Boyle <baoille...@gmail.com>
Cc: openbabel-disc...@lists.sf.net
Subject: RE: [Open Babel] Openbabel - 2.4.1 - Compilation error for Python 
Binding

Hi Noel,

Thanks for your response and suggestion.
Sorry my bad, that’s a typing mistake, I have been using Python 3.6.3.
As per your suggestion I will try with updated version of SWIG and let you know 
whether it succeeds or not.


Thanks & Regards,
Pankaj Jha

From: Noel O'Boyle [mailto:baoille...@gmail.com]
Sent: 05 April 2018 19:13
To: Kumar Jha, Pankaj 
<pankaj.kumar...@astrazeneca.com<mailto:pankaj.kumar...@astrazeneca.com>>
Cc: openbabel-disc...@lists.sf.net<mailto:openbabel-disc...@lists.sf.net>
Subject: Re: [Open Babel] Openbabel - 2.4.1 - Compilation error for Python 
Binding

Hi Pankaj Jha,
We will need a little more information to help.

1. Python 3.6 or Python 2.7? You list both in your email.
2. On a clean build, can you provide the output from running cmake.
A potential problem is the old version of SWIG. If I were you I would download 
and compile the latest one (you can install it locally), and use 
-DSWIG_EXECUTABLE=whatever to point to the install location.
Regards,
- Noel



On 3 April 2018 at 06:05, Kumar Jha, Pankaj 
<pankaj.kumar...@astrazeneca.com<mailto:pankaj.kumar...@astrazeneca.com>> wrote:
Hi,

I am trying to compile Openbabel – 2.4.1 with Python-3.6.3
I have configured this with CMake-3.7.2, Python-2.7.13, libxml2-2.9.1, 
Eigen-3.2.8, zlib-1.2.11, SWIG-2.0.12, Java-1.8.0 and GCC-6.3.0.

I have used cmake with following options:
cmake ../openbabel-2.4.1 -DCMAKE_INSTALL_PREFIX=~/openbabel/2.4.1 -DRUN_SWIG=ON 
-DPYTHON_BINDINGS=ON -DJAVA_BINDINGS=ON

I am getting error while compiling it as following:

[ 99%] Built target test_runner
Scanning dependencies of target bindings_python
[ 99%] Building CXX object 
scripts/CMakeFiles/bindings_python.dir/python/openbabel-python.cpp.o
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp: 
In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_0(PyObject*, 
int, PyObject**)’:
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34521:61:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg5 = static_cast< bool >(val5); result = 
(int)(arg1)->DiverseConfGen(arg2,arg3,arg4,arg5);
                                                             ^~~~~~~~~~~~~~
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp: 
In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_1(PyObject*, 
int, PyObject**)’:
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34536:63:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg4 = static_cast< double >(val4); result = 
(int)(arg1)->DiverseConfGen(arg2,arg3,arg4);
                                                               ^~~~~~~~~~~~~~
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp: 
In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_2(PyObject*, 
int, PyObject**)’:
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34549:69:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg3 = static_cast< unsigned int >(val3); result = 
(int)(arg1)->DiverseConfGen(arg2,arg3);
                                                                     
^~~~~~~~~~~~~~
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp: 
In function ‘PyObject* _wrap_OBForceField_DiverseConfGen__SWIG_3(PyObject*, 
int, PyObject**)’:
/home/pkj/test/openbabel/openbabel-2.4.1/scripts/python/openbabel-python.cpp:34559:63:
 error: ‘class OpenBabel::OBForceField’ has no member named ‘DiverseConfGen’
     arg2 = static_cast< double >(val2); result = 
(int)(arg1)->DiverseConfGen(arg2);
                                                               ^~~~~~~~~~~~~~
make[2]: *** 
[scripts/CMakeFiles/bindings_python.dir/python/openbabel-python.cpp.o] Error 1
make[1]: *** [scripts/CMakeFiles/bindings_python.dir/all] Error 2
make: *** [all] Error 2


I don’t get any error if I remove -DPYTHON_BINDINGS=ON but then I don’t get 2 
executables generated  including obrms.
Could anyone please let me know what could be the possible reason for this 
python binding failure.

Thanks & Regards,
Pankaj Jha

________________________________
Confidentiality Notice: This message is private and may contain confidential 
and proprietary information. If you have received this message in error, please 
notify us and remove it from your system and note that you must not copy, 
distribute or take any action in reliance on it. Any unauthorized use or 
disclosure of the contents of this message is not permitted and may be unlawful.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net<mailto:OpenBabel-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

________________________________

Confidentiality Notice: This message is private and may contain confidential 
and proprietary information. If you have received this message in error, please 
notify us and remove it from your system and note that you must not copy, 
distribute or take any action in reliance on it. Any unauthorized use or 
disclosure of the contents of this message is not permitted and may be unlawful.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to