mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.38k stars 1.55k forks source link

Dependency-related regression in 1.5.0rc1 #13352

Open thierryreding opened 1 week ago

thierryreding commented 1 week ago

Describe the bug When trying to build libepoxy with the latest meson 1.5.0rc1, I see issues with some of the test programs not linking properly against libX11. libepoxy doesn't seem to be the problem here, since meson 1.4.0 works fine.

I was able to bisect this to commit 6d713e40f815 ("dependency: define equality and hash operators for Dependency"). Reverting that commit fixes the regression.

To Reproduce Download the latest libepoxy, extract and build using:

$ mkdir libepoxy-1.5.0/build && cd libepoxy-1.5.0/build
$ meson setup ..
$ ninja

And see it fail to link various GLX, GLES tests.

Expected behavior libepoxy should build without any errors.

system parameters

thierryreding commented 1 week ago

@dcbaker any idea what could be causing this? Maybe as an additional data point: in the build log for libepoxy I don't see any of the linker arguments for libX11, though I do see the one for libdl. X11 is found via dependency() and ultimately pkg-config, whereas libdl is found using cc.find_library(), so that's probably why they behave differently.