Thanks David...that did it.
Once I used the shared library libpython2.7.so I could get it to compile
all the way.

Thanks for your help

Hari




On Sun, Sep 8, 2013 at 8:28 AM, David Hall
<li...@cowsandmilk.net<javascript:_e({}, 'cvml',
'li...@cowsandmilk.net');>
> wrote:

> Have you tried using the shared library libpython2.7.so instead of the
> static libpython2.7.a ?
>
>
>
>
> On Sun, Sep 8, 2013 at 6:37 AM, hari jayaram 
> <hari...@gmail.com<javascript:_e({}, 'cvml', 'hari...@gmail.com');>
> > wrote:
>
>>  Hello all...
>> I managed to solve part of the problem with the build using a modified
>> version of FindPythonLibsNew.cmake based on the pne used by numpy mentioned
>> here<https://bitbucket.org/fenics-project/dolfin/pull-request/29/IE=edge>. 
>> When I put that FindPythonLibsNew.cmake script
>> into /usr/share/cmake-2.8/Modules, the python library linking is reported
>> correctly by cmake.
>>
>> Here is what I see when I run cmake
>>
>> -- Found PythonInterp: /home/hari/.virtualenvs/ptn2p7p5/bin/python (found
>> version "2.7.5")
>> -- Searching for Python libs in
>> /home/hari/.virtualenvs/ptn2p7p5/lib64;/home/hari/.virtualenvs/ptn2p7p5/lib
>> -- Found Python lib /usr/local/lib/libpython2.7.a
>> -- Found PythonLibs: /usr/local/lib/libpython2.7.a
>>
>>
>> So the old confusing message where it was
>> reporting /usr/local/lib/libpython2.7.a but had a version of 3.3.2 is now
>> gone.
>>
>> Despite this I get the original error reproduced below during rdkit
>> building.
>>
>> Scanning dependencies of target RDBoost
>> [  3%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
>> Linking CXX shared library ../../lib/libRDBoost.so
>> /usr/bin/ld: /usr/local/lib/libpython2.7.a(exceptions.o): relocation
>> R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared
>> object; recompile with -fPIC
>> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
>> collect2: error: ld returned 1 exit status
>> make[2]: *** [lib/libRDBoost.so.1.2013.09.1pre] Error 1
>> make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
>> make: *** [all] Error 2
>>
>>
>>
>> Thanks
>> Hari
>>
>>
>> On Sat, Sep 7, 2013 at 8:20 AM, hari jayaram 
>> <hari...@gmail.com<javascript:_e({}, 'cvml', 'hari...@gmail.com');>
>> > wrote:
>>
>>> The actual error message I get is this one. The previous message I had
>>> commented out a section of the code in
>>> rdkit/Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp resulting in a different
>>> error. When I start from a clean repository this is the error I get.
>>>
>>>
>>> Scanning dependencies of target RDBoost
>>> [  3%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
>>> /home/hari/rdkit-git-src/rdkit/Code/RDBoost/Wrap.cpp: In function ‘void
>>> throw_index_error(int)’:
>>> /home/hari/rdkit-git-src/rdkit/Code/RDBoost/Wrap.cpp:24:55: error:
>>> ‘PyInt_FromLong’ was not declared in this scope
>>> make[2]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o] Error 1
>>> make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
>>> make: *** [all] Error 2
>>>
>>> Thanks
>>> Hari
>>>
>>> Repeating post in case of non threaded viewers:
>>> Hi ,
>>> I wanted to use the rdkit version from github under a virtualenv in
>>> python.
>>> So I wanted to compile rdkit from source instead of using the Ubuntu
>>> supplied python-rdkit.
>>>
>>> The steps I followed were
>>>
>>> 1) removed Ubuntu supplied python-rdkit  , libpython2.7-dev and
>>> libboost-dev ( ver 1.49 )
>>>
>>> 2) Compiled Python 2.7.5 and  boost 1.53 with suggested flags and
>>> settings:
>>>     Python: /configure CFLAGS=-fPIC --enable-unicode=ucs4
>>> --enable-shared ,
>>>     boost :./bootstrap.sh --with-libraries=python,regex; ./b2; ./b2
>>> install
>>>
>>>
>>> 3) I then ran the make script with
>>>
>>> cmake -D PYTHON_LIBRARY=/usr/local/lib/libpython2.7.a ..
>>>
>>> 4) cmake did tell me that it was using the Boost 1.53 I compiled and
>>> rather strangely for the python library the correct *.a file with a weird
>>> version 3.3.2 ( I had installed python3.3.2 libs in /usr/local/bin as well)
>>>
>>> -- Found PythonLibs: /usr/local/lib/libpython2.7.a (found version
>>> "3.3.2")
>>> -- Found PythonInterp: /home/hari/.virtualenvs/ptn2p7p5/bin/python
>>> (found version "2.7.5")
>>>
>>> 5) Failure message
>>>
>>> After this when I compile it fails with message
>>>
>>> Scanning dependencies of target RDBoost
>>> [  3%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
>>> Linking CXX shared library ../../lib/libRDBoost.so
>>> /usr/bin/ld: /usr/local/lib/libpython2.7.a(exceptions.o): relocation
>>> R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared
>>> object; recompile with -fPIC
>>> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
>>> collect2: error: ld returned 1 exit status
>>> make[2]: *** [lib/libRDBoost.so.1.2013.09.1pre] Error 1
>>> make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
>>> make: *** [all] Error 2
>>>
>>> ANy ideas what I am doing wrong.
>>>
>>> Thank you for all your help
>>>
>>>
>>> On Sat, Sep 7, 2013 at 8:11 AM, hari jayaram 
>>> <hari...@gmail.com<javascript:_e({}, 'cvml', 'hari...@gmail.com');>
>>> > wrote:
>>>
>>>> Hi ,
>>>> I wanted to use the rdkit version from github under a virtualenv in
>>>> python.
>>>> So I wanted to compile rdkit from source instead of using the Ubuntu
>>>> supplied python-rdkit.
>>>>
>>>> The steps I followed were
>>>>
>>>> 1) removed Ubuntu supplied python-rdkit  , libpython2.7-dev and
>>>> libboost-dev ( ver 1.49 )
>>>>
>>>> 2) Compiled Python 2.7.5 and  boost 1.53 with suggested flags and
>>>> settings:
>>>>     Python: /configure CFLAGS=-fPIC --enable-unicode=ucs4
>>>> --enable-shared ,
>>>>     boost :./bootstrap.sh --with-libraries=python,regex; ./b2; ./b2
>>>> install
>>>>
>>>>
>>>> 3) I then ran the make script with
>>>>
>>>> cmake -D PYTHON_LIBRARY=/usr/local/lib/libpython2.7.a ..
>>>>
>>>> 4) cmake did tell me that it was using the Boost 1.53 I compiled and
>>>> rather strangely for the python library the correct *.a file with a weird
>>>> version 3.3.2 ( I had installed python3.3.2 libs in /usr/local/bin as well)
>>>>
>>>> -- Found PythonLibs: /usr/local/lib/libpython2.7.a (found version
>>>> "3.3.2")
>>>> -- Found PythonInterp: /home/hari/.virtualenvs/ptn2p7p5/bin/python
>>>> (found version "2.7.5")
>>>>
>>>> 5) Failure message
>>>>
>>>> After this when I compile it fails with message
>>>>
>>>> Scanning dependencies of target RDBoost
>>>> [  3%] Building CXX object
>>>> Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
>>>> Linking CXX shared library ../../lib/libRDBoost.so
>>>> /usr/bin/ld: /usr/local/lib/libpython2.7.a(exceptions.o): relocation
>>>> R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared
>>>> object; recompile with -fPIC
>>>> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
>>>> collect2: error: ld returned 1 exit status
>>>> make[2]: *** [lib/libRDBoost.so.1.2013.09.1pre] Error 1
>>>> make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
>>>> make: *** [all] Error 2
>>>>
>>>> ANy ideas what I am doing wrong.
>>>>
>>>> Thank you for all your help
>>>> Hari
>>>>
>>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft
>> technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net <javascript:_e({}, 'cvml',
>> 'Rdkit-discuss@lists.sourceforge.net');>
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to