Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There isn't one.

The first thing you'd need would be ARM64 versions of the libraries that Wireshark requires.

If you're building and installing support libraries from source, using the tools/macos-setup.sh script, you'd have to be able to do a cross-build of them, and I don't know whether they'd all support that with, for example, CFLAGS forced to include -arch arm64 - I think GLib, for example, might not do a very good job of handling cross-builds (it couldn't be convinced to do a universal build, back in the days when we supported both PowerPC and x86 builds, and couldn't do 32-bit/64-bit universal, either).

If you're installing them from Homebrew, that might be tricky as well, as Apple doesn't support cross-builds by having a separate set of header and library directories, it supports them by having headers that test the target processor with '#if' when necessary and having universal libraries. I don't think Homebrew does universal binaries - perhaps because the code they're packaging doesn't support them - so you might have to use lipo to glue together the x86-64 and ARM64 library binaries into a universal binary.

Once you've done that, you might be able to run CMake with CFLAGS=-arch arm64 and LDFLAGS=-arch arm64 to do a cross build. However, that might cause it to build tools such as Lemon as ARM64 binaries, which means those tools will fail when run as part of the build process.

If you have universal libraries, you might as well run CMake with CFLAGS=-arch x86_64 -arch arm64 and LDFLAGS=-arch x86_64 -arch arm64 and build universal binaries. That will avoid the tools problem and give you a Wireshark dmg that will install and run either on x86-64 or ARM64 Macs.