Subject: Re: ipfm not compile in NetBSD 2
To: None <netbsd-users@netbsd.org>
From: Roberto Pereyra <ventas@contenidosonline.com.ar>
List: netbsd-users
Date: 01/19/2005 16:59:59
Hi Peter
Now I using libpcap 0.8.3 (the latest version) but I have new errors:
Looks like a ipfm bug ?
I would like to compile ipfm and include it in pkgsrc-wip
Thanks in advance.
roberto
bash-2.05b# make
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c ipfm.c
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c pcap.c
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c filter.c
yacc -d config.y
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c y.tab.c
flex config.l
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c lex.yy.c
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c data.c
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c utils.c
gcc -g -O2 -Wall -O2
-DDEFAULT_OPTIONS_PIDFILE=\"/usr/local/var/run/ipfm.pid\"
-DDEFAULT_OPTIONS_CONFIGFILE=\"/usr/local/etc/ipfm.conf\"
-DDEFAULT_OPTIONS_LOGFILE=\"/usr/local/var/log/ipfm/%d-%b.%H-%M\"
-I/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3 -c init.c
gcc -g -O2 -I. -I.. -I -I/.. -c strlcpy.c
gcc -g -O2 -I. -I.. -I -I/.. -c strlcat.c
gcc -g -O2 -I. -I.. -I -I/.. -c daemon.c
/usr/bin/ar rv libmissing.a strlcpy.o strlcat.o daemon.o
a - strlcpy.o
a - strlcat.o
a - daemon.o
ranlib libmissing.a
gcc -o ipfm ipfm.o pcap.o filter.o y.tab.o lex.yy.o data.o utils.o
init.o /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a
missing/libmissing.a
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.data+0x4):
multiple definition of `yyin'
lex.yy.o(.data+0x4):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:733: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.data+0x8):
multiple definition of `yyout'
lex.yy.o(.data+0x8):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:733: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0x0): In
function `yylex':
: multiple definition of `yylex'
lex.yy.o(.text+0x0):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:733: first
defined here
ld: Warning: size of symbol `yylex' changed from 1452 in lex.yy.o to 2404
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0xf2c):
In function `yy_load_buffer_state':
: multiple definition of `yy_load_buffer_state'
lex.yy.o(.text+0xc18):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1562: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0x1284):
In function `yywrap':
: multiple definition of `yywrap'
lex.yy.o(.text+0xf2c):/home/rpereyra/ipfm/ipfm/source/config.l:127: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0xe90):
In function `yyrestart':
: multiple definition of `yyrestart'
lex.yy.o(.text+0xb7c):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1518: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0xf5c):
In function `yy_create_buffer':
: multiple definition of `yy_create_buffer'
lex.yy.o(.text+0xc48):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1577: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0x1020):
In function `yy_init_buffer':
: multiple definition of `yy_init_buffer'
lex.yy.o(.text+0xd0c):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1636: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0xedc):
In function `yy_switch_to_buffer':
: multiple definition of `yy_switch_to_buffer'
lex.yy.o(.text+0xbc8):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1533: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0xfd0):
In function `yy_delete_buffer':
: multiple definition of `yy_delete_buffer'
lex.yy.o(.text+0xcbc):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1607: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0x106c):
In function `yy_flush_buffer':
: multiple definition of `yy_flush_buffer'
lex.yy.o(.text+0xd58):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1661: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0x10b0):
In function `yy_scan_buffer':
: multiple definition of `yy_scan_buffer'
lex.yy.o(.text+0xd9c):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1692: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0x1148):
In function `yy_scan_string':
: multiple definition of `yy_scan_string'
lex.yy.o(.text+0xe34):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1729: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(scanner.o)(.text+0x116c):
In function `yy_scan_bytes':
: multiple definition of `yy_scan_bytes'
lex.yy.o(.text+0xe58):/home/rpereyra/ipfm/ipfm/source/lex.yy.c:1747: first
defined here
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.text+0x100):
In function `yyparse':
: multiple definition of `yyparse'
y.tab.o(.text+0x10c):/home/rpereyra/ipfm/ipfm/source/y.tab.c:330: first
defined here
ld: Warning: size of symbol `yyparse' changed from 2528 in y.tab.o to 5108
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x80):
multiple definition of `yylhs'
y.tab.o(.rodata+0x0):/home/rpereyra/ipfm/ipfm/source/config.y:393: first
defined here
ld: Warning: size of symbol `yylhs' changed from 82 in y.tab.o to 328
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x1e0):
multiple definition of `yylen'
y.tab.o(.rodata+0x60):/home/rpereyra/ipfm/ipfm/source/y.tab.c:311: first
defined here
ld: Warning: size of symbol `yylen' changed from 82 in y.tab.o to 328
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x340):
multiple definition of `yydefred'
y.tab.o(.rodata+0xc0):/home/rpereyra/ipfm/ipfm/source/y.tab.c:320: first
defined here
ld: Warning: size of symbol `yydefred' changed from 136 in y.tab.o to 450
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x520):
multiple definition of `yydgoto'
y.tab.o(.rodata+0x148):/home/rpereyra/ipfm/ipfm/source/y.tab.c:348: first
defined here
ld: Warning: size of symbol `yydgoto' changed from 22 in y.tab.o to 70
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x580):
multiple definition of `yysindex'
y.tab.o(.rodata+0x160):/home/rpereyra/ipfm/ipfm/source/y.tab.c:353: first
defined here
ld: Warning: size of symbol `yysindex' changed from 136 in y.tab.o to 450
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x760):
multiple definition of `yyrindex'
y.tab.o(.rodata+0x200):/home/rpereyra/ipfm/ipfm/source/y.tab.c:405: first
defined here
ld: Warning: size of symbol `yyrindex' changed from 136 in y.tab.o to 450
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x940):
multiple definition of `yygindex'
y.tab.o(.rodata+0x288):/home/rpereyra/ipfm/ipfm/source/y.tab.c:418: first
defined here
ld: Warning: size of symbol `yygindex' changed from 22 in y.tab.o to 70
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)(.rodata+0x9a0):
multiple definition of `yytable'
y.tab.o(.rodata+0x2a0):/home/rpereyra/ipfm/ipfm/source/y.tab.c:847: first
defined here
ld: Warning: size of symbol `yytable' changed from 162 in y.tab.o to 1964
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
/home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
(.rodata+0x1160): multiple definition of `yycheck'
y.tab.o(.rodata+0x360):/home/rpereyra/ipfm/ipfm/source/y.tab.c:800: first
defined here
ld: Warning: size of symbol `yycheck' changed from 162 in y.tab.o to 1964
in /home/rpereyra/ipfm/ipfm/../libpcap-0.8.3/libpcap.a(grammar.o)
*** Error code 1
Stop.
make: stopped in /home/rpereyra/ipfm/ipfm/source
*** Error code 1
Stop.
make: stopped in /home/rpereyra/ipfm/ipfm
bash-2.05b#
On Wednesday 19 January 2005 10:13, Peter Postma wrote:
> On Tue, Jan 18, 2005 at 05:56:34PM -0300, Roberto Pereyra wrote:
> > Hi all
> >
> > I trying to compile the latest stable ipfm (bandwidth account per ip) in
> > NetBSD 2 and have many errors:
> >
> > I using NetBSD 2.0 and the operating system use libpcap 0.4
>
> [snip]
>
> > pcap.c: In function `closepcap':
> > pcap.c:170: warning: passing arg 1 of `pcap_freecode' from incompatible
> > pointer type
> > pcap.c:170: error: too few arguments to function `pcap_freecode'
>
> The pcap_freecode function doesn't really exists in libpcap 0.4 (only its
> prototype, but with two arguments instead of one).
>
> Try to compile with a newer libpcap, you may want use this pkgsrc package
> to do it: http://www.netbsd.org/~peter/pkgsrc/ipfm.tar.gz