Re: pyROOT on Mac OS X Snow Leopard

From: federico roncarolo <federico.roncarolo_at_cern.ch>
Date: Fri, 30 Oct 2009 14:27:59 +0100


Hi again,

I re-compiled ROOT in 64-bit (I needed to disable 'xrootd'), and now python goes further in importing ROOT but I get the following error:

ImportError                               Traceback (most recent call  
last)

/Users/froncaro/<ipython console> in <module>()

/root/lib/root/ROOT.py in <module>()

      84 sys.setdlopenflags( 0x100 | 0x2 ) # RTLD_GLOBAL | RTLD_NOW
      85
---> 86 import libPyROOT as _root

      87
      88 # reset dl flags if needed

ImportError: dlopen(/root/lib/root/libPyROOT.so, 2): Symbol not found: _FT_Done_Face

   Referenced from: /root//lib/root/libGraf.so    Expected in: flat namespace
  in /root//lib/root/libGraf.so

Indeed, the which python gives me:

/usr/bin/python: Mach-O universal binary with 3 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64

/usr/bin/python (for architecture i386):	Mach-O executable i386
/usr/bin/python (for architecture ppc7400):	Mach-O executable ppc

What can i do?

thanks,
Federico

On Oct 30, 2009, at 10:15 AM, Fons Rademakers wrote:

> Python (as well as ruby and perl) come on Snow Leopard as a three-
> way universal binary. If you configure ROOT without options you will
> get a 64-bit version of ROOT (target macosx64). If you configure
> explicitly with target macosx you will get a 32-bit version. PyROOT
> should work out of the box with python 64-bit and ROOT 64-bit.
>
> On Leopard python (and ruby and perl) come as two-way binary,
> missing the x86-64 version. To still to be able to run ROOT 64-bit
> in python we shipped ROOT with our own 64-bit python: $ROOTSYS/bin/
> python64. Use that one.
>
> Cheers, Fons.
>
>
>
> Dave Newbold wrote:
>> Hi,
>> I have 10.6.1, and he say:
>> higgs-phy-bris-ac-uk:~ phdmn$ file `which python`
>> /usr/bin/python: Mach-O universal binary with 3 architectures
>> /usr/bin/python (for architecture x86_64): Mach-O 64-bit
>> executable x86_64
>> /usr/bin/python (for architecture i386): Mach-O executable i386
>> /usr/bin/python (for architecture ppc7400): Mach-O executable ppc
>> Dave
>> James Jackson wrote:
>>> Hi,
>>>
>>> ROOT will have been built for 64 bit architecture, I bet. On my
>>> machine, I have the following:
>>>
>>> Unknown-00-21-e9-e2-86-6e:~ jamesjackson$ file `which root`
>>> /usr/local/bin/root: Mach-O 64-bit executable x86_64
>>>
>>> Unknown-00-21-e9-e2-86-6e:~ jamesjackson$ file `which python`
>>> /usr/bin/python: Mach-O universal binary with 2 architectures
>>> /usr/bin/python (for architecture ppc7400): Mach-O executable ppc
>>> /usr/bin/python (for architecture i386): Mach-O executable i386
>>>
>>> One could possibly force ROOT to build for 32 bit, or re-build
>>> python for 64 bit. I suspect the former is easier...
>>>
>>> Regards,
>>> James.
>>>
>>> On 30 Oct 2009, at 08:33, federico roncarolo wrote:
>>>
>>>> Hello,
>>>>
>>>> I just installed Mac OS X 10.6 (Snow Leopard), python 2.6, gcc
>>>> 4.2.1, and compiled ROOT 5.25/02 with architecture = macosx.
>>>>
>>>> Exactely as in the post:
>>>>
>>>> <http://root.cern.ch/phpBB2/viewtopic.php?p=39830&sid=7516d970f76e5ebde824f5a0a11dca03
>>>> >
>>>>
>>>> when importing ROOT from python I get:
>>>>
>>>> [imac]:-) > python
>>>> Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
>>>> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
>>>> Type "help", "copyright", "credits" or "license" for more
>>>> information.
>>>> >>> import ROOT
>>>> Traceback (most recent call last):
>>>> File "<stdin>", line 1, in <module>
>>>> File "lib/ROOT.py", line 86, in <module>
>>>> import libPyROOT as _root
>>>> ImportError: dlopen(/root/lib/root/libPyROOT.so, 2): no suitable
>>>> image found. Did find:
>>>> /root/lib/root/libPyROOT.so: mach-o, but wrong architecture
>>>>
>>>>
>>>> Is there a solution?
>>>> Should I compile another version of ROOT or of Python?
>>>>
>>>> Many thanks,
>>>> Federico
>>>>
>>>
>
> --
> 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 Fri Oct 30 2009 - 14:28:05 CET

This archive was generated by hypermail 2.2.0 : Fri Oct 30 2009 - 17:50:02 CET