Build Glfw package from Testing/3.3.2 branch by conan create -o glfw:shared=True . myself+conan-glfw/testing --build missing. The output will include something like this:
-- Looking for XOpenDisplay in /home/niklas.guertler/.conan/data/libx11/1.6.8/bincrafters/stable/package/850b375ef3612a164776566c2d1529fc4923366e/lib/libX11.a;/home/niklas.guertler/.conan/data/libxext/1.3.4/bincrafters/stable/package/0d8dd2f619dd6b0b89738f67825b6d13af0f1e3b/lib/libXext.a
-- Looking for XOpenDisplay in /home/niklas.guertler/.conan/data/libx11/1.6.8/bincrafters/stable/package/850b375ef3612a164776566c2d1529fc4923366e/lib/libX11.a;/home/niklas.guertler/.conan/data/libxext/1.3.4/bincrafters/stable/package/0d8dd2f619dd6b0b89738f67825b6d13af0f1e3b/lib/libXext.a - not found
Build an application using this Glfw library and Vulkan which then calls vkGetPhysicalDeviceSurfaceCapabilitiesKHR. This will wrongly return VK_ERROR_INITIALIZATION_FAILED as the surface wasn't created properly by Glfw.
Root cause
The cause for this is the removal of the mesa dependency. The conan-mesa conanfile.py defines the default options 'libxcb:shared': True, 'libx11:shared': True which let CMake find the X11 libraries as shared libraries via FindX11. Without mesa and these default_options, when building glfw, CMake attempts to use the libX11.a static library for finding XOpenDisplaywithout also linking with libxcb, causing undefined references to said function, which lets CMake assume libX11 doesn't work.
Solution
A solution for this is to copy these default options into conan-glfw's conanfile.py. I will submit a pull request that does this.
Package and Environment Details
Conan profile
Steps to reproduce (Include if Applicable)
Build Glfw package from
Testing/3.3.2
branch byconan create -o glfw:shared=True . myself+conan-glfw/testing --build missing
. The output will include something like this:Build an application using this Glfw library and Vulkan which then calls
vkGetPhysicalDeviceSurfaceCapabilitiesKHR
. This will wrongly returnVK_ERROR_INITIALIZATION_FAILED
as the surface wasn't created properly by Glfw.Root cause
The cause for this is the removal of the
mesa
dependency. The conan-mesa conanfile.py defines the default options'libxcb:shared': True, 'libx11:shared': True
which let CMake find the X11 libraries as shared libraries viaFindX11
. Withoutmesa
and thesedefault_options
, when building glfw, CMake attempts to use thelibX11.a
static library for findingXOpenDisplay
without also linking withlibxcb
, causing undefined references to said function, which lets CMake assumelibX11
doesn't work.Solution
A solution for this is to copy these default options into
conan-glfw
'sconanfile.py
. I will submit a pull request that does this.