Is it really 2.9 or do you mean 2.95?

I *think* I'm running 2.95 (Tigger is not up under NetBSD right now) - it's
whatever "comes" with 1.5.3...

I HIGHLY doubt there are errors in the code, that same code is compiled by
gcc on well over 5 platforms.  It's a bad include or (more likely) a missing
dependency, unique to NetBSD/GNU Threads that the configure files aren't
sensitive to.

To say gnu pth is written for NetBSD is, I think, not quite right.  It's
platform neutral and highly portable.

However, let's get to the meat - GNU pth isn't POSIX pthreads.  So I think
that the #include, calls, etc. aren't going to be right...

If you look at the manual, http://www.gnu.org/software/pth/pth-manual.html,
especially the API and example sections, you'll see what I mean.

To make this work, you will have to (off the top of my head)

1) Modify the configure.in/Makefile.am to test for the GNU pth libraries
AHEAD of POSIX pthreads
2) Using the #ifdef HAVE_PTH_H do a bunch of #define macros to convert the
pthread_ calls in ntop to pth_ equivalents

I think it's a lot of work.

As to a more global change?  Don't even thing of a change from POSIX
pthread_ to GNU pth_ without a serious discussion with Luca.

Also, look at this if you want to be scared:
http://www.gnu.org/software/pth/related.html


-----Burton

-----Original Message-----
From: Jeff Rhine [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 9:46 AM
To: Burton M. Strauss III
Subject: RE: [Ntop] Ntop and netbsd with threads


Thanks,

i was actually thinking of doing that as I really wanted to see ntop work ,
As I said
the gnu threads seem to compile the best and were written for netbsd.

However, now I was running into werid compiler errors after I got the
threads lib's to
be noticed by ntop.

Either there are errors in the code or my gcc 2.9 is a little old for
compiling ntop.

what do you think?

jeff


At 07:27 AM 10/16/2002, you wrote:

>Not necessarily.
>
>First off, you can push ahead yourself and create the necessary patches...
>
>It's just that I'm reluctant to pick the "wrong" threads package.  The
>tendency of the BSDers is to use the package/port method vs. compiling from
>source.
>
>Clearly gnu threads has better source-level support.  So if you can find a
>NetBSD package/port for gnu threads, it might be a better choice than
>unproven.  And I'd be willing to give it another look.
>
>However, we should move any further discussion to ntop-dev...
>
>-----Burton
>
>
>
>-----Original Message-----
>From: Jeff Rhine [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, October 15, 2002 8:18 PM
>To: Burton M. Strauss III
>Subject: RE: [Ntop] Ntop and netbsd with threads
>
>
>Thanks for the information on netbsd 1.5 and ntop.
>
>yes it appears there is a problem with threads on netbsd ,however the gnu
>seem to compile and the test programs seem to run.
>
>Guess running threads to support netflows will not be an option for ntop at
>this time.
>
>Jeff
>
>
>At 05:11 PM 10/15/2002, you wrote:
>
> >I have NetBSD on Tigger and occasionally I try it.  Quoting from my
> >29Sep2002 message:
> >
> >"FYI: I have ntop running under NetBSD 1.5.3 on a i386, however, it's
only
> >single threaded.  Because of that gui response time sucks and it's a
little
> >fragile.
> >
> >There doesn't seem to be a pthread compatible library easily available
>under
> >NetBSD (yes, I know about unproven-threads, but it's going to take some
>make
> >file tweaks to make that work).
> >
> >-----Burton"
> >
> >Web searching on that message indicates it's been a problem with other
> >packages (mySQL, Mozilla) in NetBSD and/or OpenBSD.
> >
> >1) The gnu POSIX threads library you've downloaded is being replaced by a
> >total rewrite.
> >
> >2) The real problem is that there isn't a "standard" POSIX threads
package
> >for NetBSD yet...
> >
> >3) The performance of all of the possible threads packages is suspect
>anyway
> >(the reason for unproven-threads is that Proven's package didn't work, or
>so
> >the history on unproven-threads I've read says).
> >
> >4) Until there is a standard POSIX threads package, making ntop work with
> >any of the possibilities is going to require hacks. (and I doubt being
> >really gung ho on making a bunch of configure and Makefile changes of
that
> >complexity).
> >
> >
> >
> >-----Burton
> >
> >
> >
> >-----Original Message-----
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff
> >Rhine
> >Sent: Tuesday, October 15, 2002 3:20 PM
> >To: [EMAIL PROTECTED]
> >Subject: [Ntop] Ntop and netbsd with threads
> >
> >
> >
> >I have been attemping to compile ntop 2.1.51 with netbsd and threads ,
> >netbsd does not come standard with threads so I install gnu's pthreads
> >
> >This gets me to the next compile issue.
> >
> >I get the following compiler error:
> >
> >what am I missing?
> >
> >globals.h:296: syntax error before `dequeueThreadId'
> >globals.h:307: syntax error before `pthread_t'
> >globals.h:314: syntax error before `pthread_t'
> >globals.h:321: syntax error before `pthread_t'
> >globals.h:333: syntax error before `pthread_t'
> >globals.h:350: syntax error before `pthread_t'
> >In file included from ntop.h:2479,
> >                   from address.c:21:
> >globals-core.h:278: syntax error before `*'
> >globals-core.h:278: `createThread' declared as function returning a
>function
> >globals-core.h:279: syntax error before `char'
> >globals-core.h:280: syntax error before `*'
> >
> >
> >my globals looks like this:
> >
> >#endif /* ! USE_SEMAPHORES */
> >
> >    /*
> >     * NPA - Network Packet Analyzer (main thread)
> >     */
> >    PthreadMutex packetQueueMutex;
> >    pthread_t dequeueThreadId;
<==================
> >line 296
> >
> >    /*
> >     * HTS - Host Traffic Statistics
> >     */
> >    PthreadMutex hostsHashMutex;
> >    u_char hostsHashMutexInitialized;
> >
> >    /*
> >     * SIH - Scan Idle Hosts - optional
> >     */
> >    pthread_t scanIdleThreadId;
> >
> >    /*
> >     * AR - Address Resolution - optional
> >     */
> >
> >
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002
>
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002

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

Reply via email to