Re: Aclic : option for compilation in 32 bits

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Mon, 2 Aug 2010 21:30:48 +0200


thanks Philippe and Axel,

by using a root version 32 bits, as you say, it fixes the problem (there is other problems on the computer that has the version 32 bits of root, but i will try to fix it)

by the way, on the root 64 bits (which is root 5.26/00b) when i did, as suggested by Philippe :

TString cmd = gSystem->GetMakeSharedLib(); cmd.ReplaceAll("-m64","-m32");
gSystem->SetMakeSharedLib(cmd);

i got a problem at the compilation with libCint, even with the "SetMakeSharedLib function" :

==>
/afs/in2p3.fr/system/amd64_sl5/usr/local/root/root_v5.26.00b-gcc3.4/root/lib/libCint.so: could not read symbols: File in wrong format

example :
root [0] .x CreateDictionnary.C
(cout) before ReplaceAll : cmd=cd $BuildDir ; g++ -c $Opt -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFiles -shared -Wl,-soname,$LibName.so -m64 -O2 $LinkedLibs -o $SharedLib
(cout)after ReplaceAll : cmd=cd $BuildDir ; g++ -c $Opt -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFiles -shared -Wl,-soname,$LibName.so -m32 -O2 $LinkedLibs -o $SharedLib
Info in <TUnixSystem::ACLiC>: creating shared library /afs/in2p3.fr/home/e/escalier/public/DiPhotons/4DMatrix/WithSelector/./ComputeCategories_2Steps_C.so /afs/in2p3.fr/system/amd64_sl5/usr/local/root/root_v5.26.00b-gcc3.4/root/lib/libCint.so: could not read symbols: File in wrong format collect2: ld returned 1 exit status
Error in <ACLiC>: Compilation failed!
Error in <TSelector::GetSelector>: file ComputeCategories_2Steps.C+ does not have a valid class deriving from TSelector

thanks



On Mon, 2 Aug 2010, Philippe Canal wrote:

> Hi Marc,

>

> With a recent version of ROOT, the following should work:
>

> TString cmd = gSystem->GetMakeSharedLib();
> cmd.ReplaceAll("-m64","-m32");
> gSystem->SetMakeSharedLib();
>

> Cheers,
> Philippe.
>

> PS. Of course the simpliest and cleanest solution is to use a 32bits ROOT
> to do the compilation.
>

> On 8/2/10 10:58 AM, Marc Escalier wrote:
>> Hello,
>> 
>> i use a program in compiled mode which needs to be in 32 bits. This 
>> programs need a shared object of a program, that is created "at hand" by 
>> doing :
>> root
>> ...
>> //create a TChain
>> ...
>> return mychain_data->Process("myselector.C+");
>> 
>> ==>it creates myselector_C.so
>> 
>> but when i compile the main project in 32 bits with -m32 (mandatory because 
>> of some packages only available in 32 bits)
>> and use in the compilation the so-called myselector_C.so, i occur the 
>> following problem at link :
>> 
>> bin/myselector_C.so: could not read symbols: File in wrong format
>> 
>> from google, it would mean an imcompatibility of architecture (typically 32 
>> bits versus 64 bits)
>> 
>> would you have an idea ?
>> 
>> thanks
>> (unfortunately here, i don't have a minimal program to reproduce the 
>> problem, but i could try if necessary)
>> 
>
Received on Mon Aug 02 2010 - 21:31:04 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 02 2010 - 23:50:01 CEST