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
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to