ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Making zlib a required dependency

From: João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx>
Date: Mon, 13 Nov 2017 08:51:04 +0000


On 11-11-2017 18:42, Guy Harris wrote:
On Nov 11, 2017, at 7:04 AM, João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx> wrote:

I pushed a change making zlib 1.2.3 or greater a required build dependency:

https://code.wireshark.org/review/#/c/24352/1

Does that change also assume that pkg-config will find zlib?

If so, that's an inappropriate assumption on the desktop UN*X with the largest market share:

	$ pkg-config --list-all | egrep -i 'zlib|libz'
	$ ls /usr/lib/libz.*
	/usr/lib/libz.1.1.3.dylib       /usr/lib/libz.1.dylib
	/usr/lib/libz.1.2.5.dylib       /usr/lib/libz.dylib
	/usr/lib/libz.1.2.8.dylib
	$ ls /usr/include/zlib.h
	/usr/include/zlib.h
	$ which pkg-config
	/usr/local/bin/pkg-config
	$ sw_vers
	ProductName:    Mac OS X
	ProductVersion: 10.12.6
	BuildVersion:   16G1036

macOS

	1) has a bundled zlib, and includes header files for it in Xcode and the command-line build tools;

	2) does *not* have a bundled pkg-config, and thus does *not* provide .pc files for zlib;

so anything that searches for zlib using pkg-config and that does *NOT* fall back on using an old-fashioned mechanism to find it if pkg-config doesn't find t will fail.

Agreed, I gave it -1 to remove the pkg-config requirement.

To everyone, I think it's good to drop an #ifdef for a codepath with little use but I don't really have a lot of interest in this change either. It was motivated by other work.

So if you think it is a good idea to require zlib (or not) please speak up.