It's got to be something with your setup.  I don't understand why you have
BOTH lines (#define and #undef) in there.  Obviously if you have the correct
one, #undef, it would compile fine, bypassing the backtrace() code.

On my FreeBSD (4.6.2) machine - with the current cvs - it properly
determined it doesn't have backtrace:

config.h:

/* Define if your host supports SNMP  */
/* #undef HAVE_SNMP */

/* Define if you have backtrace */
/* #undef HAVE_BACKTRACE */

/* Defines for endian-ness... */
#define NTOP_LITTLE_ENDIAN 1
/* #undef NTOP_BIG_ENDIAN */

config.log:

configure:6816: checking for backtrace in -lc
configure:6849: gcc -o
conftest -g -O2 -pipe  -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissi
n
g-declarations -Wnested-externs  -fPIC   conftest.c -lc   >&5
/tmp/ccqt53eK.o: In function `main':
/shared/work/freebsd/ntop/configure(.text+0x14): undefined reference to
`backtrace'
configure:6852: $? = 1
configure: failed program was:
#line 6823 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char backtrace ();
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
backtrace ();
  ;
  return 0;
}
configure:6869: result: no

What versions of the tools do you have?

06:34 tiggerf [FreeBSD] user=ntop pwd=/shared/work/freebsd/ntop $
autoconf --version
autoconf (GNU Autoconf) 2.53
Written by David J. MacKenzie and Akim Demaille.

Copyright 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

06:34 tiggerf [FreeBSD] user=ntop pwd=/shared/work/freebsd/ntop $
automake --version
automake (GNU automake) 1.5
Written by Tom Tromey <[EMAIL PROTECTED]>.

Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

06:34 tiggerf [FreeBSD] user=ntop pwd=/shared/work/freebsd/ntop $
libtool --version
ltmain.sh (GNU libtool) 1.3.4-freebsd-ports (1.385.2.196 1999/12/07
21:47:57)

06:34 tiggerf [FreeBSD] user=ntop pwd=/shared/work/freebsd/ntop $
gmake --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386-portbld-freebsd4.6
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <[EMAIL PROTECTED]>.







-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Stanley Hopcroft
Sent: Friday, September 20, 2002 7:17 PM
To: [EMAIL PROTECTED]
Subject: Re: [Ntop-dev] Re: FreeBSD SIGBUS when dumping data --
backtrace


Dear Sir,

On Fri, Sep 20, 2002 at 09:29:48AM -0500, Burton M. Strauss III wrote:
> >From the GNU doc, it sounds like a standard extension of gcc - beats me
why
> it's not there in FreeBSD.

>
> However, it sounds like ./configure isn't working properly.  Can you find
> the lines in config.h and config.log regarding the test and post them...
> For me it's:
>
>
> /* Define if you have backtrace */
> #define HAVE_BACKTRACE 1
>
> and
>
> configure:4213: checking for backtrace in -lc
> configure:4232: gcc -o
>
conftest -g -O2 -pipe  -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissi
> ng-declarations -Wnested-externs  -fPIC   conftest.c -lc  -ldl  1>&5
>
>

>From config.h

/* #undef HAVE_BACKTRACE        */
#define HAVE_BACKTRACE 1

>From config.log

configure:4127: checking for backtrace in -lc
configure:4146: gcc -o conftest -g -O2 -pipe   conftest.c -lc   1>&5
/tmp/cc475FVO.o: In function `main':
/home/anwsmh/build/ntop-2.1.2/ntop/configure(.text+0x7): undefined
reference to `backtrace'
configure: failed program was:
#line 4135 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char backtrace();

int main() {
backtrace()
; return 0; }


>
> If backtrace doesn't work, then running under gdb is probably the only
> option.
>
> -----Burton
>

Thank you,

Yours sincerely.

--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

Reply via email to