Building issue
Adraesh opened this issue ยท 13 comments
I am trying to build the solution using VS 2017, it looks like I have an issue. Bellow the output:
1>------ Build started: Project: libMinHook, Configuration: Release Win32 ------
2>------ Build started: Project: _build, Configuration: Release Any CPU ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141_xp\Toolset.targets(39,5): warning MSB8051: Support for targeting Windows XP is deprecated and will not be present in future releases of Visual Studio. Please see https://go.microsoft.com/fwlink/?linkid=2023588 for more information.
2>Build.cs(19,18,19,33): warning CS0114: 'Build.SourceDirectory' hides inherited member 'NukeBuild.SourceDirectory'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
2>Build.cs(20,18,20,36): warning CS0114: 'Build.ArtifactsDirectory' hides inherited member 'NukeBuild.ArtifactsDirectory'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
1>buffer.c
1>hde32.c
1>hook.c
1>trampoline.c
2>_build -> C:\Users\user\Downloads\Indicium-Supra-master\build\bin\Release\_build.dll
2>Done building project "_build.csproj".
1>libMinHook.vcxproj -> C:\Users\user\Downloads\Indicium-Supra-master\lib\Release\libMinHook.x86.lib
1>Done building project "libMinHook.vcxproj".
3>------ Build started: Project: Indicium-Supra, Configuration: Release Win32 ------
3>Running vcpkg...
3>The following packages will be built and installed:
3> * expat[core]:x86-windows-static
3> * pcre[core]:x86-windows-static
3> poco[core]:x86-windows-static
3> * sqlite3[core]:x86-windows-static
3> * zlib[core]:x86-windows-static
3>Additional packages (*) will be modified to complete this operation.
3>Starting package 1/5: sqlite3:x86-windows-static
3>Building package sqlite3[core]:x86-windows-static...
3>A suitable version of cmake was not found (required v3.11.4). Downloading portable cmake v3.11.4...
3>Extracting cmake...
3>A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
3>Downloading 7zip...
3>File does not have the expected hash:
3> url : [ https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 ]
3> File path : [ C:\Users\user\Downloads\Indicium-Supra-master\packages\Vcpkg.Nuget.1.5.0\vcpkg_bin\downloads\7-zip.commandline.18.1.0.nupkg.part ]
3> Expected hash : [ 8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8 ]
3> Actual hash : [ a9dfaaafd15d98a2ac83682867ec5766720acf6e99d40d1a00d480692752603bf3f3742623f0ea85647a92374df405f331afd6021c5cf36af43ee8db198129c0 ]
3>
3>C:\Users\user\Downloads\Indicium-Supra-master\packages\Vcpkg.Nuget.1.5.0\build\Vcpkg.Nuget.props(13,5): error MSB6006: "Vcpkg" exited with code 1.
3>Done building project "Indicium-Supra.vcxproj" -- FAILED.
4>------ Build started: Project: Indicium-FW1FontWrapper, Configuration: Release Win32 ------
5>------ Build started: Project: Indicium-ImGui, Configuration: Release Win32 ------
5>Running vcpkg...
4>dllmain.cpp
5>The following packages will be built and installed:
5> * expat[core]:x86-windows-static
5> * pcre[core]:x86-windows-static
5> poco[core]:x86-windows-static
5> * sqlite3[core]:x86-windows-static
5> * zlib[core]:x86-windows-static
5>Additional packages (*) will be modified to complete this operation.
5>Starting package 1/5: sqlite3:x86-windows-static
5>Building package sqlite3[core]:x86-windows-static...
5>A suitable version of cmake was not found (required v3.11.4). Downloading portable cmake v3.11.4...
5>Extracting cmake...
5>A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
5>Downloading 7zip...
5>File does not have the expected hash:
5> url : [ https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 ]
5> File path : [ C:\Users\user\Downloads\Indicium-Supra-master\packages\Vcpkg.Nuget.1.5.0\vcpkg_bin\downloads\7-zip.commandline.18.1.0.nupkg.part ]
5> Expected hash : [ 8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8 ]
5> Actual hash : [ a9dfaaafd15d98a2ac83682867ec5766720acf6e99d40d1a00d480692752603bf3f3742623f0ea85647a92374df405f331afd6021c5cf36af43ee8db198129c0 ]
5>
5>C:\Users\user\Downloads\Indicium-Supra-master\packages\Vcpkg.Nuget.1.5.0\build\Vcpkg.Nuget.props(13,5): error MSB6006: "Vcpkg" exited with code 1.
5>Done building project "Indicium-ImGui.vcxproj" -- FAILED.
4>LINK : fatal error LNK1181: cannot open input file 'C:\Users\user\Downloads\Indicium-Supra-master\bin\x86\Indicium-Supra.lib'
4>Done building project "Indicium-FW1FontWrapper.vcxproj" -- FAILED.
========== Build: 2 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
Thanks in advance!
It seems that the compilation failed using this cmake version?
1>C:\Users\user\Downloads\Indicium-Supra-master\packages\Vcpkg.Nuget.1.5.0\build\Vcpkg.Nuget.props(13,5): error MSB6006: "Vcpkg" exited with code 1.
Well it seems that the issue is related to VCPKG and the hash returned by 7zip and cmake. It's obviously a known issue: microsoft/vcpkg#4663
Meh, you're right, it is. Unfortunately the vcpkg binary in the NuGet is a bit dated, gonna have a chat wit the author or provide my own package. I deleted my local cache and it fails now as well:
1>------ Build started: Project: Indicium-Supra, Configuration: Release x64 ------
1>Running vcpkg...
1>Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
1>The following packages will be built and installed:
1> * expat[core]:x64-windows-static
1> * pcre[core]:x64-windows-static
1> poco[core]:x64-windows-static
1> * sqlite3[core]:x64-windows-static
1> * zlib[core]:x64-windows-static
1>Additional packages (*) will be modified to complete this operation.
1>Starting package 1/5: sqlite3:x64-windows-static
1>Building package sqlite3[core]:x64-windows-static...
1>A suitable version of cmake was not found (required v3.11.4). Downloading portable cmake v3.11.4...
1>Downloading cmake...
1>Downloading cmake... done.
1>Extracting cmake...
1>A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
1>Downloading 7zip...
1>File does not have the expected hash:
1> url : [ https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 ]
1> File path : [ D:\Development\GitHub\Indicium-Supra\packages\Vcpkg.Nuget.1.5.0\vcpkg_bin\downloads\7-zip.commandline.18.1.0.nupkg.part ]
1> Expected hash : [ 8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8 ]
1> Actual hash : [ a9dfaaafd15d98a2ac83682867ec5766720acf6e99d40d1a00d480692752603bf3f3742623f0ea85647a92374df405f331afd6021c5cf36af43ee8db198129c0 ]
1>
1>D:\Development\GitHub\Indicium-Supra\packages\Vcpkg.Nuget.1.5.0\build\Vcpkg.Nuget.props(13,5): error MSB6006: "Vcpkg" exited with code 1.
1>Done building project "Indicium-Supra.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
As a quick workaround, you could remove the Vcpkg NuGet and install the dependencies manually.
Well to make it work what I did:
1 - Clone your project
2 - Launch VS and update nuget vcpkg to 1.50
3 - Clone the official vcpkg source code
4 - Copy/Paste everything from official vcpkg source code to project/packages/Vcpkg.Nuget.1.5.0/vcpkg_bin/
5 - Start Powershell
6 - Go to project/packages/Vcpkg.Nuget.1.5.0/vcpkg_bin/
7 - launch bootstrap-vcpkg.bat to recompile vcpkg.exe
8 - restart VS
But if you can tell me how to remove the nuget package dependency and target directly wherever I put the official vcpkg sources, it would be awesome :)
I did it likewise but instead of copying gigabytes of build artifacts I made a symlink to my "main" vcpkg folder ๐
Once cloned just edit the project's nuget packages and kick it:
Then simply follow the official quick start and bootstrap vcpkg somewhere else on the disk. Then install the dependencies by hand:
.\vcpkg.exe install poco:x64-windows-static
.\vcpkg.exe install poco:x86-windows-static
You should then be able to build the solution without any issues.
Did u managed to
.\vcpkg.exe install poco:x64-windows-static
.\vcpkg.exe install poco:x86-windows-static
because I get an: WinHttpSendRequest() failed: 12007
EDIT: Ok https://www.nuget.org/ is down :D
Fabulous timing ๐
Hi guys,
A quick note if you are going to update the project to fit with VCPKG 1.50, I also noticed that if we upgrade Nuke.Common to v0.12.0 the _build project will not "build" anymore due to SolutionFile and Configuration variable in build.cs not recognized anymore.
Best.
Hey! Damn issue reference auto-closed it ๐
@Adraesh fixed nuke as well. You're welcome to test. I recommend you delete the packages
folder and the vcpkg directory in %userprofile%\.nuget\packages
just to make sure you are on the latest of the greatest ๐
Hi!
It's working perfectly, well done!
Perfect!