Skip to content

Build 8.3.36- zlib.lib could not be found because zlib 1.3.2 cmake build does not emit it #24533

Open

Description

@ncook-hxgn

Description

I'm trying to build 8.3.36, but I can't get it to see my local build of zlib.

In ext/zlib/config.w32, there is a zlib named that isn't the output of the 1.3.2 cmake zlib build that the windows php build depends on. It's looking for zlib.lib, but that's not what the ZLib 1.3.2 CMake build emits

// vim:ft=javascript

ARG_ENABLE("zlib", "ZLIB support", "yes");

if (PHP_ZLIB == "yes") {
	if (CHECK_LIB("zlib_a.lib;zlib.lib", "zlib", PHP_ZLIB) &&
		CHECK_HEADER("zlib.h", "CFLAGS", "..\\zlib;" + php_usual_include_suspects)) {

		EXTENSION("zlib", "zlib.c zlib_fopen_wrapper.c zlib_filter.c", PHP_ZLIB_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
		AC_DEFINE("HAVE_ZLIB", 1, "Define to 1 if the PHP extension 'zlib' is available.");

		if (!PHP_ZLIB_SHARED) {
			ADD_DEF_FILE("ext\\zlib\\php_zlib.def");
		}
	} else {
		WARNING("zlib support can't be enabled, zlib is missing")
		PHP_ZLIB = "no"
	}
}

I think this needs to be
CHECK_LIB("zlib_a.lib;zlib.lib;z.lib", "zlib", to include the name as it comes from ZLib's 1.3.2 CMake build?

PHP Version

PHP v8.3.36 built not-yet because zlib can't be found

Operating System

Windows 11

Activity

  1. changed the title [-]Wgo[/-] [+]Build 8.3.36- zlib.lib could not be found because zlib 1.3.2 cmake build does not emit it[/+] on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions