Hello everyone, Why are the header files in the openSUSE wayland-devel package packed in /usr/include/wayland and not /usr/include as provided by the developers? When building almost any package that requires wayland, an error occurs due to the fact that the header files are not located where they should be. Now ran into this error again, the system vulkan cannot find the header file wayland-client.h Because it looks for it along the path /usr/include/wayland-client.h, and in openSUSE it is located in the path /usr/include/wayland/wayland-client.h I've only seen such a solution in openSUSE, other distributions use default paths Was there any reason for this?
On 19. 10. 21, 5:51, Dead Mozay wrote:
Hello everyone, Why are the header files in the openSUSE wayland-devel package packed in /usr/include/wayland and not /usr/include as provided by the developers? When building almost any package that requires wayland, an error occurs due to the fact that the header files are not located where they should be. Now ran into this error again, the system vulkan cannot find the header file wayland-client.h Because it looks for it along the path /usr/include/wayland-client.h, and in openSUSE it is located in the path /usr/include/wayland/wayland-client.h I've only seen such a solution in openSUSE, other distributions use default paths Was there any reason for this?
I don't know the reason (maybe potentially conflicting headers with other packages), but it's done properly anyways: $ pkg-config --cflags wayland-client -I/usr/include/wayland Detection in vulkan is apparently broken. Doesn't it have --with-wayland=/usr/include/wayland or similar config option? regards, -- js suse labs
On 19. 10. 21, 7:15, Jiri Slaby wrote:
I don't know the reason (maybe potentially conflicting headers with other packages), but it's done properly anyways: $ pkg-config --cflags wayland-client -I/usr/include/wayland
cmake works with ECM too: $ cat CMakeLists.txt project(wayland-find-test) cmake_minimum_required(VERSION 3.21) find_package(ECM REQUIRED) ecm_use_find_modules(DIR ${CMAKE_BINARY_DIR}/cmake MODULES FindWayland.cmake NO_OVERRIDE) set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/cmake) find_package(Wayland REQUIRED COMPONENTS Client) message("Wayland headers found: " ${Wayland_INCLUDE_DIRS}) $ cmake . ... -- Found Wayland_Client: /usr/lib64/libwayland-client.so (found version "1.19.0") -- Found Wayland: /usr/lib64/libwayland-client.so (found version "1.19.0") found components: Client Wayland headers found: /usr/include/wayland -- Configuring done -- js suse labs
On 19. 10. 21, 7:33, Jiri Slaby wrote:
On 19. 10. 21, 7:15, Jiri Slaby wrote:
I don't know the reason (maybe potentially conflicting headers with other packages), but it's done properly anyways: $ pkg-config --cflags wayland-client -I/usr/include/wayland
cmake works with ECM too: $ cat CMakeLists.txt project(wayland-find-test) cmake_minimum_required(VERSION 3.21)
find_package(ECM REQUIRED) ecm_use_find_modules(DIR ${CMAKE_BINARY_DIR}/cmake MODULES FindWayland.cmake NO_OVERRIDE) set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/cmake)
find_package(Wayland REQUIRED COMPONENTS Client) message("Wayland headers found: " ${Wayland_INCLUDE_DIRS}) $ cmake . ... -- Found Wayland_Client: /usr/lib64/libwayland-client.so (found version "1.19.0") -- Found Wayland: /usr/lib64/libwayland-client.so (found version "1.19.0") found components: Client Wayland headers found: /usr/include/wayland -- Configuring done
On the top of that, detection in vulkan's cmake works too: $ cat CMakeLists.txt project(xyz) cmake_minimum_required(VERSION 3.21) include(/tmp/1.2.189.0/source/Vulkan-ValidationLayers/cmake/FindWayland.cmake) message("WAYLAND_CLIENT_INCLUDE_DIR=" ${WAYLAND_CLIENT_INCLUDE_DIR}) message("WAYLAND_SERVER_INCLUDE_DIR=" ${WAYLAND_SERVER_INCLUDE_DIR}) $ cmake . ... -- Found WAYLAND_CLIENT: /usr/lib64/libwayland-client.so -- Found WAYLAND_SERVER: /usr/lib64/libwayland-server.so -- Found WAYLAND_EGL: /usr/lib64/libwayland-egl.so -- Found WAYLAND_CURSOR: /usr/lib64/libwayland-cursor.so -- Found WAYLAND: /usr/lib64/libwayland-client.so;/usr/lib64/libwayland-server.so;/usr/lib64/libwayland-egl.so;/usr/lib64/libwayland-cursor.so WAYLAND_CLIENT_INCLUDE_DIR=/usr/include/wayland WAYLAND_SERVER_INCLUDE_DIR=/usr/include/wayland -- Configuring done -- Generating done So... what is the actual problem? -- js suse labs
В Вт, 19/10/2021 в 07:15 +0200, Jiri Slaby пишет:
On 19. 10. 21, 5:51, Dead Mozay wrote:
Hello everyone, Why are the header files in the openSUSE wayland- devel package packed in /usr/include/wayland and not /usr/include as provided by the developers? When building almost any package that requires wayland, an error occurs due to the fact that the header files are not located where they should be. Now ran into this error again, the system vulkan cannot find the header file wayland-client.h Because it looks for it along the path /usr/include/wayland-client.h, and in openSUSE it is located in the path /usr/include/wayland/wayland-client.h I've only seen such a solution in openSUSE, other distributions use default paths Was there any reason for this?
I don't know the reason (maybe potentially conflicting headers with other packages), but it's done properly anyways: $ pkg-config --cflags wayland-client -I/usr/include/wayland
Detection in vulkan is apparently broken. Doesn't it have --with-wayland=/usr/include/wayland or similar config option?
regards,
the problem is not only with vulkan, at the moment I am building the mangohud package which depends on the vulkan package, I get the error /usr/include/vulkan/vulkan.h:41:10: fatal error: wayland-client.h: No such file or directory It is possible that this is a developer's mistake, but I found the decision to move the header files into a separate subdirectory only in the openSUSE distribution, so the error is only with us this is not an isolated case, the maintainers have to constantly fix the paths to the wayland-client.h file, and other files from this package, this is a little annoying and not always easy to fix, The header files indicate #include <wayland-client.h> but not #include <wayland/wayland-client.h> no search in subdirectories is performed there is also a similar problem with the libxcbcommon package.
On 19. 10. 21, 7:46, Dead Mozay wrote:
The header files indicate #include <wayland-client.h> but not #include <wayland/wayland-client.h> no search in subdirectories is performed there is also a similar problem with the libxcbcommon package.
The projects only shall use standard ways to configure/find dependent libraries. That's all. wayland/ prefix is searched via -I compiler option. If they don't do it the right way, they should be fixed anyway as this is a call for future problems in any case. regards, -- js suse labs
On Tuesday 2021-10-19 05:51, Dead Mozay wrote:
Hello everyone, Why are the header files in the openSUSE wayland-devel package packed in /usr/include/wayland
On Tuesday 2021-10-19 08:56, Jan Engelhardt wrote:
On Tuesday 2021-10-19 05:51, Dead Mozay wrote:
Hello everyone, Why are the header files in the openSUSE wayland-devel package packed in /usr/include/wayland
I was contemplating whether a .pc file in the pkg-config heap of files was missing a dependency, because not always is it a case of configure.ac/cmakelists.txt missing some pkg-config call. It turned out not to be the case, though. Vulkan docs: """ The Vulkan API does not define any type of platform object. Platform-specific WSI extensions are defined, which contain platform-specific functions for using WSI. Use of these extensions is guarded by preprocessor symbols. • VK_USE_PLATFORM_ANDROID_KHR - Android • VK_USE_PLATFORM_MIR_KHR - Mir • VK_USE_PLATFORM_WAYLAND_KHR - Wayland [...] """ vulkan.h requests wayland-client.h if and only if a package's source code passed -DVK_USE_PLATFORM_WAYLAND_KHR on its own. Therefore, it also falls within the responsibility of the same package to lookup wayland-client via pkg-config. vulkan.pc is correct under the circumstances.
participants (3)
-
Dead Mozay
-
Jan Engelhardt
-
Jiri Slaby