Re: [tcpdump-workers] configure script problem while working on extention

2022-08-16 Thread Guy Harris via tcpdump-workers
--- Begin Message ---
On Aug 16, 2022, at 12:49 PM, Christian  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


Re: [tcpdump-workers] configure script problem while working on extention

2022-08-16 Thread Christian via tcpdump-workers
--- Begin Message ---

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



 This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by tcpdump configure 5.0.0-PRE-GIT, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure

## - ##
## Platform. ##
## - ##

hostname = rockpro64
uname -m = aarch64
uname -r = 5.10.76-rockchip64
uname -s = Linux
uname -v = #trunk SMP PREEMPT Thu Oct 28 16:53:35 EDT 2021

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = aarch64
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: .
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games


## --- ##
## Core tests. ##
## --- ##

configure:2463: checking build system type
configure:2477: result: aarch64-unknown-linux-gnu
configure:2497: checking host system type
configure:2510: result: aarch64-unknown-linux-gnu
configure:2655: checking for gcc
configure:2671: found /usr/bin/gcc
configure:2682: result: gcc
configure:2911: checking for C compiler version
configure:2920: gcc --version >&5
gcc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 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.

configure:2931: $? = 0
configure:2920: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/10/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' 
--with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs 
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr 
--with-gcc-major-version-only --program-suffix=-10 
--program-prefix=aarch64-linux-gnu- --enable-shared 
--enable-linker-build-id --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --libdir=/usr/lib 
--enable-nls --enable-bootstrap --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-libquadmath --disable-libquadmath-support --enable-plugin 
--enable-default-pie --with-system-zlib 
--enable-libphobos-checking=release --with-target-system-zlib=auto 
--enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 
--disable-werror --enable-checking=release --build=aarch64-linux-gnu 
--host=aarch64-linux-gnu --target=aarch64-linux-gnu 
--with-build-config=bootstrap-lto-lean --enable-link-mutex

Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Debian 10.2.1-6)
configure:2931: $? = 0
configure:2920: gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2931: $? = 1
configure:2920: gcc -qversion >&5
gcc: error: unrecognized command-line option '-qversion'; did you mean 
'--version'?

gcc: fatal error: no input files
compilation terminated.
configure:2931: $? = 1
configure:2951: checking whether the C compiler works
configure:2973: gcc    conftest.c  >&5
configure:2977: $? = 0
configure:3025: result: yes
configure:3028: checking for C compiler default output file name
configure:3030: result: a.out
configure:3036: checking for suffix of executables
configure:3043: gcc -o conftest    conftest.c  >&5
configure:3047: $? = 0
configure:3069: result:
configure:3091: checking whether we are cross compiling
configure:3099: gcc -o conftest    conftest.c  >&5
configure:3103: $? = 0
configure:3110: ./conftest
configure:3114: $? = 0
configure:3129: result: no
configure:3134: checking for suffix of object files
configure:3156: gcc -c   conftest.c >&5
configure:3160: $? = 0
configure:3181: result: o
configure:3185: checking whether we are using the GNU C compiler
configure:3204: gcc -c   conftest.c >&5
configure:3204: $? = 0
configure:3213: result: yes
configure:3222: checking whether gcc accepts -g
configure:3242: gcc -c -g  conftest.c >&5
configure:3242: $? = 0
configure:3283: result: yes
configure:3300: checking