Why not use some "standard" python version for bin

My powerbook is old now: PowerBook G4 12" with 768M memory and 1GHz PPC CPU. I’m outside CERN and cannot access the AFS inside CERN. I just want to use the “standard” binary release without a long-time compiling. I download the latest binary release (5.18.00) for MacOS 10.4 PPC, and found the configuration using Python is something like this:

--with-python-incdir=/afs/cern.ch/sw/lcg/external/Python/2.4.2/osx104_ppc_gcc401/include/python2.4
--with-python-libdir=/afs/cern.ch/sw/lcg/external/Python/2.4.2/osx104_ppc_gcc401/lib

While I tried to use my python 2.4.4 installed from MacPorts to invoke the ROOT module, I got the follow error:

Temp>$ python2.4 
Python 2.4.4 (#1, Nov  7 2007, 10:25:14) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ROOT import *
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/Users/exaos/Utilities/ROOT/Versions/Current/lib/ROOT.py", line 88, in ?
    import libPyROOT as _root
ImportError: Inappropriate file type for dynamic loading
>>> 

Yes, I know what’s the problem is as we have discussed year ago, such as the “dlopen” problem (root.cern.ch/phpBB2/viewtopic.php?t=4570) etc. I’m wondering why not use a de facto “standard” python version inside MacOS X to release the binary packages? If the default 2.3.5 of MacOS X Tiger is not fully featured for ROOT 5.18.00, why not use ActivePython 2.4.4 or 2.5.1 as the “standard” test platform? Because for somebody like me, I cannot access the AFS inside CERN and I don’t want to spend long time to compile everything from the sources. At least, the recommended Python binary package (somewhat default version for Tiger or ActivePython binary versions) should be listed along with the binary release.

I love both ROOT and python. Using PyRoot is really charming for my work. Just hope the official binary releases can be more convenient. :slight_smile:

Hi,

the problem you have here is different than the one that was under http://root.cern.ch/phpBB2/viewtopic.php?t=4570 as referenced, so …

You get the “Inappropriate file type for dynamic loading” message b/c Apple changed the behavior of dynamic libraries for 10.4. Since p2.4 came out earlier than MacOS10.4, the out-of-the-box makefile does not take care of the difference, and the provider of the python binary needs to explicitly set:

$ export DYNLOADFILE=dynload_shlib.o when building. Apparently, few do.

Of course, since it is a problem with the binary build of python that is used, all extension libraries will be affected by it, not just PyROOT, and sending in a bug report to your favorite binary provider may help.

Note that that also means that recompiling ROOT on your local system will not make a difference. It is python that needs to be recompiled.

As for recommendations … I don’t know if ActivePython is any better, or if there is any binary python for 10.4 out there that is actually properly build. The native version of python isn’t used simply b/c the CERN experiments have a fixed version and that is chosen. Soon, they’ll move to p2.5, and I expect 5.18 to be provided for that. P2.5 is post 10.4 and should build correctly out-of-the-box, so I presume that 3rd party binary builds will be ok from there on.

Cheers,
Wim