Re: .L xyz.C+ with 32bit ROOT version on 64bit machine

From: Alexander Mann <amann_at_uni-goettingen.de>
Date: Wed, 28 Jul 2010 21:38:24 +0200

Hi Axel,

so do we conclude that the combition I tried (and that I have to use) cannot be made compatible?

cu,
Alexander

Am 28.07.2010 20:31, schrieb Axel Naumann:
> Hi,
>
> Sorry, correcting myself here: dialing the 64 bit compiler is of course just fine because it gets the -m32 flag passed!
>
> Cheers, Axel
>
> "Axel Naumann"<Axel.Naumann_at_cern.ch> wrote:
>
>> Hi,
>>
>> Alexander Mann wrote on 07/28/2010 05:33 PM:
>>> indeed, using the wrong g++ version caused this. Changing
>>>
>>> source /afs/cern.ch/sw/lcg/contrib/gcc/4.3/i686-slc5-gcc43-opt/setup.sh
>>>
>>> to
>>>
>>> source /afs/cern.ch/sw/lcg/contrib/gcc/4.3/x86_64-slc5-gcc43-opt/setup.sh
>>>
>>> fixes this issue.
>>
>> But then you use the 64bit version of the compiler, which generates
>> libraries incompatible with a 32bit root. You claimed to use a 32bit
>> root, so this cannot solve your problem. Instead either use your local
>> g++ (check that it works) or use GCC43 (i686-slc5) from AFS. If you
>> cannot build any binaries with either then your OS's toolchain (gcc,
>> binutils as ld) is not installed correctly.
>>
>> Cheers, Axel.
>>
>>> BUT instead I get another problem: In the end I want to use PyROOT, and
>>> when I source the x86_64 version I get an error in python when importing
>>> the ROOT module:
>>
>> This might be a consequence of setting up the wrong version (64 instead
>> of 32 bit) of GCC.
>>
>> Cheers, Axel.
>>
>>> Python 2.5.4 (r254:67916, Oct 8 2009, 11:42:02)
>>> [GCC 4.3.2] on linux2
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>> import ROOT
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in<module>
>>> File
>>> "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/lib/ROOT.py",
>>> line 86, in<module>
>>> import libPyROOT as _root
>>> ImportError: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
>>> (required by
>>> /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/lib/libPyROOT.so)
>>>
>>>
>>> Do you know how to solve both problems? Maybe it's not possible in
>>> principle.
>>>
>>> cu,
>>> Alexander
>>>
>>>
>>>
>>> Am 28.07.2010 17:09, schrieb Axel Naumann:
>>>> Hi Alexander,
>>>>
>>>> this looks like a broken installation of your toolchain. Can you try to
>>>> compile any C++ program with -m32 using your g++?
>>>>
>>>> Cheers, Axel.
>>>>
>>>> Alexander Mann wrote on 07/28/2010 02:15 PM:
>>>>>
>>>>> Hi Axel,
>>>>>
>>>>> I will send the full debug output to you in another mail in order not to
>>>>> spam the mailing list.
>>>>>
>>>>> You are right that indeed the -m32 option is used there. Maybe it's just
>>>>> the other way round, i.e. -m64 needs to be used here?
>>>>>
>>>>> .
>>>>> .
>>>>> .
>>>>> Info in<ACLiC>: cd "/net/ph2/auto/home/mann/Code/PyROOT/." ; g++ -c -O2
>>>>> -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -pthread
>>>>> -I$ROOTSYS/include
>>>>> -I"/afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/include"
>>>>>
>>>>> -I"/net/ph2/auto/home/mann/Code/PyROOT/."
>>>>> -I"/net/ph2/auto/home/mann/Code/PyROOT"
>>>>> "/net/ph2/auto/home/mann/Code/PyROOT/./Loader_C_ACLiC_dict.cxx" ; g++
>>>>> "/net/ph2/auto/home/mann/Code/PyROOT/./Loader_C_ACLiC_dict.o" -shared
>>>>> -Wl,-soname,Loader_C.so -m32 -O2
>>>>> /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/lib/libCint.so
>>>>>
>>>>> /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/lib/libCore.so
>>>>>
>>>>> /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/lib/libRint.so
>>>>>
>>>>> /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/lib/libMathCore.so
>>>>>
>>>>> -o "/net/ph2/auto/home/mann/Code/PyROOT/./Loader_C.so"
>>>>> {standard input}: Assembler messages:
>>>>> .
>>>>> .
>>>>> .
>>>>>
>>>>> cu,
>>>>> Alexander
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Am 28.07.2010 13:19, schrieb Axel Naumann:
>>>>>> Hi Alexander,
>>>>>>
>>>>>> Looking at
>>>>>> /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/include/compiledata.h
>>>>>>
>>>>>>
>>>>>> I see that -m32 is passed in all compiler invocations - I don't see how
>>>>>> it could fail. Can you run
>>>>>>
>>>>>> root [0] gDebug=7
>>>>>> root [1] .L Loader.C+
>>>>>>
>>>>>> and send the output? (I'll be a few pages...)
>>>>>>
>>>>>> Cheers, Axel.
>>>>>>
>>>>>> Alexander Mann wrote on 07/28/2010 01:05 PM:
>>>>>>>
>>>>>>> Hi Bertrand,
>>>>>>>
>>>>>>> good idea, but it did not help :(
>>>>>>>
>>>>>>> What I am doing is this:
>>>>>>>
>>>>>>> # setting up 32 bit ROOT 5.26.00b
>>>>>>> source
>>>>>>> /afs/cern.ch/sw/lcg/contrib/gcc/4.3/i686-slc5-gcc43-opt/setup.sh
>>>>>>> export
>>>>>>> ROOTSYS=/afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> export
>>>>>>> PATH=/afs/cern.ch/sw/lcg/external/Python/2.5.4p2/i686-slc5-gcc43-opt/bin:$ROOTSYS/bin:$PATH
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> export
>>>>>>> LD_LIBRARY_PATH=$ROOTSYS/lib:/afs/cern.ch/sw/lcg/external/Python/2.5.4p2/i686-slc5-gcc43-opt/lib:$LD_LIBRARY_PATH
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> export PYTHONPATH=$PYTHONPATH:$ROOTSYS/lib
>>>>>>>
>>>>>>>
>>>>>>> In ROOT:
>>>>>>>
>>>>>>> .L Loader.C+
>>>>>>>
>>>>>>>
>>>>>>> This is the contents of the file Loader.C:
>>>>>>>
>>>>>>> #include<vector>
>>>>>>> #ifdef __CINT__
>>>>>>> #pragma link C++ class vector<vector<float> >;
>>>>>>> #pragma link C++ class vector<vector<int> >;
>>>>>>> #pragma link C++ class pair<string,string>;
>>>>>>> #else
>>>>>>> template class std::vector<std::vector<float> >;
>>>>>>> template class std::vector<std::vector<int> >;
>>>>>>> #endif
>>>>>>>
>>>>>>>
>>>>>>> Gives these error messages:
>>>>>>>
>>>>>>> root [0] .L Loader.C+
>>>>>>> Info in<TUnixSystem::ACLiC>: creating shared library
>>>>>>> /net/ph2/auto/home/mann/Code/PyROOT/./Loader_C.so
>>>>>>> {standard input}: Assembler messages:
>>>>>>> {standard input}:11: Error: suffix or operands invalid for `push'
>>>>>>> {standard input}:16: Error: relocated field and relocation type differ
>>>>>>> in signedness
>>>>>>> {standard input}:19: Error: suffix or operands invalid for `pop'
>>>>>>> .
>>>>>>> .
>>>>>>> .
>>>>>>> {standard input}:26058: Error: relocated field and relocation type
>>>>>>> differ in signedness
>>>>>>> {standard input}:26077: Error: relocated field and relocation type
>>>>>>> differ in signedness
>>>>>>> {standard input}:26096: Error: relocated field and relocation type
>>>>>>> differ in signedness
>>>>>>> g++: /net/ph2/auto/home/mann/Code/PyROOT/./Loader_C_ACLiC_dict.o: No
>>>>>>> such file or directory
>>>>>>> Error in<ACLiC>: Compilation failed!
>>>>>>>
>>>>>>> cu,
>>>>>>> Alexander
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Am 28.07.2010 12:56, schrieb Bertrand Bellenot:
>>>>>>>> Hi Alexander,
>>>>>>>>
>>>>>>>> Maybe you could try to setup the compiler:
>>>>>>>>
>>>>>>>> From bash:
>>>>>>>> source /afs/cern.ch/sw/lcg/contrib/gcc/4.3/i686/setup.sh
>>>>>>>>
>>>>>>>> From tcshell:
>>>>>>>> source /afs/cern.ch/sw/lcg/contrib/gcc/4.3/i686/setup.csh
>>>>>>>>
>>>>>>>> Cheers, Bertrand.
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: owner-roottalk_at_root.cern.ch
>>>>>>>> [mailto:owner-roottalk_at_root.cern.ch]
>>>>>>>> On Behalf Of Alexander Mann
>>>>>>>> Sent: Wednesday, July 28, 2010 12:47
>>>>>>>> To: roottalk_at_root.cern.ch
>>>>>>>> Subject: [ROOT] .L xyz.C+ with 32bit ROOT version on 64bit machine
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I have a complicated problem. I need to use the 32 bit version of
>>>>>>>> ROOT
>>>>>>>> on a 64 bit machine. This seems to cause trouble when I try to
>>>>>>>> compile
>>>>>>>> macros in CINT with .L xyz.C+, I get lots of assembler errors,
>>>>>>>> probably
>>>>>>>> related to the 32/64 bit issue:
>>>>>>>>
>>>>>>>> {standard input}: Assembler messages:
>>>>>>>> {standard input}:11: Error: suffix or operands invalid for `push'
>>>>>>>> {standard input}:16: Error: relocated field and relocation type
>>>>>>>> differ
>>>>>>>> in signedness
>>>>>>>> ...
>>>>>>>>
>>>>>>>> Is there a way to pass a switch to the assembler that fixes this?
>>>>>>>>
>>>>>>>> I am using this root:
>>>>>>>> /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00b/i686-slc5-gcc43-opt/root/
>>>>>>>>
>>>>>>>>
>>>>>>>> bin/root
>>>>>>>>
>>>>>>>> on such a machine:
>>>>>>>> Linux 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64
>>>>>>>> x86_64 x86_64 GNU/Linux
>>>>>>>>
>>>>>>>> Any help is much appreciated!
>>>>>>>>
>>>>>>>> cu,
>>>>>>>> Alexander
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
Received on Wed Jul 28 2010 - 21:38:21 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 28 2010 - 23:50:02 CEST