Installation trouble on Solaris 2.6
Hi all, I'm trying to install Zope from source on a Solaris 2.6 system, and I'm running into problems. When I try "./start", I get the following error: $ ./start $ Traceback (innermost last): File "/opt2/local/zope/Zope-2.1.4-src/z2.py", line 436, in ? exec "import "+MODULE in {} File "<string>", line 1, in ? File "/opt2/local/zope/Zope-2.1.4-src/lib/python/Zope/__init__.py", line 94, in ? import ZODB, ZODB.ZApplication, imp File "/opt2/local/zope/Zope-2.1.4-src/lib/python/ZODB/__init__.py", line 85, in ? import sys, ExtensionClass, TimeStamp, cPersistence, Persistence ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file /opt2/local/zope/Zope-2.1.4-src/lib/python/ExtensionClass.so: symbol PyImport_ImportModule: referenced symbol not found I am new to Python, so it's less than obvious to me what is going on here. It looks like the ExtensionClass module is failing to import, but I have no idea how to go about fixing this. [Yes, I know about the precompiled Solaris 2.6 binary. However, I eventually will need to get this running on a Solaris 2.5.1 system. Also, as far as I can tell, the binary release is not set up for Apache integration, which is something I also need to do.] Thanks in advance, Zach Frey
Zach Frey wrote:
Hi all,
I'm trying to install Zope from source on a Solaris 2.6 system, and I'm running into problems.
When I try "./start", I get the following error:
$ ./start $ Traceback (innermost last): File "/opt2/local/zope/Zope-2.1.4-src/z2.py", line 436, in ? exec "import "+MODULE in {} File "<string>", line 1, in ? File "/opt2/local/zope/Zope-2.1.4-src/lib/python/Zope/__init__.py", line 94, in ? import ZODB, ZODB.ZApplication, imp File "/opt2/local/zope/Zope-2.1.4-src/lib/python/ZODB/__init__.py", line 85, in ? import sys, ExtensionClass, TimeStamp, cPersistence, Persistence ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file /opt2/local/zope/Zope-2.1.4-src/lib/python/ExtensionClass.so: symbol PyImport_ImportModule: referenced symbol not found
It looks like your dynamic linker cannot find your python libraries. There is an environment variable that you must set so that the linker can find any libraries needed by shared library modules like ExtensionClass.so. I believe the env variable beings with LD_. Do an 'env' (in bash at least) and look for something like that. I never remeber it cuz in Linux you just edit a file.
I am new to Python, so it's less than obvious to me what is going on here. It looks like the ExtensionClass module is failing to import, but I have no idea how to go about fixing this.
[Yes, I know about the precompiled Solaris 2.6 binary. However, I eventually will need to get this running on a Solaris 2.5.1 system. Also, as far as I can tell, the binary release is not set up for Apache integration, which is something I also need to do.]
The binary will work fine with PCGI (Apache integration). Whether it runs on 2.5.x I don't know. -Michel
On Fri, 03 Mar 2000 14:25:19 -0800 michel@digicool.com (Michel Pelletier) wrote:
Zach Frey wrote:
Hi all,
I'm trying to install Zope from source on a Solaris 2.6 system, and I'm running into problems.
It looks like your dynamic linker cannot find your python libraries. There is an environment variable that you must set so that the linker can find any libraries needed by shared library modules like ExtensionClass.so. I believe the env variable beings with LD_. Do an 'env' (in bash at least) and look for something like that. I never remeber it cuz in Linux you just edit a file.
Sorry, coming in late here. The Env variable you need is LD_LIBRARY_PATH. Mine is set to LD_LIBRARY_PATH=/usr/local/lib/:/usr/lib:/usr/local/ssl/lib:/usr/local/lib/mys ql (I know this 'cos I did a new Zope install the other day on an account that only had LD_LIBRARY_PATH=/usr/local/lib/:/usr/lib:/usr/local/ssl/lib I started the Zope server under that account and found a broken MySQL product, with an error message saying it couldn't load libmysqlclient.so.6. I had cold chills going down my back for a looong few minutes....shudder) HTH Tone
Sorry, coming in late here. The Env variable you need is LD_LIBRARY_PATH. Mine is set to
LD_LIBRARY_PATH=/usr/local/lib/:/usr/lib:/usr/local/ssl/lib:/usr/local/lib/m ysql Thanks, Tony and Michel. Unfortunately, LD_LIBRARY_PATH doesn't seem to solve it, which is really puzzling. The gory details are: My base Zope installation is /usr/local/zope/Zope-2.1.4-src. So, ExtensionClass.so is in /usr/local/zope/Zope-2.1.4-src/lib/python. My LD_LIBRARY_PATH is /usr/local/zope/Zope-2.1.4-src/lib/python:/usr/local/lib:/usr/openwin/lib, which ought to pick up ExtensionClass.so. Anything else which would cause the import to fail? I tried setting PYTHONPATH too, in desperation, but it doesn't seem to make any difference. Thanks, Zach Frey P.S.: I did try the binary distribution on Solaris 2.5.1, and can report that it doesn't work. Zope fails to start up with an unresolved symbol error, so it really does require 2.6+.
On Fri, 3 Mar 2000 20:29:17 -0500 zfrey@bright.net (Zach Frey) wrote:
Sorry, coming in late here. The Env variable you need is LD_LIBRARY_PATH. Mine is set to
LD_LIBRARY_PATH=/usr/local/lib/:/usr/lib:/usr/local/ssl/lib:/usr/local/lib/m ysql
My base Zope installation is /usr/local/zope/Zope-2.1.4-src. So, ExtensionClass.so is in /usr/local/zope/Zope-2.1.4-src/lib/python. My LD_LIBRARY_PATH is /usr/local/zope/Zope-2.1.4-src/lib/python:/usr/local/lib:/usr/openwin/lib, which ought to pick up ExtensionClass.so.
I didn't find it necessary to include the source distribution path in the LD_LIBRARY_PATH env variable...
Anything else which would cause the import to fail? I tried setting PYTHONPATH too, in desperation, but it doesn't seem to make any difference.
PYTHONPATH is used for telling Python where modules are. I don't think it will help in this circumstance.
P.S.: I did try the binary distribution on Solaris 2.5.1, and can report that it doesn't work. Zope fails to start up with an unresolved symbol error, so it really does require 2.6+.
Ok, so you can't use the Zope distn that has a precompiled Python bundled (it seems). Try setting LD_LIBRARY_PATH as above and recompiling your Python source distribution. I know I had a real pain getting Zope-src distns running under Solaris (and then found that our big expensive Sun Iron was half the speed - in pystones - of my iMac! ...grrr) - but it can be done. HTH? Tone
I'm not sure if you considered this, but note that LD_LIBRARY_PATH needs to point to *Python's* libraries, not Zopes. It's not python that can't find ExtensionClass.so, it's ExtensionClass.so that can't find the standard Python library module. Your message sort of implies that you were ensuring that ExtensionClass.so was in the library path, but the problem (I think) is that the Python libs are not in your path. I could be wrong and this could be an entirely unrelated issue. Can you run python normally? Import stuff like cPickle? -Michel Zach Frey wrote:
Sorry, coming in late here. The Env variable you need is LD_LIBRARY_PATH. Mine is set to
LD_LIBRARY_PATH=/usr/local/lib/:/usr/lib:/usr/local/ssl/lib:/usr/local/lib/m ysql
Thanks, Tony and Michel. Unfortunately, LD_LIBRARY_PATH doesn't seem to solve it, which is really puzzling.
The gory details are:
My base Zope installation is /usr/local/zope/Zope-2.1.4-src. So, ExtensionClass.so is in /usr/local/zope/Zope-2.1.4-src/lib/python. My LD_LIBRARY_PATH is /usr/local/zope/Zope-2.1.4-src/lib/python:/usr/local/lib:/usr/openwin/lib, which ought to pick up ExtensionClass.so.
Anything else which would cause the import to fail? I tried setting PYTHONPATH too, in desperation, but it doesn't seem to make any difference.
Thanks,
Zach Frey
P.S.: I did try the binary distribution on Solaris 2.5.1, and can report that it doesn't work. Zope fails to start up with an unresolved symbol error, so it really does require 2.6+.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Michel Pelletier wrote:
I'm not sure if you considered this, but note that LD_LIBRARY_PATH needs to point to *Python's* libraries, not Zopes. It's not python that can't find ExtensionClass.so, it's ExtensionClass.so that can't find the standard Python library module.
Your message sort of implies that you were ensuring that ExtensionClass.so was in the library path, but the problem (I think) is that the Python libs are not in your path.
I could be wrong and this could be an entirely unrelated issue. Can you run python normally? Import stuff like cPickle?
No, you're not wrong; I did have this problem. Adding /usr/local/lib/python1.5/lib-dynload to LD_LIBRARY_PATH makes everything behave much more sanely. :^) I wasn't able to import standard python modules (like socket) before, now I can. And yes, this was a problem with my basic python installation, but since I'm only using Python to run Zope, I hadn't noticed. Unfortunately, this doesn't make things better. :^( When I run the 'start' script, I still get the same error: $ Traceback (innermost last): File "/opt2/local/zope/Zope-2.1.4-src/z2.py", line 436, in ? exec "import "+MODULE in {} File "<string>", line 1, in ? File "/opt2/local/zope/Zope-2.1.4-src/lib/python/Zope/__init__.py", line 94, in ? import ZODB, ZODB.ZApplication, imp File "/opt2/local/zope/Zope-2.1.4-src/lib/python/ZODB/__init__.py", line 85, in ? import sys, ExtensionClass, TimeStamp, cPersistence, Persistence ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file /opt2/local/zope/Zope-2.1.4-src/lib/python/ExtensionClass.so: symbol PyImport_ImportModule: referenced symbol not found Here's the part I don't understand. I started stepping through z2.py (isn't open source wonderful?!), and trying the import commands one by one in a normal Python interpreter. They all succeed, including the one on line 436 which resolves to "import Zope". Yet it doesn't work from within the 'start' script. Oh well. I just verified that I can set up Apache+FastCGI+Zope on my Solaris2.6 box just fine with the binary distribution. Am I correct that I should be able to set up FastCGI using a TCP socket that isn't localhost, and therefore be able to run Apache on our 2.5.1 box and Zope on a 2.6 box? This would let me get started using Zope while I figure out how to install from source at a little more leisure. Thanks for all your help, Zach Frey
I'm trying this on SunOS 5.5.1, and am getting more less the same results. See my other article [Problems Installing Zope]... I have tried adding both the python dynload directory, and even the Zope/lib/python directory to LD_LIBRARY_PATH, both of which are no help. The error I get is a little different: File "/new1/misc/Zope-2.1.3-src/lib/python/ZODB/__init__.py", line 85, in ? import sys, ExtensionClass, TimeStamp, cPersistence, Persistence ImportError: No module named ExtensionClass. As mention somewhere in this thread, this all stems from line 436 in z2.py :) Any ideas? Michel Pelletier wrote:
I'm not sure if you considered this, but note that LD_LIBRARY_PATH needs to point to *Python's* libraries, not Zopes. It's not python that can't find ExtensionClass.so, it's ExtensionClass.so that can't find the standard Python library module.
Your message sort of implies that you were ensuring that ExtensionClass.so was in the library path, but the problem (I think) is that the Python libs are not in your path.
I could be wrong and this could be an entirely unrelated issue. Can you run python normally? Import stuff like cPickle?
-Michel
Zach Frey wrote:
Sorry, coming in late here. The Env variable you need is LD_LIBRARY_PATH. Mine is set to
LD_LIBRARY_PATH=/usr/local/lib/:/usr/lib:/usr/local/ssl/lib:/usr/local/lib/m ysql
Thanks, Tony and Michel. Unfortunately, LD_LIBRARY_PATH doesn't seem to solve it, which is really puzzling.
-- Steve.
participants (5)
-
Michel Pelletier -
Steven Purchase -
tony mcdonald -
Zach Frey -
Zach Frey