<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Hey folks,<br class=""><br class="">I wanted to spend some time to get out an updated version of XQuartz to users to address some bugs in the previous release, and I'm hitting a build time issue I'm hoping folks here can help with.<br class=""><br class="">TL;DR: I want to figure out how to specify how to link zlib because meson is detecting it incorrectly.<br class=""><br class="">I'm using mesa 21.3 right now (since that is that I had in the previous release) and meson 0.62.1.<br class=""><br class="">It looks like we detect zlib via:<br class=""><br class="">dep_zlib = dependency('zlib', version : '>= 1.2.3',<br class="">                      fallback : ['zlib', 'zlib_dep'],<br class="">                      required : get_option('zlib'))<br class=""><br class="">It looks like dependency() is implemented (in part) using cmake, which is giving me an undesired result when using cmake 3.22.4.  Specifically, it gives me a path specific to zlib that is present inside the SDK that was used to build cmake, not the SDK that I'm using to build mesa.  This difference in SDK is important because cmake is built with the current macOS SDK (which contains arm64 + x86_64 support), but I need to also build mesa for i386 (using an older macOS 10.13 SDK).  With cmake present, dependency() is returning the path to libz.tbd in my current SDK which is missing the i386 slice, leading to link failures.<br class=""><br class="">If I uninstall cmake, meson detects how to compile/link correctly (ie: just use '-lz') with a compile test:<br class="">    {"name": "zlib", "version": "1.2.11", "compile_args": [], "link_args": ["-lz"]}<br class=""><br class="">So, I have a few questions:<br class="">   1 - Is there a way to override these entries on the meson command line?<br class="">   2 - Is there a way to tell dependency() to prefer compile test over cmake?<br class="">   3 - Is the incorrect detection here something that is probably a bug in mesa's use of meson, meson itself, or cmake? (ie: where do you suggest I go to investigate this next step)<br class=""><br class="">I have a workaround for now (uninstalling cmake during the mesa build), but I'd certainly like to make this more reliable for others.<br class=""><br class="">Thanks,<br class="">Jeremy<br class=""><br class=""></div></body></html>