Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo vcpkg build fails if vcpkg.json file is present as well #11

Open
SwishSwushPow opened this issue Aug 17, 2021 · 1 comment
Open

Comments

@SwishSwushPow
Copy link

SwishSwushPow commented Aug 17, 2021

Edit: Of course I find the reason for it as soon as I open an issue. When a vcpkg.json file is present in the same folder as the Cargo.toml, the cargo vcpkg build process fails. I just renamed the manifest file to _vcpkg.json and now the command runs through without issue. I've updated the issue title to reflect this. Maybe it's worth to discuss this behavior.

Hey everyone 👋
I wanted to try out cargo vcpkg yet I fail to get it working with a small example project. I get the following output:

cargo vcpkg build
     Cloning https://github.com/microsoft/vcpkg
    Checkout branch master
     Pulling branch master
   Compiling vcpkg
  Installing sqlite3
-- stdout --

-- stderr --

cargo-vcpkg: failed

This is my Cargo.toml:

[package]
name = "vcpkg_sqlite3"
version = "0.1.0"
edition = "2018"

[build-dependencies]
vcpkg = { git = "https://github.com/GiGainfosystems/vcpkg-rs", branch = "manifest-mode" }

[dependencies]
rusqlite = "0.25.3"

[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
branch = "master"
dependencies = ["sqlite3"]

I am on macOS Big Sur (11.5.2) and I can try to provide information that could also be helpful.

Best regards,
Björn

@SwishSwushPow SwishSwushPow changed the title cargo vcpkg build fails cargo vcpkg build fails if vcpkg.json file is present as well Aug 17, 2021
@gerard-ryan-immersaview

When I was running cargo vcpkg -v build on a similar setup I was getting

error: In manifest mode, `vcpkg install` does not support individual package arguments.

And then I removed what would be your dependencies = ["sqlite3"] line from the Cargo.toml and the install succeeded.

I'm curious if you would get the same, perhaps this issue is just for a better error message in manifest mode 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants