Re: [tcpdump-workers] build failures on Solaris

2021-08-02 Thread Denis Ovsienko via tcpdump-workers
--- Begin Message ---
On Mon, 2 Aug 2021 14:31:18 -0700
Guy Harris  wrote:

>   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.

$ uname -a
SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise
$ echo $PATH
/usr/sbin:/usr/bin:/opt/csw/bin
$ type pcap-config
pcap-config is /usr/bin/pcap-config
$ pcap-config --libs
-L/usr/lib  -lpcap
$ /usr/bin/sparcv9/pcap-config --libs
-L/usr/lib/sparcv9 -R/usr/lib/sparcv9 -lpcap
$ /opt/csw/bin/pcap-config --libs
-L/opt/csw/lib -R/opt/csw/lib -lpcap
$ /opt/csw/bin/sparcv9/pcap-config --libs
-L/opt/csw/lib/64 -R/opt/csw/lib/64 -lpcap

Though it is not clear why the 64-bit directories are not in PATH.

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

Re: [tcpdump-workers] build failures on Solaris

2021-08-02 Thread Guy Harris via tcpdump-workers
--- Begin Message ---
On Jul 31, 2021, at 3:37 AM, Denis Ovsienko via tcpdump-workers 
 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