tcpdump mailing list archives

Re: build failures on Solaris


From: Guy Harris via tcpdump-workers <tcpdump-workers () lists tcpdump org>
Date: Mon, 2 Aug 2021 14:31:18 -0700

--- Begin Message --- From: Guy Harris <gharris () sonic net>
Date: Mon, 2 Aug 2021 14:31:18 -0700
On Jul 31, 2021, at 3:37 AM, Denis Ovsienko via tcpdump-workers <tcpdump-workers () lists tcpdump org> wrote:

##### Solaris 11 with GCC #####
This is the opposite: the pre-compile libpcap feature test programs
fail to link so all libpcap feature tests fail. However, libpcap is
detected as available and the build process resorts to missing/ and
produces a binary of tcpdump that is mostly functional:

$ /tmp/tcpdump_build_matrix.XX06MD.a/bin/tcpdump -D
/tmp/tcpdump_build_matrix.XX06MD.a/bin/tcpdump: illegal option -- D

The problem seems to be that the feature test linking instead of using
the flags returned by pcap-config points exactly to the 32-bit version
of libpcap and fails:

$ pcap-config --libs
-L/usr/lib  -lpcap

        solaris11$ /usr/bin/pcap-config --libs
        -L/usr/lib  -lpcap
        solaris11$ /usr/bin/amd64/pcap-config --libs
        -L/usr/lib/amd64 -R/usr/lib/amd64 -lpcap

on my x86-64 Solaris 11 VM.

From the Solaris 64-bit Developer's Guide:

        http://math-atlas.sourceforge.net/devel/assembly/816-5138.pdf

the equivalent of "amd64" on SPARC is probably "sparcv9".

So tcpdump (and anything else using libpcap) should, on Solaris, determine the target architecture and run the 
appropriate version of pcap-config.

I'll look at that.

(Apropos of nothing, that Sun document also says of the 64-bit SPARC ABI:

        Structure passing and return are accomplished differently. Small data structures and some floating point 
arguments are now passed directly in registers.

I'm curious which, if any, ABIs pass data structures *and unions* that would fit in a single register in a register.

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

Current thread: