microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.16k stars 6.39k forks source link

[sdl2] build failure #22931

Closed silent1603 closed 1 year ago

silent1603 commented 2 years ago

Host Environment

To Reproduce Steps to reproduce the behavior:

in cmake file:

find_package(SDL2 CONFIG REQUIRED) find_package(sdl2-image CONFIG REQUIRED) find_package(sdl2-mixer CONFIG REQUIRED) find_package(sdl2-ttf CONFIG REQUIRED) ...

target_link_libraries(TinySDL PRIVATE SDL2::SDL2 SDL2::SDL2main PRIVATE SDL2::SDL2_image PRIVATE SDL2::SDL2_mixer PRIVATE SDL2::SDL2_ttf )

if (MSVC)

elseif(UNIX AND NOT APPLE) target_link_libraries(TinySDL PRIVATE SDL2::SDL2-static Catch2::Catch2WithMain) endif()

Failure logs

Detecting compiler hash for triplet x64-linux... All requested packages are currently installed. Restored 0 packages from /home/vm/.cache/vcpkg/archives in 1.567 us. Use --debug to see more details.

Total elapsed time: 6.484 s

The package sdl2-image provides CMake targets:

find_package(sdl2-image CONFIG REQUIRED)
target_link_libraries(main PRIVATE SDL2::SDL2_image)

The package sdl2 provides CMake targets:

find_package(SDL2 CONFIG REQUIRED)
target_link_libraries(main PRIVATE SDL2::SDL2 SDL2::SDL2main SDL2::SDL2-static)

The package sdl2-mixer provides CMake targets:

find_package(sdl2-mixer CONFIG REQUIRED)
target_link_libraries(main PRIVATE SDL2::SDL2_mixer)

The package sdl2-ttf provides CMake targets:

find_package(sdl2-ttf CONFIG REQUIRED)
target_link_libraries(main PRIVATE SDL2::SDL2_ttf)

-- Running vcpkg install - done -- Configuring done -- Generating done -- Build files have been written to: /home/vm/TinySDL/build Consolidate compiler generated dependencies of target TinySDL [ 12%] Linking CXX executable ../release/TinySDL

/usr/bin/ld: vcpkg_installed/x64-linux/debug/lib/libSDL2d.a(SDL_waylandvideo.c.o): in function wl_display_get_registry': /home/vm/TinySDL/vcpkg/buildtrees/sdl2/x64-linux-dbg/wayland-generated-protocols/wayland-client-protocol.h:1052: undefined reference towl_proxy_marshal_flags' /usr/bin/ld: vcpkg_installed/x64-linux/debug/lib/libSDL2d.a(SDL_waylandvideo.c.o): in function wl_registry_bind': /home/vm/TinySDL/vcpkg/buildtrees/sdl2/x64-linux-dbg/wayland-generated-protocols/wayland-client-protocol.h:1165: undefined reference towl_proxy_marshal_flags' /usr/bin/ld: vcpkg_installed/x64-linux/debug/lib/libSDL2d.a(SDL_waylandvideo.c.o): in function xdg_wm_base_destroy': /home/vm/TinySDL/vcpkg/buildtrees/sdl2/x64-linux-dbg/wayland-generated-protocols/xdg-shell-client-protocol.h:464: undefined reference towl_proxy_marshal_flags' /usr/bin/ld: vcpkg_installed/x64-linux/debug/lib/libSDL2d.a(SDL_waylandvideo.c.o): in function xdg_wm_base_pong': /home/vm/TinySDL/vcpkg/buildtrees/sdl2/x64-linux-dbg/wayland-generated-protocols/xdg-shell-client-protocol.h:521: undefined reference towl_proxy_marshal_flags' /usr/bin/ld: vcpkg_installed/x64-linux/debug/lib/libSDL2d.a(SDL_waylandvideo.c.o): in function zxdg_decoration_manager_v1_destroy': /home/vm/TinySDL/vcpkg/buildtrees/sdl2/x64-linux-dbg/wayland-generated-protocols/xdg-decoration-unstable-v1-client-protocol.h:177: undefined reference towl_proxy_marshal_flags' /usr/bin/ld: vcpkg_installed/x64-linux/debug/lib/libSDL2d.a(SDL_waylandvideo.c.o):/home/vm/TinySDL/vcpkg/buildtrees/sdl2/x64-linux-dbg/wayland-generated-protocols/keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h:218: more undefined references to wl_proxy_marshal_flags' follow

i don't know how libSDL2d.a want to link wayland.

LilyWangLL commented 2 years ago

Thanks for posting this issue. This should be a upstream issue. There are similar issue on Upstream: https://github.com/libsdl-org/SDL/issues/5088, and issue on other branch: https://github.com/nesbox/TIC-80/issues/1769. Could you submit an issue to report this error on Upstream?

Thomas1664 commented 2 years ago

@silent1603 The sdl2 port has been updated and the upstream issue is closed. Does the issue still occur?

LilyWangLL commented 1 year ago

Thanks for posting this issue. Please reopen this issue if this is still a problem for you.