(Moved to ntop-dev, where this type o' crud belongs)

First off, understand that I don't really worry about Solaris - yeah, I've
got a partition on owl (i86) that boots, but as an OS it's been nothing but
trouble for me - hardware and software.  So there's no incentive to spend
effort (nor one more red cent) on it, unless somebody want's to $ponsor the
work.  Luca himself seems to have moved his primary development off Solaris,
so as long as it works for his systems, he's happy.

Really, with all the stuff you have to load from Sun Freeware just to get
ntop to compile, well, what's a little bash among friends <grin/>.

/usr/local/bin/bash ./configure
/usr/local/bin/bash gmake


But anyway...

Under bash you still need the ()s.  Are you're saying that

test_library() { }

works under ksh???  WOW - That's quite odd - and I worry how it's
different - you may not realize that what I'm doing with test_library is
simulating the translation that's done for AC_CHECK_LIB() in configure.in,
so there's some nasty little issues WRT substitution going on here
(configure.in is written in 'M4', while configureextra/functions is a shell
script).  The miracle is that it works AT ALL!  But if it is working, that
would probably be a viable cross platform solution.

Let's see...

rrd_clear_error rings a bell - search the back traffic.  IIRC it's a
conflict in rrd versions between the installed one and myrrd...  No, it
shouldn't have -lrrd (that would be the .so version, not the static captive
one in myrrd).

Not sure what the crash means - there's not enough data to begin to guess.
(What you're supposed to provide is the stuff described in the HowTo Ask For
Help).

Also, let's keep ONE problem per message with a meaningful title, so others
can someday find our pithy discussions...


-----Burton


-----Original Message-----
From: David Birnbaum [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 3:29 PM
To: Burton Strauss
Subject: RE: NTOP on Solaris SPARC


Burton,

The only configure out of a looooooong list of packages that we install
that has this problem is ntop, and I'm agressive about keeping things up
to date.  This type of problem will frustrate Solaris folks who can't swap
shells out at will.

Note that [ function ] is optional.  If you take "function" out, all will
be well in sh, ksh, and bash.  I would also recomment that you test with
ksh, which is standard (if ancient) on most systems and quite capable as
shells go.

In any case, it builds.  But now it dies instantly.  Here's the gdb
output:

(gdb) where
#0  processIpPkt (bp=0xfdf7dcd6 "E\020", h=0xfdf7fcf0, length=150,
    ether_src=0xfdf7dcfe
"{|T&\222\020T)Z\036Whe;]~};T&8rYo\236/.I~S\237\e0{|\003XY\022Yo\026\031\024
>{FCn;\026\2007\211!y\032\213\"Y\016(+", ether_dst=0x88
",qfe1,hme0 --numeric-ip-addresses --http-se", actualDeviceId=2,
    vlanId=-1) at pbuf.c:1119
#1  0xff11f1d4 in processPacket (_deviceId=0x2 "", h=0xfdf7fcf0,
p=0xfdf7dcc8 "\b") at pbuf.c:2916
#2  0xff11d714 in dequeuePacket (notUsed=0xff14bac0) at pbuf.c:2106

Look like memory is getting squashed.  Unfortunately, I don't speak C so I
can't really debug this one much.  ntop was called like this:

/usr/local/bin/ntop \
  --interface hme1,qfe0,qfe1 \
  --numeric-ip-addresses \
  --http-server=8080 \
  --no-interface-merge

On startup, it failed to load the rrdPlugin module:

  02/Dec/2003 16:19:01  **WARNING** Unable to load plugin
'/opt/ntop/2.2c/lib/ntop/plugins/rrdPlugin.so'
  02/Dec/2003 16:19:01  **WARNING** Message is 'ld.so.1:
/usr/local/bin/ntop: fatal: relocation error: file
/opt/ntop/2.2c/lib/ntop/plugins/rrdPlugin.so: symbol rrd_clear_error:
referenced symbol not found'

Here's the link line when it was built:

  /usr/ccs/bin/ld -G -h librrdPlugin-2.2.97.so -o
.libs/librrdPlugin-2.2.97.so

rrdPlugin.lo  -L/usr/local/lib -L/usr/local/src/ntop/2.2cvs/ntop/myrrd -lpos
ix4 -lpthread -lresolv -lsocket -lxnet -lnsl -lm -ldl -lc -lssl -lcrypto -lg
dbm -lgd -lpng -lz

Shouldn't it have -lrrd in it?  I'm not sure what myrrd is, perhaps it
didn't link it in.  I checked my library with nm, and it's in there, so I
just think it isn't getting linked somewhere right:

  corona% nm /usr/local/lib/librrd.a | grep rrd_clear_error
  [11]    |       132|      40|FUNC |GLOB |0    |2      |rrd_clear_error

Here's what configure said about it:

Host System Type        : sparc-sun-solaris2.8
Preprocessor (cppflags) :  -DSOLARIS -I/usr/local/include
Compiler (cflags)       :
gcc -g -O2 -I/usr/local/include -Wshadow -Wpointer-arith -Wmissing-prototype
s -Wmissing-declarations -Wnested-externs  -fPIC
Defines                 : -DHAVE_CONFIG_H
Loader (ldflags)        : -L/usr/local/lib -lnsl -lsocket  -L/usr/local/lib
Include path            :
System Libs












: -lposix4 -lpthread -lresolv -lsocket -lxnet -lnsl -lm -ldl -lc -lssl -lcry
pto -lpcap -lgdbm -lgd -lpng -lz
MultiThread mode        : enabled
Locale                  : /usr/lib/locale

External packages:

LBL pcap .h             : standard system headers
LBL pcap library        : standard system libraries
GNU gdbm .h             : standard system headers
GNU gdbm library        : standard system libraries
zlib     .h             : standard system headers
zlib     library        : standard system libraries
gd       .h             : standard system headers
gd       library        : standard system libraries
png      .h             : standard system headers
png      library        : standard system libraries
openSSL  .h             : standard system headers
openSSL  library        : standard system libraries

rrd isn't listed anymore, it used to be in 2.2c.

Cheers,

David.

-----

On Tue, 2 Dec 2003, Burton Strauss wrote:

> Interestingly, the () are REQUIRED for bash - from man bash:
>
>        [ function ] name () { list; }
>               This defines a function named name.  The body of the
function is
>               the  list  of  commands  between { and }.  This list is
executed
>               whenever name is specified as the name of a simple command.
The
>               exit status of a function is the exit status of the last
command
>               executed in the body.  (See FUNCTIONS below.)
>
>
> Basically, a lot of things won't work with the old shell, much like
ancient awk.  ntop just kinda requires more modern stuff.  We run tests for
awk, but I don't know that you can test for the shell issue, as you're
already running under it (the gnu stuff gets around the problem by not using
functions - there's no way to do that with configureextra/functions.
>
> I suppose the only solution is to test $SHELL before you do the .
configureextra/functions.  If it's csh, then just echo a warning re libiconv
and exit.  Some thing like this:
>
> if [ "x${SHELL}" = "x/bin/csh" ]; then
>    echo "blather here re iconv"
>    exit 0
> fi
>
>
> -----Burton
>
>
> ---------- Original Message ----------------------------------
> From: David Birnbaum <[EMAIL PROTECTED]>
> Date:  Tue, 2 Dec 2003 15:20:04 -0500 (EST)
>
> >Burton,
> >
> >I didn't ASSUME anything, I checked it out.
> >
> >Line 13 of the functions file contains this:
> >
> >  function test_library()
> >
> >For sh/ksh (which is what shell configure appears to use under Solaris
> >8), this isn't legal.  It's either:
> >
> >  function test_library
> >
> >or
> >
> >  test_library()
> >
> >I had to go dust off my ksh book, but it describes compatability issues
> >between bourne shell and korn shell usage.  bash apparently allows the
> >formats to be combined.  bash is not standard on Solaris, it's sh or ksh
> >unless you install it.
> >
> >I'll see if the compile works this time.
> >
> >Cheers,
> >
> >David.
> >
> >-----
> >
> >On Tue, 2 Dec 2003, Burton M. Strauss III wrote:
> >
> >> Well, you are ASSUMING that line in configure is the invoke of the
> >> configureextra/SOLARIS8 file...
> >>
> >> 1. Check it.
> >>
> >> If it is configureextra/SOLARIS8, well... even then, there's no "line
13" in
> >> the file...
> >>
> >> 2. That file and the functions work fine under the bash shell...  What
shell
> >> are y'all using?
> >>
> >> 3. Maybe a non-bash shell doesn't like the (s in to comment?:
> >>
> >> # Test for GNU libiconv (e.g. SunFreeware)
> >>
> >> Try removing them
> >>
> >> 4. Maybe putting -x (or whatever the shell's option is) to show the
lines
> >> being executed, e.g.
> >>
> >> #!/bin/sh -x
> >>
> >> on the files (configureextra/SOLARIS8 and configureextra/functions)
will
> >> show the actual like it's complaining about.
> >>
> >>
> >> -----Burton
> >>
> >>
> >> -----Original Message-----
> >> From: Luca Deri [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, December 02, 2003 12:19 PM
> >> To: Burton M. Strauss III
> >> Cc: David Birnbaum; [EMAIL PROTECTED]
> >> Subject: Re: NTOP on Solaris SPARC
> >>
> >>
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Burton,
> >> any clue about this problem?
> >>
> >> Regards, Luca
> >>
> >> David Birnbaum wrote:
> >>
> >> | Howdy.
> >> |
> >> | Configure gets a syntax error:
> >> |
> >> | Testing for special configuration options for SOLARIS  8
> >> |
> >> | Executing configureextra/SOLARIS8 Setting Solaris 8 specific flag
> >> | values ./configure[7149]: syntax error at line 13 : `(' unexpected
> >> |
> >> | I think configureextra/functions has a syntax error.
> >> |
> >> | David.
> >> |
> >> | -----
> >> |
> >> | On Tue, 2 Dec 2003, Luca Deri wrote:
> >> |
> >> |> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> >> |>
> >> |> Hi all, today I have compiled the ntop code on Solaris 8. I assume
> >> |> that the problem you reported should be fixed by now. If not please
> >> |> come back to me.
> >> |>
> >> |> Regards, Luca
> >> |>
> >> |> Anthony David wrote:
> >> |>
> >> |> | On Mon, Dec 01, 2003 at 03:08:50PM -0500, David Birnbaum wrote: |
> >> |>  |> I just built it out of CVS.  It dies: |> |> gcc -DHAVE_CONFIG_H
> >> |> -I. -I. -I. -I. |> -I/usr/local/src/ntop/2.2cvs/ntop/myrrd
> >> |> -DSOLARIS |> -I/usr/local/include
> >> |> -I/usr/local/src/ntop/2.2cvs/ntop/myrrd -g -O2 |>
> >> |> -I/usr/local/include -Wshadow -Wpointer-arith-Wmissing-prototypes
> >> |> |> -Wmissing-declarations -Wnested-externs -fPIC -g -O2 |>
> >> |> -I/usr/local/include -Wshadow -Wpointer-arith -Wmissing-prototypes
> >> |> |> -Wmissing-declarations -Wnested-externs -fPIC -c iface.c -MT |>
> >> |> iface.lo -MD -MP -MF .deps/iface.TPlo  -fPIC -DPIC -o |>
> >> |> .libs/iface.lo iface.c:33:24: sys/sysctl.h: No such file or |>
> >> |> directory | | | This is a Linux-specific header. Perhaps the
> >> |> configure | |> iface.c: In function `iface_new': iface.c:98:
> >> |> `CTL_NET' undeclared |> (first use in this function) iface.c:98:
> >> |> (Each undeclared |> identifier is reported only once iface.c:98:
> >> |> for each function it |> appears in.) iface.c:98: `NET_RT_IFLIST'
> >> |> undeclared (first use in |> this function) iface.c:219: `RTAX_MAX'
> >> |> undeclared (first use in |> this function) iface.c:248: `RTAX_IFA'
> >> |> undeclared (first use in |> this function) iface.c:254: `RTAX_BRD'
> >> |> undeclared (first use in |> this function) iface.c:255:
> >> |> `RTAX_NETMASK' undeclared (first use in |> this function) make[2]:
> >> |> *** [iface.lo] Error 1 make[2]: Leaving |> directory
> >> |> `/home/src/ntop/2.2cvs/ntop' make[1]: *** [all-recursive] |> Error
> >> |> 1 make[1]: Leaving directory `/home/src/ntop/2.2cvs/ntop' |> make:
> >> |> *** [all] Error 2 | | | These are in the linux header
> >> |> /usr/include/linux/rtnetlink.h | |> Here's my configure line: |> |>
> >> |> ./configure --prefix=/opt/ntop/2.2 --localstatedir=/var |> |> I
> >> |> took all the other junk out.  I can't find the RTAX stuff |>
> >> |> anywhere in my include directory; perhaps it's somewhere else? | |
> >> |> | Nowhere on Solaris. iface.c seems to be a generic routine | | | I
> >> |> will be downloading a copy and see what I can fix. Meanwhile, Luca
> >> |> | might have some clues. | | Anthony | |> David. |> |> ----- |> |>
> >> |> On Wed, 26 Nov 2003, Anthony David wrote: |> |>> On Mon, Nov 24,
> >> |> 2003 at 11:46:22AM -0500, David Birnbaum wrote: |>> |>>> Hmmm. |>>>
> >> |>  |>>> Well, after reproducing this no number of times, I now find I
> >> |>  |>>> can't reproduce the build error.  ntop does seem to prefer
> >> |> it's |>>> own libraries to the system ones I build and maintain,
> >> |> but it |>>> doesn't seem to matter, so long as I include: |>>> |>>>
> >> |> export LDFLAGS='-L/usr/local/lib -lm' |>>> |>>> for the build. |>>>
> >> |>  |>>> ntop still does crash pretty quickly after you attach with
> >> |> the |>>> web server. |>> |>> Hi David |>> |>> Apologies for the
> >> |> delay in responding. I was under the illusion I |>> had more time
> >> |> than I did have. |>> |>> The first thing that would happen if I
> >> |> shipped the bug  to the |>> developers would be a question "Does it
> >> |> still fail in the latest |>> CVS?" So I recommend you get the
> >> |> latest CVS. Unfortunately there |>> is a problem with the
> >> |> snapshot.ntop.org CVS snapshots. I suggest |>> getting a copy
> >> |> directly from the CVS server. |>> |>> Regards |>> |>> Anthony |>>
> >> |> |>>> Cheers, |>>> |>>> David. |>>> |>>> ------ |>>> |>>> On Mon, 24
> >> |> Nov 2003, David Birnbaum wrote: |>>> |>>>> Howdy, |>>>> |>>>> A few
> >> |> Solaris issues that I've run across: |>>>> |>>>> There seems to be
> >> |> a configure bug on Solaris 2.8/ntop 2.2c. |>>>> I looked at the
> >> |> script, but it's so hard to follow I can't |>>>> comment on what's
> >> |> actually broken, but it doesn't appear that |>>>> the script is
> >> |> properly searching for the pcap library.  I |>>>> have libpcap
> >> |> installed in /usr/local, a relatively standard |>>>> location.
> >> |> However, the configure script claims it can't find |>>>> it. A
> >> |> careful review of the config.log shows that the gcc |>>>> statement
> >> |> that's failing doesn't have -lpcap in it!  My |>>>> attempts to fix
> >> |> this with LDFLAGS result in more and more |>>>> errors of all
> >> |> different flavors.  I finally got everything to |>>>> compile with
> >> |> the following settings: |>>>> |>>>> export
> >> |> LDFLAGS='-L/usr/local/lib/ -lm' |>>>> |>>>> ./configure
> >> |> --prefix=/opt/ntop/2.2c \ |>>>> --with-pcap-root=/usr/local \
> >> |> --localstatedir=/var \ |>>>> --with-zlib-root=/usr/local \
> >> |> --with-libpng-root=/usr/local \ |>>>>  --with-gd-root=/usr/local \
> >> |> --with-rrd-root=/usr/local |>>>> |>>>> Note that you need to have
> >> |> -lm added if you PNG is linked |>>>> statically; that should be
> >> |> added (the pow symbol shows up |>>>> missing otherwise). |>>>>
> >> |> |>>>> On a worse note, ntop crashes pretty quickly if you try to
> >> |> |>>>> attach to the webserver after it's collected a little traffic
> >> |>  |>>>> (you can get one or two pages out before it dies), and |>>>>
> >> |> "configuration" crashes it immediately. Here's some gdb |>>>>
> >> |> output: |>>>> |>>>> Core was generated by `/usr/local/bin/ntop
> >> |> --interface |>>>> qfe0,qfe1,hme0 --local-subnets 209.212.65.0/24,'.
> >> |> Program |>>>> terminated with signal 9, Killed. Reading symbols
> >> |> from |>>>> /opt/ntop/2.2c/lib/libntopreport-2.2.so...done. Reading
> >> |> |>>>> symbols from /opt/ntop/2.2c/lib/libntop-2.2.so...done. |>>>>
> >> |> Reading symbols from /usr/lib/libm.so.1...done. Reading |>>>>
> >> |> symbols from /usr/lib/libglib-1.2.so.0...done. Reading |>>>>
> >> |> symbols from /usr/lib/librt.so.1...done. Reading symbols from |>>>>
> >> |> /usr/lib/libpthread.so.1...done. Reading symbols from |>>>>
> >> |> /usr/lib/libresolv.so.2...done. Reading symbols from |>>>>
> >> |> /usr/lib/libsocket.so.1...done. Reading symbols from |>>>>
> >> |> /usr/lib/libssl.so.0.9.6...done. Reading symbols from |>>>>
> >> |> /usr/lib/libcrypto.so.0.9.6...done. Reading symbols from |>>>>
> >> |> /usr/lib/libgdbm.so.3...done. Reading symbols from |>>>>
> >> |> /usr/lib/libdl.so.1...done. Reading symbols from |>>>>
> >> |> /usr/lib/libnsl.so.1...done. Reading symbols from |>>>>
> >> |> /usr/lib/libc.so.1...done. Reading symbols from |>>>>
> >> |> /usr/lib/libz.so...done. Reading symbols from |>>>>
> >> |> /usr/lib/libpng.so.2...done. Reading symbols from |>>>>
> >> |> /usr/lib/libaio.so.1...done. Reading symbols from |>>>>
> >> |> /usr/lib/libmp.so.2...done. Reading symbols from |>>>>
> >> |> /usr/lib/libgcc_s.so.1...done. Reading symbols from |>>>>
> >> |> /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done. Reading |>>>>
> >> |> symbols from /usr/lib/libthread.so.1...done. Reading symbols |>>>>
> >> |> from /opt/ntop/2.2c/lib/ntop/plugins/icmpPlugin.so...done. |>>>>
> >> |> Reading symbols from |>>>>
> >> |> /opt/ntop/2.2c/lib/ntop/plugins/lastSeenPlugin.so...done. |>>>>
> >> |> Reading symbols from |>>>>
> >> |> /opt/ntop/2.2c/lib/ntop/plugins/netflowPlugin.so...done. |>>>>
> >> |> Reading symbols from |>>>>
> >> |> /opt/ntop/2.2c/lib/ntop/plugins/nfsPlugin.so...done. Reading |>>>>
> >> |> symbols from |>>>>
> >> |> /opt/ntop/2.2c/lib/ntop/plugins/pdaPlugin.so...done. Reading |>>>>
> >> |> symbols from |>>>>
> >> |> /opt/ntop/2.2c/lib/ntop/plugins/sflowPlugin.so...done. #0 |>>>>
> >> |> 0xfec33200 in strlen () (gdb) where #0  0xfec33200 in strlen |>>>>
> >> |> () #1  0xfec86210 in _doprnt () #2  0xfec87f54 in snprintf () |>>>>
> >> |> #3  0xff34db18 in getHostCountryIconURL (el=0x12ec1f0) at |>>>>
> >> |> webInterface.c:562 #4  0xff34d600 in makeHostLink |>>>>
> >> |> (el=0x12ec1f0, mode=1, cutName=0, addCountryFlag=1) at |>>>>
> >> |> webInterface.c:434 #5  0xff3296d4 in printHostsTraffic |>>>>
> >> |> (reportType=9, sortedColumn=3, revertOrder=0, pageNum=0, |>>>>
> >> |> url=0xff35bb70 "sortDataProtos.html") at report.c:864 #6 |>>>>
> >> |> 0xff32168c in returnHTTPPage (pageName=0xfe4077e1 |>>>>
> >> |> "sortDataProtos.html?col=3", postLen=-1, from=0x2, |>>>>
> >> |> httpRequestedAt=0xfe407698, usedFork=0xfe407688, agent=0x0) |>>>>
> >> |> at http.c:1778 #7  0xff323880 in handleHTTPrequest |>>>>
> >> |> (from=Cannot access memory at address 0xd1d44548. ) at |>>>>
> >> |> http.c:2492 #8  0xff356d38 in handleSingleWebConnection |>>>>
> >> |> (fdmask=0xfe407c80) at webInterface.c:5097 #9  0xff356ab4 in |>>>>
> >> |> handleWebConnections (notUsed=0xfe407c80) at |>>>>
> >> |> webInterface.c:4963 |>>>> |>>>> Please let me know if I can be more
> >> |> helpful.  And thanks for |>>>> your effort in creating/supporting
> >> |> this software. |>>>> |>>>> Cheers, |>>>> |>>>> David. |>>>> |>>>>
> >> |> |>> -- Anthony David |>> |>> Gambling(n): A discretionary tax on
> >> |> those asleep during high |>> school maths http://adavid.com.au/
> >> |> 0xA72CE1ED fingerprint = EA1E |>> C69E FE59 BBE1 AA4B  F354 BD09
> >> |> 9765 A72C E1ED |>> |>> |
> >> |>
> >> |>
> >> |> - -- Luca Deri <[EMAIL PROTECTED]>    http://luca.ntop.org/ Hacker:
> >> |> someone who loves to program and enjoys being clever about it -
> >> |> Richard Stallman -----BEGIN PGP SIGNATURE----- Version: GnuPG
> >> |> v1.2.1 (GNU/Linux) Comment: Using GnuPG with Mozilla -
> >> |> http://enigmail.mozdev.org
> >> |>
> >> |> iD8DBQE/zLvKmMhDxnkh3zQRAuk7AKCmY361hxJZYs5504AD+HpWrECecgCgqazA
> >> |> 6UBs+BEDVdpMElRaVV0BfHE= =+DvT -----END PGP SIGNATURE-----
> >> |>
> >> |>
> >> |>
> >> |>
> >>
> >>
> >> - --
> >> Luca Deri <[EMAIL PROTECTED]>    http://luca.ntop.org/
> >> Hacker: someone who loves to program and enjoys being
> >> clever about it - Richard Stallman
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.2.1 (GNU/Linux)
> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >>
> >> iD8DBQE/zNd/mMhDxnkh3zQRAo4bAJ9RQ0uYmnLUa9fvhrx+/TVo1LdoMQCghWvD
> >> Xs75Cde7erjGVfwfWcbTS3Q=
> >> =CCGf
> >> -----END PGP SIGNATURE-----
> >>
> >>
> >>
> >>
> >>
> >
>
>

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to