--- Begin Message ---
On Aug 16, 2022, at 12:49 PM, Christian <ch...@argonautx.net> wrote:

>>> configure:6075: checking for pcap_loop
>>> configure:6075: gcc -o conftest -g -O2   conftest.c -L/usr/local/lib 
>>> -Wl,-rpath,/usr/local/lib -lpcap  >&5
>>> /usr/bin/ld: /usr/local/lib/libpcap.so: undefined reference to 
>>> `scsimon_create'
>>> /usr/bin/ld: /usr/local/lib/libpcap.so: undefined reference to 
>>> `scsimon_findalldevs'
>> Has the pcap.c in the libpcap that was built and installed in /usr/local/lib 
>> been modified to add a pcap module "scsimon", in addition to your "kpnode" 
>> module?
>> 
>> If so, is there a pcap-scsimon.c, or whatever, that defines them, and was it 
>> also added to Makefile.in when the library was built?
> 
> My dumbness again, scsimon is just a synonym for kpnode. This is the actual 
> latest config.log

I.e., that other log was from some *earlier* attempt to configure tcpdump?

> configure:5389: checking whether to look for a local libpcap
> configure:5410: result: yes

OK, so *this* time you're building with the library from a local build, rather 
than with a library that was installed.

> configure:5415: checking for local pcap library
> configure:5445: result: ../libpcap/libpcap.a
> configure:5908: checking for pcap-config
> configure:5926: found ../libpcap/pcap-config
> configure:5938: result: ../libpcap/pcap-config
> configure:6075: checking for pcap_loop
> configure:6075: gcc -o conftest -g -O2   conftest.c ../libpcap/libpcap.a   >&5
> /usr/bin/ld: ../libpcap/libpcap.a(pcap.o):(.data.rel.ro+0x10): undefined 
> reference to `kpnode_findalldevs'
> /usr/bin/ld: ../libpcap/libpcap.a(pcap.o):(.data.rel.ro+0x18): undefined 
> reference to `kpnode_create'

        ...

> which shows the actual problem, if I evoke nm libpcap.so.1-11.0-PRE-GIT  | 
> grep kpnode
> 
> I got U kpnode_create
> 
>         U kpnode_findalldevs
> 
> So the symbols are known but seems to be undefined. How to fix this?

Make sure that libpcap.a includes pcap-kpnode.o, by making sure that 
pcap-kpnode.c is in the list of source modules to be compiled and included in 
libpcap.

For Makefile.in, that means adding it to

        MODULE_C_SRC = @MODULE_C_SRC@

after @MODULE_C_SRC@ so you have

        MODULE_C_SRC = @MODULE_C_SRC@ pcap-kpnode.c

--- End Message ---
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Reply via email to