microsoft / vcpkg

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

[draco] Build error:x86-windows failed with: BUILD_FAILED #28070

Closed Salyourpal88 closed 1 year ago

Salyourpal88 commented 1 year ago

Package: draco[core]:x86-windows -> 1.5.3

Host Environment

To Reproduce

vcpkg install assimp

Failure logs

-- Note: draco only supports static library linkage. Building static library.
-- Downloading https://github.com/google/draco/archive/1.5.3.tar.gz -> google-draco-1.5.3.tar.gz...
-- Extracting source C:/Users/salva/vcpkg/downloads/google-draco-1.5.3.tar.gz
-- Applying patch fix-compile-error-uwp.patch
-- Applying patch fix-uwperror.patch
-- Applying patch disable-symlinks.patch
-- Using source at C:/Users/salva/vcpkg/buildtrees/draco/src/1.5.3-f6cecd9b35.clean
-- Found external ninja('1.11.0').
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Fixing pkgconfig file: C:/Users/salva/vcpkg/packages/draco_x86-windows/lib/pkgconfig/draco.pc
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst -> msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst...
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst...
-- Using msys root at C:/Users/salva/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Fixing pkgconfig file: C:/Users/salva/vcpkg/packages/draco_x86-windows/debug/lib/pkgconfig/draco.pc
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
    Command failed: C:/Users/salva/vcpkg/downloads/tools/powershell-core-7.3.0-windows/pwsh.exe -noprofile -executionpolicy Bypass -nologo -file C:/Users/salva/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/salva/vcpkg/packages/draco_x86-windows/tools/draco/draco_decoder.exe -installedDir C:/Users/salva/vcpkg/packages/draco_x86-windows/bin -verbose
    Working Directory: C:/Users/salva/vcpkg
    Error code: Access violation
    See logs for more information:
      C:\Users\salva\vcpkg\buildtrees\draco\copy-tool-dependencies-0-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_copy_tool_dependencies.cmake:9 (vcpkg_execute_required_process)
  scripts/cmake/vcpkg_copy_tool_dependencies.cmake:41 (z_vcpkg_copy_tool_dependencies_search)
  scripts/cmake/vcpkg_copy_tools.cmake:48 (vcpkg_copy_tool_dependencies)
  ports/draco/portfile.cmake:25 (vcpkg_copy_tools)
  scripts/ports.cmake:147 (include)
C:\Users\salva\vcpkg\buildtrees\draco\copy-tool-dependencies-0-err.log ``` Fatal error. 0xC0000005 at System.Management.Automation.Security.SystemPolicy+WldpNativeMethods.WldpCanExecuteFile(System.Guid, WLDP_EXECUTION_EVALUATION_OPTIONS, IntPtr, System.String, WLDP_EXECUTION_POLICY ByRef) at System.Management.Automation.Security.SystemPolicy.GetFilePolicyEnforcement(System.String, System.IO.FileStream) at System.Management.Automation.ExternalScriptInfo.ReadScriptContents() at System.Management.Automation.Language.Parser.ParseFile(System.String, System.Management.Automation.Language.Token[] ByRef, System.Management.Automation.Language.ParseError[] ByRef) at Microsoft.PowerShell.ConsoleHost.DoRunspaceInitialization(Microsoft.PowerShell.RunspaceCreationEventArgs) at Microsoft.PowerShell.ConsoleHost.DoCreateRunspace(Microsoft.PowerShell.RunspaceCreationEventArgs) at Microsoft.PowerShell.ConsoleHost.CreateRunspace(Microsoft.PowerShell.RunspaceCreationEventArgs) at Microsoft.PowerShell.ConsoleHost.DoRunspaceLoop(System.String, Boolean, System.Collections.ObjectModel.Collection`1, Boolean, System.String, System.String) at Microsoft.PowerShell.ConsoleHost.Run(Microsoft.PowerShell.CommandLineParameterParser, Boolean) at Microsoft.PowerShell.ConsoleHost.Start(System.String, System.String, Boolean) at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String[], Int32) at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[]) ```

Additional context

I tried updating the Powershell version to 7.2.6.0 thinking it would resolve the access violation, but sadly it didn't.

Salyourpal88 commented 1 year ago

I tried updating the Powershell version to 7.2.7.0 after reading some more discussions, but still no luck

Salyourpal88 commented 1 year ago

I edit this file vcpkg/scripts/vcpkgTools.xml and downgrade the powershell to 7.2.6. I didn't get an error after but I got this:

Elapsed time to handle assimp:x86-windows: 3.079 min Total install time: 4.908 min assimp provides CMake targets:

# this is heuristically generated, and may not be correct
find_package(assimp CONFIG REQUIRED)
target_link_libraries(main PRIVATE assimp::assimp)
Salyourpal88 commented 1 year ago

Can someone explains what that means? What must I do to make this right:

this is heuristically generated, and may not be correct

find_package(assimp CONFIG REQUIRED) target_link_libraries(main PRIVATE assimp::assimp)

because when I go to include the folder it isn't right

Adela0814 commented 1 year ago

This is the usage provided by the port, you can use this in your CMake project to link and use the installed library. I tried it locally and it works fine, can you provide your simple CMake project?

Salyourpal88 commented 1 year ago

I made my project a non-make and have no clue to how to adjust. I guess there is no more issues. I just need to figure that out. Thank you for your time.