Dear Robert,
I recently ran also into several problems while installing rdkit on a fresh
Centos 5.3. It's a real headache. Anyway, this time I've written up a guide of
how to do it step by step, I hope I didn't forget anything in the end. However,
now it works just fine on our Centos machines. Here's the step by step
installing guide :
Centos is a stable but not very userfriendly OS. This becomes obvious when one
wants to install python packages like pycuda etc...Centos comes with a very old
python version, 2.4, but lots of newer features, like pycuda require a newer
python version. Lets start the lengthy install process under Centos :
Installing Python 2.6 or newer
If you already have python2.7 installed, please check that it was installed
with --enabled-shared. If this is the case you should have libpython2.7.so in
/usr/local/lib. If not, you should have libpython2.7.a. If the second is the
case, you have to install python2.7 with the following way :
Download the current version from python (source code). Like with 2.6 or 2.7
(don't grab the 3.x for now) :
wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
Next untar and unzip the file, go to Python-2.7 directory and issue :
./configure --enable-shared; make; sudo make install
This installs python in the /usr/local/ directory.
Add the RPMForge repo to yum :
wget
http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
su -c 'rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm'
Then install atlas, lapack, blas :
yum install atlas-c++.x86_64 atlas-c++-devel.x86_64 lapack.x86_64
lapack-devel.x86_64 blas.x86_64 blas-devel.x86_64
Now we can install fftw3 :
yum install fftw3.x86_64 fftw3-devel.x86_64
Now we could potentially install numpy 1.3 or 1.4, but as python2.7 is brand
new there are some problems. I downloaded :
wget
http://sourceforge.net/projects/numpy/files/NumPy/1.3.0/numpy-1.3.0.tar.gz/download
then untar and unzip this whole thing and go to the numpy directory
Download the following patch :
wget
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/numpy/files/numpy-1.4.0-python-2.7.patch
and apply it in this directory using :
patch -p0 < numpy-1.4.0-python-2.7.patch
Now build numpy using python setup.py build; python setup.py install
Numpy should now be accessible from python2.7, simply try a import numpy after
launching python to check.
First we need to install the boost libraries and their python bindings.
Download boost to your downloads directory using, here I use the version 1.41
of boost. :
wget
http://sourceforge.net/projects/boost/files/boost/1.41.0/boost_1_41_0.tar.gz/download
untar and unzip this file and go to the directory.
Then issue the following commands :
./bootstrap.sh --with-libraries=python,regex,signals,thread
Then you can issue the boost build command :
./bjam -j24 variant=release address-model=64 cflags=-fPIC cxxflags=-fPIC
link=shared install
Then add the line "export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}" to
your .bashrc file and source it.
If you have the default flex and bison packages installed from the yum
repositories erase them using yum erase flex and yum erase bison. Those are
extremely old and Rdkit needs newer ones, we have to build them by hand now.
wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.gz?download
untar and unzip, cd flex-2.5.35 and then do a classic :
./configure; make; make install
Now grab and install bison using the same procedure as for flex :
wget http://ftp.gnu.org/gnu/bison/bison-2.4.2.tar.gz
...
Now we have to upgrade cmake, because Centos uses, as usual an old and a bit
buggy on. Download cmake 2.8 from here and untar and unzip it and go to the
directory. Previously uninstall the existing (if existing) cmake version on
your Centos platform using "yum erase cmake".
The installation should be easy using :
./bootstrap; make; make install
Finally we can go to the Rdkit part:
Download RDKit from here.
wget
https://sourceforge.net/projects/rdkit/files/rdkit/Q2_2010/RDKit_Q22010_1.tgz/download
wget
http://mathema.tician.de/news.tiker.net/download/software/boost-bindings/boost-numeric-bindings-20081116.tar.gz
and follow instructions on boost numeric bindings here .
cp -r boost_1_41_0 /usr/local
cp -r RDKit_Q22010 /usr/local
define environment variables in /etc/bashrc as follows :
export RDBASE=/usr/local/RDKit_Q22010_1
export BOOSTHOME=/usr/local/boost_1_41_0
export BOOST_BUILD_PATH=/usr/local
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/bin
export PYTHON_ROOT=/usr/local
export PYTHON_VERSION=2.7
export PYTHONPATH=$PYTHONPATH:$RDBASE
got to the /usr/local/RDKit_Q22010 directory and do :
mkdir build; cd build
Add #define BOOST_PYTHON_NO_PY_SIGNATURES at the top of
../Code/GraphMol/Wrap/EditableMol.cpp
then issue the command :
cmake -D PYTHON_LIBRARY=/usr/local/lib/libpython2.7.so -D
PYTHON_INCLUDE_DIR=/usr/local/include/python2.7/ -D
PYTHON_EXECUTABLE=/usr/local/bin/python -D BOOST_ROOT=/usr/local/
-DBoost_USE_STATIC_LIBS=OFF ..
make
make install
Next you should install the test databases for rdkit, like said in the
documentation.
On 15/11/2010, at 21:45, Robert DeLisle wrote:
> I've been working to build RDKit on Centos 5, and I'm hitting a very common
> error. Unfortunately, none of the standard fixes have helped.
>
> Details:
>
> The error that I'm seeing is this:
>
> [ 82%] Building CXX object
> Code/GraphMol/SLNParse/CMakeFiles/SLNParse.dir/SLNParse.cpp.o
> [ 83%] Building CXX object
> Code/GraphMol/SLNParse/CMakeFiles/SLNParse.dir/SLNAttribs.cpp.o
> [ 83%] Building CXX object
> Code/GraphMol/SLNParse/CMakeFiles/SLNParse.dir/sln.tab.cpp.o
> [ 84%] Building CXX object
> Code/GraphMol/SLNParse/CMakeFiles/SLNParse.dir/lex.yysln.cpp.o
> Linking CXX shared library libSLNParse.so
> /usr/bin/ld: /usr/lib/../lib64/libboost_regex.a(instances.o): relocation
> R_X86_64_32 against
> `boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>,
> boost::re_detail::cpp_regex_traits_implementation<char>
> >::do_get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned
> long)::s_data' can not be used when making a shared object; recompile with
> -fPIC
> /usr/lib/../lib64/libboost_regex.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [Code/GraphMol/SLNParse/libSLNParse.so] Error 1
> make[1]: *** [Code/GraphMol/SLNParse/CMakeFiles/SLNParse.dir/all] Error 2
> make: *** [all] Error 2
>
>
> I've taken the standard steps of building Python (v2.7) with the -fPIC flag.
> Specficially, I attached CFLAGS=-fPIC to configure in the Python build. This
> solved the first instance of this type of error occuring at about 3%.
>
> I've also tried the two fixes for Boost with the following command line to
> build RDKit:
>
> cmake -DBOOST_ROOT=/usr/local -DBoost_USE_STATIC_LIBS=OFF ..
>
>
> I still get this error, and I notice that the Boost libraries that are being
> referred to are actually the system installation in usr/lib64 and not those
> that I've build in /usr/local/lib. It would seem that I can't seem to force
> make to look in the right location.
>
> Any tips are greatly apprciated.
>
> -Kirk
>
>
>
> ------------------------------------------------------------------------------
> Centralized Desktop Delivery: Dell and VMware Reference Architecture
> Simplifying enterprise desktop deployment and management using
> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
> client virtualization framework. Read more!
> http://p.sf.net/sfu/dell-eql-dev2dev_______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Peter Schmidtke
-----------------
PhD Student
Department of Physical Chemistry
School of Pharmacy
University of Barcelona
Barcelona, Spain
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss