Executive summary: edit /usr/local/zenoss/lib/python/pynetsnmp/netsnmp.py as
detailed below. I think this would solve your problem.
I _think_ (not sure!) that If gcc uses solaris ld (not GNU ld) that the $(gcc
-Wl,-t -lnetsnmp) method of finding library file doesn't work.
I'm just nearly finished (I hope) a zenoss build on solaris 10 intel/amd and
have found some things are slightly different.
For solaris 10 sparc I use a gcc which uses GNU ld (yay!). (to check use gcc
-print-prog-name=ld, solaris ld is /usr/ccs/bin/ld). Also I don't know or want
to change ld paths config and have done a very horrible thing:
Code:
cp /usr/sfw/lib/libnetsnmp.so /usr/lib/
This is horrible. :( I'm sorry. :'(
I have libnetsnmp.so in /usr/sfw/lib/libnetsnmp.so via package SUNWsmagt.
$(/usr/sbin/pkgchk -l -p /usr/sfw/lib/libnetsnmp.so)
Adding /usr/sfw/lib to $LD_LIBRARY_PATH or crle doen't help.
For any solaris 10 boxes, sparc or intel/amd, if gcc doesn't use GNU ld I can't
figure out if gcc+solaris ld can be persuaded to find libs like this. I think
maybe not. So same problem as you report.
Code:
[EMAIL PROTECTED]: ~/zenoss-2.1.3 $ gcc -Wl,-t -lnetsnmp
Undefined first referenced
symbol in file
main
/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/crt1.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
So.
Hmmm.
The problem can be tackled where it occurs in python ctypes.util find_library.
(i.e. an even more horrible hack!)
Different versions of python implement find_library in different ways
(especially for solaris). You can hack the python find_library to force it do
do what you want or work with whatever method it is using.
Watch out, zenoss has python 2.4 inside itself and another python is probably
installed so make sure you're working with the correct python files.
Backup before start messing:
Code:
cp /usr/local/zenoss/lib/python/pynetsnmp/netsnmp.py
/usr/local/zenoss/lib/python/pynetsnmp/netsnmp-orig.py
cp /usr/local/zenoss/lib/python/ctypes/util.py
/usr/local/zenoss/lib/python/ctypes/util-orig.py
Code:
[EMAIL PROTECTED]: ~/zenoss-2.1.3 $ diff -u
/usr/local/zenoss/lib/python/pynetsnmp/netsnmp.py
/usr/local/zenoss/lib/python/pynetsnmp/netsnmp-orig.py
--- /usr/local/zenoss/lib/python/pynetsnmp/netsnmp.py Wed May 14 16:54:10 2008
+++ /usr/local/zenoss/lib/python/pynetsnmp/netsnmp-orig.py Wed May 14
16:47:25 2008
@@ -3,15 +3,12 @@
from ctypes.util import find_library
from CONSTANTS import *
-# freebsd cannot manage a decent find_library, uohhh. harsh. :)
-# solaris james hijack find_library
+# freebsd cannot manage a decent find_library
import sys
-if sys.platform.find('sunos') > -1:
+if sys.platform.find('free') > -1:
find_library_orig = find_library
def find_library(name):
for name in ['/usr/lib/lib%s.so' % name,
- '/usr/sfw/lib/lib%s.so' % name,
- '/opt/csw/lib/lib%s.so' % name,
'/usr/local/lib/lib%s.so' % name]:
if os.path.exists(name):
return name
Now I am a little further on.
I get a different install error. (yay, er, I think.)
zenoss 2.1.2 I think was happy with libnetsnmp 5.0.9.
Code:
~/zenoss-2.1.3 $ zenoss start
Daemon: zeoctl daemon process already running; pid=324
Daemon: zopectl daemon process already running; pid=424
Daemon: zenhub is already running
Daemon: zenping is already running
Daemon: zensyslog is already running
Daemon: zenstatus is already running
Daemon: zenactions is already running
Daemon: zentrap is already running
Daemon: zenmodeler starting...
Traceback (most recent call last):
File "/usr/local/zenoss/Products/DataCollector/zenmodeler.py", line 30, in ?
import SnmpClient
File "/usr/local/zenoss/Products/DataCollector/SnmpClient.py", line 21, in ?
from pynetsnmp.twistedsnmp import snmpprotocol, AgentProxy
File "usr/local/zenoss/lib/python/pynetsnmp/twistedsnmp.py", line 1, in ?
File "/usr/local/zenoss/lib/python/pynetsnmp/netsnmp.py", line 62, in ?
raise ImportError("netsnmp version 5.1 or greater is required")
ImportError: netsnmp version 5.1 or greater is required
Daemon: zenperfsnmp starting...
/usr/local/zenoss/Products/ZenRRD/SnmpDaemon.py:30: UserWarning: Using
python-based snmp engine
warnings.warn("Using python-based snmp engine")
Daemon: zencommand starting...
Daemon: zenprocess starting...
Traceback (most recent call last):
File "/usr/local/zenoss/Products/ZenRRD/zenprocess.py", line 33, in ?
from pynetsnmp.twistedsnmp import AgentProxy
File "usr/local/zenoss/lib/python/pynetsnmp/twistedsnmp.py", line 1, in ?
File "/usr/local/zenoss/lib/python/pynetsnmp/netsnmp.py", line 62, in ?
raise ImportError("netsnmp version 5.1 or greater is required")
ImportError: netsnmp version 5.1 or greater is required
Daemon: zenwin is already running
Daemon: zeneventlog is already running
Daemon: zenwinmodeler is already running
Code:
~/zenoss-2.1.3 $ /usr/sfw/sbin/snmpd -v
NET-SNMP version: 5.0.9
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=19869#19869
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users