Wireshark-dev: [Wireshark-dev] Re: If you want to test something on a big-endian machine...

Date Prev · Date Next · Thread Prev · Thread Next
From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 30 Jul 2026 00:48:27 -0700
On Jul 30, 2026, at 12:08 AM, Tomasz Moń <desowin@xxxxxxxxx> wrote:

> Why build in emulated environment?

1) I was curious how fast it would be, as I do things on a number of non-macOS platforms, some of which do not support ARM64 (Solaris, DragonFly BSD, and Haiku, for example), and currently use my old maximized last-generation-of-x86-64 MacBook Pro for that.

and

> Wouldn't just running Wireshark inside emulated environment be enough?

2) that involves setting up a cross-build environment and shuffling back and forth between environments. At least you can do shared directories with a 9p client on the guest and a 9p server on the host; UTM has a 9p server somewhere inside it, either in QEMU or in the wrapper stuff.

(The reason why I originally created that emulated s390 - on a virtualized Ubuntu running on the aforementioned x86-64 MacBook Pro - was to test some changes to the rpcap protocol to handle some byte-order issues on packet data; compiling and building libpcap and rpcapd was quick enough. It turned out to be a lot less painful than I thought moving it from command-line QEMU on the Ubuntu machine to UTM on the ARM64 MacBook Pro.)

> Cross-compiling is the standard practice, which is orders of magnitude
> faster than running compiler inside emulated environment.

I'm not sure there's a package, such as a Homebrew package, for "cross-compile for Ubuntu-onz/Architecture on a macOS", but maybe doing the cross-compile on the ARM64 Ubuntu VM would be easier. It still would involve installing cross-compiled libraries on the machine doing the compile and native libraries on the machine running the cross-compiled binaries.

(The native compile of Wireshark from scratch is more like

real 1m22.789s
user 14m33.621s
sys 3m34.798s

so about 2.23 orders of magnitude (base 10) faster.)

Maybe IBM has build-host machines for either z/Architecture+Linux or Power ISA+AIX; I don't know whether there are any SPARC+Solaris build-host machines out there (that would let you test big-endianness *and* insistence on proper alignment of multi-byte quantities).