RetroPie / EmulationStation

A Fork of Emulation Station for RetroPie. Emulation Station is a flexible emulator front-end supporting keyboardless navigation and custom system themes.
Other
858 stars 344 forks source link

Build error on x86-windows-static-md #868

Closed julianoBRL closed 6 months ago

julianoBRL commented 6 months ago

I'm following the windows tutorial

My computer: 32 RAM Intel(R) Core(TM) i3-9100F CPU @ 3.60GHz 3.60 GHz RTX 4060 + GTX 1050 TI

Command i'm trying to use: .\vcpkg\vcpkg install curl:x86-windows-static-md

Similar errors happends with:

.\vcpkg\vcpkg install freeimage:x86-windows-static-md
.\vcpkg\vcpkg install sdl2:x86-windows-static-md

freetype and rapidjson download fine.

Logs: config-x86-windows-out.log config-x86-windows-rel-CMakeCache.txt.log config-x86-windows-dbg-CMakeCache.txt.log

Error:

Computing installation plan...
The following packages will be built and installed:
    curl[core,non-http,schannel,ssl,sspi]:x86-windows-static-md@8.6.0
Detecting compiler hash for triplet x86-windows-static-md...
Restored 0 package(s) from C:\Users\julia\AppData\Local\vcpkg\archives in 147 us. Use --debug to see more details.
Installing 1/1 curl[core,non-http,schannel,ssl,sspi]:x86-windows-static-md@8.6.0...
Building curl[core,non-http,schannel,ssl,sspi]:x86-windows-static-md@8.6.0...
warning: -- Using community triplet x86-windows-static-md. This triplet configuration is not guaranteed to succeed.
-- [COMMUNITY] Loading triplet configuration from: D:\Projetos\C#\RetroStation\vcpkg\triplets\community\x86-windows-static-md.cmake
-- Using cached curl-curl-curl-8_6_0.tar.gz.
-- Cleaning sources at D:/Projetos/C#/RetroStation/vcpkg/buildtrees/curl/src/curl-8_6_0-f17d00bdb6.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/Projetos/C#/RetroStation/vcpkg/downloads/curl-curl-curl-8_6_0.tar.gz
-- Applying patch 0002_fix_uwp.patch
-- Applying patch 0005_remove_imp_suffix.patch
-- Applying patch 0012-fix-dependency-idn2.patch
-- Applying patch 0020-fix-pc-file.patch
-- Applying patch 0022-deduplicate-libs.patch
-- Applying patch mbedtls-ws2_32.patch
-- Applying patch export-components.patch
-- Applying patch dependencies.patch
-- Applying patch cmake-config.patch
-- Using source at D:/Projetos/C#/RetroStation/vcpkg/buildtrees/curl/src/curl-8_6_0-f17d00bdb6.clean
-- Found external ninja('1.11.0').
-- Configuring x86-windows-static-md
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v
    Working Directory: D:/Projetos/C#/RetroStation/vcpkg/buildtrees/curl/x86-windows-static-md-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      D:\Projetos\C#\RetroStation\vcpkg\buildtrees\curl\config-x86-windows-static-md-dbg-CMakeCache.txt.log
      D:\Projetos\C#\RetroStation\vcpkg\buildtrees\curl\config-x86-windows-static-md-rel-CMakeCache.txt.log
      D:\Projetos\C#\RetroStation\vcpkg\buildtrees\curl\config-x86-windows-static-md-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:252 (vcpkg_execute_required_process)
  ports/curl/portfile.cmake:67 (vcpkg_cmake_configure)
  scripts/ports.cmake:175 (include)

error: building curl:x86-windows-static-md failed with: BUILD_FAILED
Elapsed time to handle curl:x86-windows-static-md: 23 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+curl
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[curl]+Build+error+on+x86-windows-static-md&body=Copy+issue+body+from+D%3A%2FProjetos%2FC%23%2FRetroStation%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
cmitu commented 6 months ago

The build failure seems to be related to vcpkg, not EmulationStation. If you already opened an issue at https://github.com/microsoft/vcpkg/issues/37397, why open another issue here ? Also, there's a warning at the beginning of the build:

warning: -- Using community triplet x86-windows-static-md. This triplet configuration is not guaranteed to succeed.

Did you try with building with the non-static variant ? Can you attach the vcpkg logs mentioned in the error message (here or in the upstream issue) ?

julianoBRL commented 6 months ago

@cmitu i wasnt sure if it is related to ES(deprecated command or version) or VCPKG and since i'm following RetroPie/EmulationStation tutorial I thought it was a good ideia to post here too. yes i tryed with .\vcpkg\vcpkg install curl:x86-windows and .\vcpkg\vcpkg install curl:x64-windows and .\vcpkg\vcpkg install curl same erros. i posted the pastebin to the logs

julianoBRL commented 6 months ago

okay StarGate-One responded, vcpkg dont like special characters in the folders names, it resolved almost all of them excerpt .\vcpkg\vcpkg install freeimage:x86-windows-static-md config-x86-windows-static-md-dbg-CMakeCache.txt.log config-x86-windows-static-md-rel-CMakeCache.txt.log config-x86-windows-static-md-out.log the problem is the CMake version this time?

cmitu commented 6 months ago

The error seems to come from the vcpkg recipe, not related to cmake version

...
CMake Error at D:/Projetos/RetroPie/vcpkg/installed/x86-windows-static-md/share/openexr/OpenEXRTargets.cmake:101 (set_target_properties): The link interface of target "OpenEXR::OpenEXRCore" contains:

   libdeflate::libdeflate_static

 but the target was not found.  Possible reasons include:

  * There is a typo in the target name.
  * A find_package call is missing for an IMPORTED target.
  * An ALIAS target is missing.

Related vcpkg issue - https://github.com/microsoft/vcpkg/issues/37394.

cmitu commented 6 months ago

Related vcpkg issue - microsoft/vcpkg#37394.

@julianoBRL since the issue above is now fixed in vcpkg, does it fix the error encountered during the freeimage installation ?

julianoBRL commented 6 months ago

@cmitu yeah i added find_dependency(libdeflate REQUIRED) in the file OpenEXRConfig.cmake manually and it resolved, thank you for everything.