Host Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install sdl2
Failure logs
โฏ ./vcpkg install sdl2
Computing installation plan...
The following packages will be built and installed:
sdl2[core]:x64-linux
Detecting compiler hash for triplet x64-linux...
Starting package 1/1: sdl2:x64-linux
Building package sdl2[core]:x64-linux...
Could not locate cached archive: /home/valery/.cache/vcpkg/archives/87/8738f4b0449a6e21fc5ff8150723d20ea0a0841e.zip
-- Downloading https://www.libsdl.org/release/SDL2-2.0.12.tar.gz...
-- Extracting source /home/valery/Cache/vcpkg/downloads/SDL2-2.0.12.tar.gz
-- Applying patch export-symbols-only-in-shared-build.patch
-- Applying patch enable-winrt-cmake.patch
-- Applying patch disable-hidapi-for-uwp.patch
-- Applying patch fix-space-in-path.patch
-- Applying patch disable-wcslcpy-and-wcslcat-for-windows.patch
-- Applying patch fix-EventToken-header-reference.patch
-- Applying patch 0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch
-- Using source at /home/valery/Cache/vcpkg/buildtrees/sdl2/src/SDL2-2-ac07e8117e.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Fixing pkgconfig file: /home/valery/Cache/vcpkg/packages/sdl2_x64-linux/lib/pkgconfig/sdl2.pc
-- CHECK_LIB_dbus-1_RELEASE:CHECK_LIB_dbus-1_RELEASE-NOTFOUND
CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:232 (message):
Library "dbus-1" was not found! If it is a system library use the
SYSTEM_LIBRARIES parameter for the vcpkg_fixup_pkgconfig call! Otherwise,
correct the *.pc file
Call Stack (most recent call first):
scripts/cmake/vcpkg_fixup_pkgconfig.cmake:298 (vcpkg_fixup_pkgconfig_check_files)
ports/sdl2/portfile.cmake:97 (vcpkg_fixup_pkgconfig)
scripts/ports.cmake:79 (include)
Error: Building package sdl2:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: sdl2:x64-linux
Vcpkg version: 2020.06.15-unknownhash
But dbus-1 installed:
S | Name | Summary | Type
--+-------------------------+-------------------------------------------+--------
i | dbus-1 | D-Bus Message Bus System | package
i | dbus-1-devel | Developer package for D-Bus | package
| dbus-1-devel-32bit | Developer package for D-Bus | package
| dbus-1-devel-doc | Developer documentation package for D-Bus | package
i | dbus-1-glib | GLib-based library for using D-Bus | package
| dbus-1-glib-32bit | GLib-based library for using D-Bus | package
i | dbus-1-glib-devel | Developer package for D-Bus/GLib bindings | package
| dbus-1-glib-devel-32bit | Developer package for D-Bus/GLib bindings | package
| dbus-1-glib-doc | Documentation for the D-Bus/GLib bindings | package
i | dbus-1-glib-tool | Tool package for D-Bus/GLib bindings | package
| dbus-1-mono | Mono Bindings for D-Bus | package
i | dbus-1-x11 | D-Bus Message Bus System | package
i | libdbus-1-3 | Library package for D-Bus | package
i | libdbus-1-3-32bit | Library package for D-Bus | package
@Neumann-A Could you please take a look?
Thanks.
@JackBoosY: Seems like SDL has a dependency on dbus somewhere so that must be declared as a system libraries in vcpkg_fixup_pkgconfig for now
That was very strange for me, but when I launched ./vcpkg install sdl2 from a console with an active conda environment, everything installed correctly.
I am currently running into this exact issue also
@gdxn96 You may install anaconda and activate base environment. And then execute ./vcpkg install sdl2 from it.
Installed conda, activated base environment, ran again, same result @48d90782
Is there a way I can fix this locally before vcpkg is properly fixed?
Add SYSTEM_LIBRARIES dbus-1 to https://github.com/microsoft/vcpkg/blob/85247c398141ab4d692b8fd61dbfcb845e79d2f2/ports/sdl2/portfile.cmake#L97
I had this issue last week (#13187) and wound up uninstalling the packages from Ubuntu that were erroring, as suggested in the thread. That said, I'm not sure why it suddenly started happening.
I have come across this same issue and confirm that adding "SYSTEM_LIBRARIES dbus-1" to the sdl2 portfile as @JackBoosY suggested has fixed this issue for me.
I ran into the same issue as above with a bunch of other libs. Adding them to the portfile in the same way @JackBoosY did fixed it for me. I made a PR to add the ones I found were missing if that helps #13551
@gdxn96 The patch has been merged in master, please update vcpkg and retry.
Yes, the patch fixes dbus-1, but then continues to fail on other system libs
@gdxn96 could you provide the other system libs names?
They're in the PR I linked above glib-2.0 gobject-2.0 gio-2.0 ibus-1.0 https://github.com/microsoft/vcpkg/pull/13551
Most helpful comment
Add
SYSTEM_LIBRARIES dbus-1to https://github.com/microsoft/vcpkg/blob/85247c398141ab4d692b8fd61dbfcb845e79d2f2/ports/sdl2/portfile.cmake#L97