Comments (4)
I tried pulling your branch and building, and at least cargo vcpkg --verbose build
seems to pass on first try locally:
C:\Users\mike\Windows-Code\joy [master ≡]> cargo build --verbose build --manifest-path .\gyromouse\Cargo.toml
error: Found argument 'build' which wasn't expected, or isn't valid in this context
USAGE:
cargo.exe build --verbose
For more information try --help
C:\Users\mike\Windows-Code\joy [master ≡]> cargo vcpkg --verbose build --manifest-path .\gyromouse\Cargo.toml
vcpkg root is C:\Users\mike\Windows-Code\joy\target\vcpkg
Cloning https://github.com/microsoft/vcpkg
Cloning into 'C:\Users\mike\Windows-Code\joy\target\vcpkg'...
remote: Enumerating objects: 116782, done.
remote: Counting objects: 100% (337/337), done.
remote: Compressing objects: 100% (189/189), done.
remote: Total 116782 (delta 203), reused 232 (delta 148), pack-reused 116445
Receiving objects: 100% (116782/116782), 37.00 MiB | 11.70 MiB/s, done.
Resolving deltas: 100% (72531/72531), done.
Updating files: 100% (7887/7887), done.
Checkout rev a267ab118c09f56f3dae96c9a4b3410820ad2f0b
Note: switching to 'a267ab118c09f56f3dae96c9a4b3410820ad2f0b'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at a267ab118 [ffmpeg] add -fPIC (#17298)
Compiling vcpkg
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2021-02-24-d67989bce1043b98092ac45996a8230a059a2d7e/vcpkg.exe -> C:\Users\mike\Windo
ws-Code\joy\target\vcpkg/vcpkg.exe
Done.
Installing sdl2
Computing installation plan...
A suitable version of cmake was not found (required v3.19.2). Downloading portable cmake v3.19.2...
Downloading cmake...
https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-win32-x86.zip -> C:\Users\mike\Windows-Code\joy\target\vcpkg\downloads\cmake-3.1
9.2-win32-x86.zip
Extracting cmake...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> C:\Users\mike\Windows-Code\joy\target\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
A suitable version of nuget was not found (required v5.5.1). Downloading portable nuget v5.5.1...
Downloading nuget...
https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe -> C:\Users\mike\Windows-Code\joy\target\vcpkg\downloads\22ea847d-nuget.exe
The following packages will be built and installed:
sdl2[core]:x64-windows-static-md -> 2.0.14#4
Detecting compiler hash for triplet x64-windows-static-md...
Could not locate cached archive: C:\Users\mike\AppData\Local\vcpkg\archives\b6\b62a282fa0e5d683a2e2b6526ba3f94eaa096b50.zip
Compiling sdl2 (triplet x64-windows-static-md)
Starting package 1/1: sdl2:x64-windows-static-md
Building package sdl2[core]:x64-windows-static-md...
-- Using community triplet x64-windows-static-md. This triplet configuration is not guaranteed to succeed.
-- [COMMUNITY] Loading triplet configuration from: C:\Users\mike\Windows-Code\joy\target\vcpkg\triplets\community\x64-windows-static-md.cmake
-- Downloading https://www.libsdl.org/release/SDL2-2.0.14.tar.gz -> SDL2-2.0.14.tar.gz...
-- Extracting source C:/Users/mike/Windows-Code/joy/target/vcpkg/downloads/SDL2-2.0.14.tar.gz
-- Applying patch 0001-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch
-- Applying patch 0002-sdl2-skip-ibus-on-linux.patch
-- Applying patch 0003-sdl2-fix-uwp-build.patch
-- Applying patch 0004-sdl2-macos-thread-detection-fix.patch
-- Using source at C:/Users/mike/Windows-Code/joy/target/vcpkg/buildtrees/sdl2/src/SDL2-2-7c9b885cf4.clean
-- Found external ninja('1.10.2').
-- Configuring x64-windows-static-md
-- Building x64-windows-static-md-dbg
-- Building x64-windows-static-md-rel
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-2-any.pkg.tar.zst -> msys-mingw-w64-i686-pkg-config-0.29.2-2-any.pkg.tar.zst..
.
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git
-8.0.0.5906.c9a21571-1-any.pkg.tar.zst...
-- Using msys root at C:/Users/mike/Windows-Code/joy/target/vcpkg/downloads/tools/msys2/50864d9fae363d6e
-- Fixing pkgconfig file: C:/Users/mike/Windows-Code/joy/target/vcpkg/packages/sdl2_x64-windows-static-md/lib/pkgconfig/sdl2.pc
-- Fixing pkgconfig file: C:/Users/mike/Windows-Code/joy/target/vcpkg/packages/sdl2_x64-windows-static-md/debug/lib/pkgconfig/sdl2.pc
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\mike\AppData\Local\vcpkg\archives\b6\b62a282fa0e5d683a2e2b6526ba3f94eaa096b50.zip
Building package sdl2[core]:x64-windows-static-md... done
Installing package sdl2[core]:x64-windows-static-md...
Installing package sdl2[core]:x64-windows-static-md... done
Elapsed time for package sdl2:x64-windows-static-md: 21.96 s
Total elapsed time: 24.98 s
The package sdl2:x64-windows-static-md provides CMake targets:
find_package(SDL2 CONFIG REQUIRED)
target_link_libraries(main PRIVATE SDL2::SDL2main SDL2::SDL2-static)
Finished in 58.62s
Could it be that the target
in your actions/cache@v2
section is interfering with the build? ./target/vcpkg
is where the vcpkg tree winds up by default and it may not like the cached artifacts it finds.
from cargo-vcpkg.
Hmm noticed there is no cache hit in your CI. I think that rules that idea out. 🤔
from cargo-vcpkg.
Hmm. I think something is wrong with vcpkg at that commit.
I tried instrumenting cargo-vcpkg
to see if I could get more data out of the windows-latest
workflow run, but couldn't find any more information as to why the underlying vcpkg.exe install
is failing.
I tried updating the vcpkg pointer to top-of-tree as follows
--- a/gyromouse/Cargo.toml
+++ b/gyromouse/Cargo.toml
@@ -30,7 +30,7 @@ default-features = false
[package.metadata.vcpkg]
dependencies = ["sdl2"]
git = "https://github.com/microsoft/vcpkg"
-rev = "a267ab118c09f56f3dae96c9a4b3410820ad2f0b"
+rev = "261c458af6e3eed5d099144aff95d2b5035f656b"
[package.metadata.vcpkg.target]
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" }
and now it seems to work 🤷♂️ ?
It was me that picked out that pointer (a267ab118
) last for rust-sdl2
, which is probably where it was copied from. It was arbitrarily the top-of-tree when I picked it that allowed that project to move past various link issues. Seemed to work fine for the CI testing, though I'm guessing something has changed in windows-latest (maybe the version of cmake installed?). Not quite sure.
Probably best to just update the pointer.
from cargo-vcpkg.
That was it, the latest commit fixes the problem. Thanks for the PR!
from cargo-vcpkg.
Related Issues (17)
- Allow reading metadata from workspace Cargo.toml also
- Miss-use of the local cache when switching upstream URL. HOT 2
- cargo vcpkg build fails if `vcpkg.json` file is present as well HOT 1
- `rev_tag_branch` Error handler HOT 1
- Better error reporting HOT 1
- Add ability to enable features on vcpkg packages? HOT 1
- "cargo-vcpkg: failed" on brotli HOT 7
- How to use cargo-vcpkg inside library project HOT 1
- Build Errors due to HTTP response code being errors HOT 4
- Use this repo to release from so that new packages may be used HOT 1
- Is this project abandoned? HOT 3
- cargo vcpkg build command errors out
- Building project throws wayland error
- allow skipping building debug builds in vcpkg tree HOT 1
- Any way to speed up builds on Windows? HOT 13
- Please tag e63a815 as `cargo-vcpkg-0.1.6` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-vcpkg.