Hi All...

For reasons which are not important here, I have to compile ceph clients in SL6/Centos6. In a previous thread, I have posted instructions on how to do that for an Infernalis release. The instructions for Jewel 10.2.1 follow. Maybe someone else may profit from those since Centos6 releases are no longer provided.

Please note that, as requirements, gcc > 4.7 and python 2.7 have to be available in the machine (you can compile and install those in alternative locations, or simply use a software collection).


1./ The tarball available at ceph download site and the source tarball distributed with the srpm are different in size. I have used the source tarball distributed with the srpm

2./ Set the environment:

   $ export
   
LD_LIBRARY_PATH=/usr/local/sw/sl6/x86_64/gcc/4.8.4/lib:/usr/local/sw/sl6/x86_64/gcc/4.8.4/lib64:$LD_LIBRARY_PATH
   $ export CC=/usr/local/sw/sl6/x86_64/gcc/4.8.4/bin/gcc
   $ export PATH=/usr/local/sw/sl6/x86_64/gcc/4.8.4/bin:$PATH
   $ export CPATH=/usr/local/sw/sl6/x86_64/gcc/4.8.4/include:$CPATH
   $ cat /etc/ld.so.conf.d/gcc-4.8.4.el6.x86_64.conf
   /usr/local/sw/sl6/x86_64/gcc/4.8.4/lib64
   /usr/local/sw/sl6/x86_64/gcc/4.8.4/lib

   $ export
   PYTHONPATH=/usr/local/sw/sl6/gcc484/x86_64/python/2.7.6:$PYTHONPATH
   $ export
   
LD_LIBRARY_PATH=/usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/lib:$LD_LIBRARY_PATH
   $ export PATH=/usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/bin:$PATH
   $ export
   CPATH=/usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/include/:$CPATH
   $ cat /etc/ld.so.conf.d/python-2.7.6.el6.x86_64.conf
   /usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/lib/

   Note that we will have to make the following symbolic link since
   most configuration tools rely on commands such as'python-config
   –ldflags|–cflags|…' to set the proper configurations paths for
   compiling python bindings.

   $ ln -s
   /usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/bin/python2.7-config
   /usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/bin/python-config


3./ Download and install a more recent kernel, kernel-headers and kernel-devel and use it in the compilation node (some tools use definitions only provided by a most recent kernel-header). In our case, we have used the kernels available in http://elrepo.org/linux/kernel/el6/x86_64/RPMS/ (3.10.101-1.el6.elrepo.x86_64)

   $ rpm -qa | grep kernel
   kernel-lt-headers-3.10.101-1.el6.elrepo.x86_64
   kernel-lt-devel-3.10.101-1.el6.elrepo.x86_64
   dracut-kernel-004-388.el6.noarch
   kernel-lt-3.10.101-1.el6.elrepo.x86_64


4./ Install and start a virtualenv with python 2.7 (from your SL6/Centos6 repos)

   $ yum install virtual-env

   $ virtualenv -p
   /usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/bin/python2.7
   --system-site-packages python27
   Running virtualenv with interpreter
   /usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/bin/python2.7
   New python executable in python27/bin/python2.7
   Also creating executable in python27/bin/python
   Installing
   
Setuptools........................................................................done.
   Installing
   
Pip...............................................................................done.

   $ source python27/bin/activate
   (python27)#
   (python27)# which python-config
   /usr/local/sw/sl6/gcc484/x86_64/python/2.7.6/bin/python-config

5./ Install some python packages needed during ceph 10.2.1 compilation

   (python27)# pip install Cython
   (python27)# pip install nose
   (python27)# pip install requests
   (python27)# pip install sphinx


6./ Install the following software (from your SL6/Centos6 repos)

   (python27)$ wget
   
http://mirror.centos.org/centos/6/os/x86_64/Packages/snappy-devel-1.1.0-1.el6.x86_64.rpm
   (SL6 does not provide this package)
   (python27)$ yum localinstall snappy-devel-1.1.0-1.el6.x86_64.rpm
   (python27)$ yum install junit4 fcgi-devel expat-devel
   libbabeltrace-devel lttng-ust-devel gperftools-devel
   libatomic_ops-devel keyutils-libs-devel nss-devel bzip2-devel yasm
   xmlstarlet xfsprogs-devel snappy-devel libudev-devel libblkid-devel
   libxml2-devel libedit-devel libcurl-devel libaio-devel leveldb-devel
   fuse-devel cmake sharutils java-devel libselinux-devel
   selinux-policy-doc openldap-devel openssl-devel


7./ Ceph requires boost-random which is impossible to satisfy since it does not exist in Centos6/SL6. I've downloaded the SRPM from Centos 7 and rebuild it. Please note that my first rebuild fails with problems producing the debug repo. To solve it, I modified the rpm spec to include the following line at the beginning: '%define debug_package %{nil}'. This instruction will bypass the debuginfo rpm creation.

   (python27)$ wget
   
http://vault.centos.org/7.1.1503/os/Source/SPackages/boost-1.53.0-23.el7.src.rpm
   (python27)$ yum install mpich-devel openmpi-devel chrpath libicu-devel
   (python27)$ rpmbuild --rebuild boost-1.53.0-23.el7.src.rpm
   (python27)$ yum remove 'boost*'
   (python27)$ cd /root/rpmbuild/RPMS/x86_64/
   (python27)$ rpm -ivh --nodeps *

8./ It is now possible to properly compile Ceph 10.2.1

   (python27)$ mkdir -p /usr/local/sw/sl6/gcc484/x86_64/ceph/10.2.1
   (python27)$ tar xzvf ceph-10.2.1.tar.gz
   (python27)$ cd ceph-10.2.1
   (python27)$ ./configure --without-selinux
   --prefix=/usr/local/sw/sl6/gcc484/x86_64/ceph/10.2.1
   (python27)$ make
   (python27)$ make install


Cheers
G.


-- Goncalo Borges Research Computing ARC Centre of Excellence for Particle Physics at the Terascale School of Physics A28 | University of Sydney, NSW 2006 T: +61 2 93511937
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to