[Ntop-misc] "-l ../libpfring/libpfring.a"
Gentoo-Wally
gentoowally at gmail.com
Tue Jan 30 16:05:43 CET 2007
Thx. I've been working from similar instructions. One thing I've found
is this...
gcc -shared -Wl,-soname -Wl,libpfring.so.0.9.4 -o libpfring.so.0.9.4 *.o -lc
Would it be more appropriate/accurate to use...
gcc -shared -Wl,-soname -Wl,libpfring.so.3.2.1 -o libpfring.so.3.2.1 *.o -lc
Instead of using the pcap version since this is really the pfring lib?
Wally
On 1/30/07, Michael Stiller <ms at 2scale.net> wrote:
> On Mon, 2007-01-29 at 12:32 -0500, Gentoo-Wally wrote:
>
> Hm,
>
> just give these instructions a try:
>
> http://bjou.homeunix.net/blog/2006/12/advanced-packet-capturing-howto-
> pf_ring-napi-and-extended-libpcap-on-debian-sarge/
>
> Worked for me.
>
> -Michael
>
> > Hi,
> >
> > I see in PF_RING/userland/libpcap-0.9.4-ring/README it states ...
> >
> > <quote>
> > Make sure that when you build the libpcap library, you modify the
> > libpcap Makefile as follows:
> > 1. Add "-I ../libpfring" to the INCLS variable
> > 2. Add "-l ../libpfring/libpfring.a" to the LIBS variable
> > </quote>
> >
> > In 1 that's a capital "eye" and in 2 it is a lowercase "L"
> >
> > This works for the INCLS var because I see the -I during 'make' for
> > libpcap-0.9.4
> > ...
> > gcc -O2 -I. -I../libpfring -DHAVE_CONFIG_H
> > -D_U_="__attribute__((unused))" -c ./pcap.c
> > gcc -O2 -I. -I../libpfring -DHAVE_CONFIG_H
> > -D_U_="__attribute__((unused))" -c ./inet.c
> > gcc -O2 -I. -I../libpfring -DHAVE_CONFIG_H
> > -D_U_="__attribute__((unused))" -c ./gencode.c
> > ...
> >
> > but the change to LIBS var produces the following error at the end of 'make'...
> >
> > c -O2 -I. -I../libpfring -DHAVE_CONFIG_H
> > -D_U_="__attribute__((unused))" -c version.c
> > ar rc libpcap.a pcap-linux.o fad-getad.o pcap.o inet.o gencode.o
> > optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o
> > bpf_dump.o scanner.o grammar.o version.o -l../libpfring/libpfring.a
> > ar: -l../libpfring/libpfring.a: No such file or directory
> > make: *** [libpcap.a] Error 1
> >
> > It does work if I remove the "-l" changing the LIBS var to
> > "../libpfring/libpfring.a"
> >
> > gcc -O2 -I. -I../libpfring -DHAVE_CONFIG_H
> > -D_U_="__attribute__((unused))" -Dyylval=pcap_lval -c grammar.c
> > sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c
> > gcc -O2 -I. -I../libpfring -DHAVE_CONFIG_H
> > -D_U_="__attribute__((unused))" -c version.c
> > ar rc libpcap.a pcap-linux.o fad-getad.o pcap.o inet.o gencode.o
> > optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o
> > bpf_dump.o scanner.o grammar.o version.o ../libpfring/libpfring.a
> > ranlib libpcap.a
> >
> > I could be wrong, but I don't think this is the correct usage.
> >
> > As a test I followed the directions at
> > http://wiki.ntop.org/mediawiki/index.php/Installing_on_Fedora_Core_4_%28FC4%29
> >
> > When doing the install this way I notice that libpfring.a is not
> > included in the 'ar rc' at the end of 'make'.
> >
> > I'm not a programming guru so I'm not sure if I should see libpfring.a
> > included during the 'ar rc' or not?
> > If not... is changing the LIBS var during a 'make' for libpcap really
> > needed since the only place the LIBS var is used in the Makefile is
> > when 'ar rc' is done here...
> >
> > <quote>
> >
> > libpcap.a: $(OBJ)
> > @rm -f $@
> > ar rc $@ $(OBJ) $(LIBS)
> > $(RANLIB) $@
> >
> > </quote>
> >
> > Also shouldn't it state that these changes should be made to
> > Makefile.in instead of Makefile?
> >
> > Thx for the --help,
> >
> > Wally
> > _______________________________________________
> > Ntop-misc mailing list
> > Ntop-misc at listgateway.unipi.it
> > http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc at listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
More information about the Ntop-misc
mailing list