CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.61k stars 4.17k forks source link

Compilation failed on Windows with MSVC and vcpkg - sdl2-mixer dependency is not being installed #64619

Closed Bbansjkl closed 1 year ago

Bbansjkl commented 1 year ago

Describe the bug

I tried to follow the compilation guide on for MSVC and vcpkg on Windows and am getting an error on the step where I build for the first time:

Erstellen gestartet...
[...]

2>------ Erstellen gestartet: Projekt: Cataclysm-lib-vcpkg-static, Konfiguration: Release x64 ------
2>Installing vcpkg dependencies to C:\Projekte\Cataclysm-DDA\msvc-full-features\vcpkg_installed\x64-windows-static\
2>"C:\Projekte\vcpkg\vcpkg.exe" install "--host-triplet=x64-windows-static" --x-wait-for-lock --triplet "x64-windows-static" --vcpkg-root "C:\Projekte\vcpkg\\" "--x-manifest-root=C:\Projekte\Cataclysm-DDA\msvc-full-features\\" "--x-install-root=C:\Projekte\Cataclysm-DDA\msvc-full-features\vcpkg_installed\x64-windows-static\\" --clean-after-build
2>Warnung: Das Einbetten von "vcpkg-configuration" in eine Manifestdatei ist ein EXPERIMENTELLEs Feature.
2>Fehler: sdl2-mixer:x64-windows-static@2.6.3#1 verf├╝gt nicht ├╝ber das erforderliche Feature libvorbis
2>C:\Projekte\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets(183,5): error MSB3073: Der Befehl ""C:\Projekte\vcpkg\vcpkg.exe" install "--host-triplet=x64-windows-static" --x-wait-for-lock --triplet "x64-windows-static" --vcpkg-root "C:\Projekte\vcpkg\\" "--x-manifest-root=C:\Projekte\Cataclysm-DDA\msvc-full-features\\" "--x-install-root=C:\Projekte\Cataclysm-DDA\msvc-full-features\vcpkg_installed\x64-windows-static\\" --clean-after-build" wurde mit dem Code 1 beendet.
2>Die Erstellung des Projekts "Cataclysm-lib-vcpkg-static.vcxproj" ist abgeschlossen -- FEHLER.

[...]

English translation of the error would be something like "Error: sdl2-mixer:x64-windows-static@2.6.3#1 does not contain/support the required feature libvorbis"

I followed the previous steps in the guide to the letter and already tried to reinstall vcpkg, and to check out this repo once more. Didn't fix it.

Not sure if the compilation guide is missing something or if I made an error anywhere, as this would be my first time working with vcpkg.

Attach save file

N/A

Steps to reproduce

  1. clean install of vcpkg
  2. clean clone of this repo
  3. attempt to build the project

Expected behavior

Compilation should succeed after following the compilation guide's steps.

Screenshots

No response

Versions and configuration

Windows version: Windows 10 21H2
Visual Studio version: 2019, 16.11.25

Additional context

No response

irwiss commented 1 year ago

Try using the exact commit from the docs for vcpkg 12b7cfe6109a9d68319334b56a01c44a302a13b6 - HEAD errored out on vorbis for me a while ago

Bbansjkl commented 1 year ago

Try using the exact commit from the docs for vcpkg 12b7cfe6109a9d68319334b56a01c44a302a13b6 - HEAD errored out on vorbis for me a while ago

That worked, thanks! Might it be worthwhile to note that on the compilation guide?

PatrikLundell commented 1 year ago

Yes, it would definitely be useful to have instructions on how to update vcpkg in the compilation guide (as well as information that it may need to be updated if a newer version of CDDA won't compile).

ZhilkinSerg commented 1 year ago

Yes, it would definitely be useful to have instructions on how to update vcpkg in the compilation guide (as well as information that it may need to be updated if a newer version of CDDA won't compile).

Detailed instructions on how to work vcpkg should go into vcpkg repo. We already provide step-by-step guide with the list of commands that is enough to install vcpkg and compile CDDA under normal circumstances. It is possible that something would be broken in vcpkg repo that would cause some issue using our guide, but we just can't cover every possible situation.

PatrikLundell commented 1 year ago

The thing is that things break down from time to time because CDDA shifts to a newer vcpkg version. Fistly, it's not clear why things suddenly don't work, and secondly, the instructions for installation of vcpkg are not useful for updating it (unless you remove vcpkg completely first, I guess).

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.