Re: Partial success- cross-compiling 32-bit ROOT on 64-bit Linux

From: Fons Rademakers <Fons.Rademakers_at_cern.ch>
Date: Thu, 5 Feb 2009 22:23:56 +0100


Hi Konstantin,

  thanks for the information. Most issues are beyond ROOT's control and are more tips to other users on how to prepare a system for cross-compilation. In principle the wrongly picking up of 64-bit gfortran libs should have been fixed in the trunk.

I will try to host this information on our new ROOT web site that we are building.

Cheers, Fons.

Konstantin Olchanski wrote:
> Hi, roottalk! I want to report partial success cross-compiling 32-bit ROOT
> on regular 64-bit Linux. Doing this on Scientific Linux 4.7 and 5.2. The
> reason for cross-compiling is that all our remaining 32-bit
> machines are slow and do not have much memory.
>
> SL47: success, but 2 problems:
> configure does not find 32-bit mysql libraries (SL do not put them in /usr/lib)
> configure does not find 32-bit libxml2 libraries because libxml2-devel.i386
> is not installed, and cannot be installed because /usr/bin/xml2-config
> conflicts between 32-bit and 64-bit RPMs. Worked around this by
> login as root and "ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so"
>
> SL52: success, but 2 problem:
> configure does not find 32-bit mysql libraries (SL do not put them in /usr/lib)
> build picks up 64-bit gfortran libraries and fails. From the errors it was
> not immediately obvious that the 32-bit libgfortran library was missing.
> "yum install libgfortran.i386" fixed that.
>
> note 1: default install was missing libXpm-devel.i386 and some other 32-bit devel RPMs
> note 2: the libxml2-devel problem did not show up because they fixed the conflict
> and both 32-bit and 64-bit packages were already installed.
>
> This is how I cross-compile:
>
> svn checkout https://.... root_v5.22.00_SL52_32
> cd root_v5.22.00_SL52_32
> setarch i386 ../build.sh
>
> The build script is attached: (note: it has a lot of historical baggage)
>
> #!/bin/sh
>
> export ROOTSYS=$PWD
> echo ROOTSYS=$ROOTSYS
>
> OPTCERN="--enable-cern --with-cern-libdir=/triumfcs/linux/cern/i386_redhat90/2003/lib"
> OPTDCAP32="--enable-dcache --with-dcap-incdir=/triumfcs/linux/dcache-client/dcache_1.7.0-39_i386/dcap/include --with-dcap-libdir=/triumfcs/linux/dcache-client/dcache_1.7.0-39_i386/dcap/lib"
> OPTDCAP64="--enable-dcache --with-dcap-incdir=/triumfcs/linux/dcache-client/dcache_1.7.0-39_x86_64/dcap/include --with-dcap-libdir=/triumfcs/linux/dcache-client/dcache_1.7.0-39_x86_64/dcap/lib"
> OPT32="$OPTCERN $OPTDCAP32"
> OPT64="$OPTDCAP64"
> case `uname -m` in
> x86_64)
> OPT=$OPT64
> ;;
> *)
> OPT="linux $OPT32"
> ;;
> esac
> CONFIGURE="./configure $OPT --enable-minuit2 --enable-mysql --enable-pgsql --enable-rpath"
> echo $CONFIGURE
> $CONFIGURE
> make clean
> make distclean
> find . -name '*.a' -exec /bin/rm -vf {} \;
> find . -name '*.so' -exec /bin/rm -vf {} \;
> find . -name '*.so.*' -exec /bin/rm -vf {} \;
> make -j3 OPTFLAGS="-O2 -g"
> make static OPTFLAGS="-O2 -g"
> make cintdlls OPTFLAGS="-O2 -g"
> make install OPTFLAGS="-O2 -g"
> make redhat OPTFLAGS="-O2 -g"
>
> #end
>

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers_at_cern.ch              Phone: +41 22 7679248
WWW:    http://fons.rademakers.org           Fax:   +41 22 7669640
Received on Thu Feb 05 2009 - 22:24:06 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 06 2009 - 05:50:02 CET