As noted in README.solaris, there have been a number of issues with Perl on
Sun over the years.

It is our policy that ./configure should work out of the box.  In a variety
of cases it doesn't.  This is because our current default is to
automatically include embedded Perl modules.

I would like it put to a vote that we default to no Perl support whatsoever
for Solaris.

Here's my reasoning combined with a bit of history (open to dispute).

Many of my systems do not have a compiler (management decision).  Hence I
have to create binaries to install net-snmp.

Perl has become pretty much ubiquitous within the user community, if nothing
else for webpages and general Swiss-Army-Chainsawing (Perl joke).  

Sun has been deficient in shipping a reasonably-up-to-date Perl with Solaris
(along with a lot of other things - but let's not go there).  Unfortunately,
some of their internals required usage of pretty much this exact perl to
work properly (the kstat app comes to mind).  Hence most people (with a wink
and nod from sun) would generally install their own perl, either from
sunfreeware.com or rolling their own if they needed special functionality.
Hence it is almost impossible to guarantee what perl you might discover on a
system, how it works and what kind of shape it's in.  When rolling your own
perl, it asks a bazillion questions, some of which not all people are
qualified to answer correctly.  Also some people compile their perl with a
different compiler than they might use with net-snmp (eg. gcc vs. FORTE C).

Once a replacement/upgraded perl is in place, everybody wants to use it and
expects it to stay pretty much static.  They get really upset if modules
change, get upgraded or disappear.  Management tends not to look kindly on a
number of custom-built perl's on the same system.  

We have a problem within net-snmp related to computing swap resources that
makes use of a library deprecated with LARGEFILE support (which most Perl's
have compiled in).  See README.solaris for an exhaustive (and probably out
of date) explanation.

The problem is that net-snmp, when compiled with any sort of Perl support,
picks up compile options from Perl and attempts to use them.  If Perl has
LARGEFILE support, it tries and hits the sysctl bug.  There are issues
(mostly resolved??) with which version of ld to use.  

Now that can be somewhat resolved on the system you're building on by
diddling with perl.  My problem is that I'm deploying to other systems that
don't have that same Perl.

Be that as it may, the generic build-out-of-the-box remains broken.

Here's two examples:

1. This is one of my roll-your-own-perl specials on a Solaris 2.8 box with
OpenSSL and gcc.  

$ more configure-summary
  SNMP Versions Supported:    1 2c 3
  Net-SNMP Version:           5.4.pre4
  Building for:               solaris2
  Network transport support:  Callback Unix TCP UDP
  SNMPv3 Security Modules:     usm
  Agent MIB code:             default_modules =>  snmpv3mibs mibII ucd_snmp
notification notification-log-mib target agent_mibs agentx disman/event
disman/schedule utilities host
  Embedded Perl support:      disabled
  SNMP Perl modules:          building -- not embeddable
  SNMP Python modules:        disabled
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES

make eventually crashes with...

(big snip)
ranlib .libs/libnetsnmpagent.a
creating libnetsnmpagent.la
(cd .libs && rm -f libnetsnmpagent.la && ln -s ../libnetsnmpagent.la
libnetsnmpagent.la)
: libnetsnmpagent.la
/bin/sh ../libtool  --mode=compile gcc -I../include -I. -I../agent
-I../agent/mibgroup -I../snmplib -I/usr/local/ssl/include
-fno-strict-aliasing -I/usr/local/include
-I/usr/local/lib/perl5/5.8.0/sun4-solaris/CORE   -g -O2 -Usolaris2
-Dsolaris2=solaris2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings
-Wcast-qual-Wno-char-subscripts -c -o snmpd.lo snmpd.c
 gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib
-I/usr/local/ssl/include -fno-strict-aliasing -I/usr/local/include
-I/usr/local/lib/perl5/5.8.0/sun4-solaris/CORE -g -O2 -Usolaris2
-Dsolaris2=solaris2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings
-Wcast-qual -Wno-char-subscripts -c snmpd.c  -fPIC
-DPIC -o .libs/snmpd.o
snmpd.c: In function `main':
snmpd.c:948: warning: assignment discards qualifiers from pointer target
type gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib
-I/usr/local/ssl/include -fno-strict-aliasing -I/usr/local/include
-I/usr/local/lib/perl5/5.8.0/sun4-solaris/CORE -g -O2 -Usolaris2
-Dsolaris2=solaris2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings
-Wcast-qual -Wno-char-subscripts -c snmpd.c -o snmpd.o >/dev/null 2>&1
/bin/sh ../libtool  --mode=link gcc -g -O2 -Usolaris2 -Dsolaris2=solaris2
-Wall -Winline -Wstrict-prototypes -Wwrite-strings -Wcast-qual
-Wno-char-subscripts -o snmpd snmpd.lo   -L/usr/local/ssl/lib
libnetsnmpmibs.la libnetsnmpagent.la helpers/libnetsnmphelpers.la
../snmplib/libnetsnmp.la -ldl -lkvm -lcrypto -lkstat -lelf -lm  -lnsl
-lsocket -ladm -Wl,-E  -L/usr/local/lib -L/opt/local/lib /usr/
local/lib/perl5/5.8.0/sun4-solaris/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib/perl5/5.8.0/sun4-solaris/CORE -lperl -lsocket -lnsl -ldl
-lm -lcgcc -g -O2 -Usolaris2 -Dsolaris2=solaris2 -Wall -Winline
-Wstrict-prototypes -Wwrite-strings -Wcast-qual -Wno-char-subscripts -o
.libs/snmpd .libs/snmpd.o -Wl,-E  -L/usr/local/ssl/lib
./.libs/libnetsnmpmibs.so ./.libs/libnetsnmpagent.so
helpers/.libs/libnetsnmphelpers.so ../snmplib/.libs/libnetsnmp.so -lkvm
-lcrypto -lkstat -lelf -ladm -L/usr/local/lib -L/opt/local/lib
/usr/local/lib/perl5/5.8.0/sun4-solaris/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib/perl5/5.8.0/sun4-solaris/CORE -lperl -lsocket -lnsl -ldl
-lm -lc  -R/usr/local/lib /usr/ccs/bin/ld: illegal option -- E

Here's the perl spec.

$ perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris
    uname='sunos bar 5.8 generic_108528-12 sun4u sparc sunw,sun-fire-880 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=undef usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
    optimize='-O',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release)',
gccosandvers='solaris2.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E'
    cccdlflags='-fPIC', lddlflags=' -Wl,-E -G -L/usr/local/lib
-L/opt/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options:
  Built under solaris
  Compiled at Dec  6 2002 15:52:29
  @INC:
    /usr/local/lib/perl5/5.8.0/sun4-solaris
    /usr/local/lib/perl5/5.8.0
    /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.8.0
    /usr/local/lib/perl5/site_perl
    .

It switched ld's in mid-stream 'cause it picked them up from Perl.

2. Here's a development box.  I'm not allowed to touch the Perl on this one
(from sunfreeeware.com IIRC) 'cause everybody and their dog relies on it. 

Here's what a generic ./configure gives us (in this case Solaris 2.7, with
OpenSSL)

$ more configure-summary
  SNMP Versions Supported:    1 2c 3
  Net-SNMP Version:           5.4.pre4
  Building for:               solaris2
  Network transport support:  Callback Unix TCP UDP
  SNMPv3 Security Modules:     usm
  Agent MIB code:             default_modules =>  snmpv3mibs mibII ucd_snmp
noti
fication notification-log-mib target agent_mibs agentx disman/event
disman/sched
ule utilities host
  Embedded Perl support:      enabled
  SNMP Perl modules:          building -- embeddable
  SNMP Python modules:        disabled
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES 


When compiling 5.4 (CVS MAIN as of about an hour ago) using stock
./configure, make test fails on test 44, AgentX with Perl.


$ more agentx.log
Can't load '/usr/local/src/net-snmp/perl/blib/arch/auto/SNMP/SNMP.so' for
module
 SNMP: ld.so.1: /usr/bin/perl: fatal: relocation error: file
/usr/local/src/net-
snmp/perl/blib/arch/auto/SNMP/SNMP.so: symbol usmAESPrivProtocol: referenced
sym
bol not found at /usr/local/lib/perl5/5.8.5/sun4-solaris/DynaLoader.pm line
230.
 at /usr/local/src/net-snmp/perl/blib/lib/NetSNMP/OID.pm line 19
Compilation failed in require at
/usr/local/src/net-snmp/perl/blib/lib/NetSNMP/O
ID.pm line 19.
BEGIN failed--compilation aborted at
/usr/local/src/net-snmp/perl/blib/lib/NetSN
MP/OID.pm line 19.
Compilation failed in require at /tmp/snmp-test-44-20680/hello.pl line 5.
BEGIN failed--compilation aborted at /tmp/snmp-test-44-20680/hello.pl line
5.

$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos foo 5.7 generic_106541-32 sun4u sparc sunw,ultra-4 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=undef usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include',
    optimize='-O',
    cppflags='-fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release)',
gccosandvers='solaris.7'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E -R
/usr/local/lib/perl5/5.8.5/sun4-solaris/CORE'
    cccdlflags='-fPIC', lddlflags=' -Wl,-E -G -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options:
  Built under solaris
  Compiled at Aug  3 2004 14:49:37
  @INC:
    /usr/local/lib/perl5/5.8.5/sun4-solaris
    /usr/local/lib/perl5/5.8.5
    /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.8.5
    /usr/local/lib/perl5/site_perl
    .

Summary:

1.  We default to Perl support.
2.  Perl is odd at best and broken at worst on Solaris and we've got all
sorts of issues.

Conclusion:

We proposing are shipping broken-out-of-the-box software.  I call for a vote
to revert back to no Perl support by default.




-- 

This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take action
relying on it. Any communication received in error, or subsequent reply,
should be deleted or destroyed.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to