On Mon, Nov 4, 2013 at 12:30 AM, Anil Kumar <yakuzi1...@yahoo.com> wrote:

> Sorry to re-post --  is there a work around for this?
> I found a patch for this but, when I cut/paste that patch into
> cmakelist.txt, it did not make any difference.  The link to the patch I
> refer to is here <http://sourceforge.net/p/openbabel/bugs/839/>
>

I gave up on Perl bindings for OpenBabel.  It wouldn't work on my Linux
system (Ubuntu 10.04 and 12.04).  It compiles and links, but can't find the
shared libraries for plug-ins. When you try to read a file, it reports
unknown format whether it's smi, sdf, inchi, whatever.

Not only that, but my own Perl extention that I wrote using Swig wouldn't
work.  It got the exact same error as OpenBabel's perl bindings.

Here is a link to the last couple discussions we had on this topic:

http://sourceforge.net/mailarchive/message.php?msg_id=31056243

http://sourceforge.net/mailarchive/message.php?msg_id=31040941

I worked for a week on it and wasn't able to solve the problem with
OpenBabel's Perl bindings, and finally gave up.

I had similar experiences with the Postgres database.  I wrote a plug-in
SQL extension that used OpenBabel as part of plug-in .so library. It
constantly crashed our Postgres database server in a way that made no
sense. The problem seems to be the way OpenBabel is linked.  Both Perl and
Postgres are written in pure C, and OpenBabel is written in C++.  When a C
program includes a C++ library, it seems to miss a critical initialization
step.

With Postgres, after years of using OpenBabel, I finally gave up and
re-architected our system so that the OpenBabel functionality we need is in
a separate fast-CGI server written in pure C++. It works beautifully.  No
C/C++ mixing, just pure C++.

I don't know if it's something specific to OpenBabel, or a more general
problem with C/C++.  I have to believe it's OpenBabel, because I know lots
of projects use libraries written in C++ linked to executables written in C.

Craig



>
> Thanks in advance,
> Prashanth
>
>
>   On Thursday, October 31, 2013 6:03 PM, Anil Kumar <yakuzi1...@yahoo.com>
> wrote:
>   Hello all,
>
> I am trying to compile OB with perl bindings. I have all the pre-reqs for
> perl bindings as you have suggested. Here is the command follwoed by the
> errors I am getting. Can someone please suggest whats going on.
>
> cmake ../openbabel-2.3.2 -DPERL_BINDINGS=ON
> -- The C compiler identification is GNU
> -- The CXX compiler identification is GNU
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Using included inchi library.
> -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so
> -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4")
> -- Found wxWidgets: TRUE
> -- 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
> -- Found Eigen3: /usr/include/eigen3 (Required is at least version
> "2.91.0")
> -- checking for module 'cairo'
> --   found cairo, version 1.10.2
> -- Found Cairo: /usr/lib/x86_64-linux-gnu/libcairo.so
> -- Cairo found. PNG output will be supported.
> -- Looking for getopt
> -- Looking for getopt - found
> -- Attempting to build the GUI
> --    wxWidgets found => GUI will be built
> -- Found PythonInterp: /usr/bin/python (found version "2.7.3")
> -- Found Perl: /usr/bin/perl
> -- Found PerlLibs: /usr/lib/libperl.so (found version "5.14.2")
> -- Perl bindings will be compiled
> CMake Error at scripts/CMakeLists.txt:244 (add_custom_target):
>   add_custom_target cannot create target "bindings_perl" because another
>   target with the same name already exists.  The existing target is a
> module
>   library created in source directory
>   "/home/prasanth/installations/openbabel-2.3.2/scripts".  See
> documentation
>   for policy CMP0002 for more details.
>
>
> -- Configuring incomplete, errors occurred!
>
> Thanks in advance,
> Anil Kumar
>
>
>
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models.
> Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and
> register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to