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

Unable to build any package due to invalid path to vcpkg (missing platform in triplet name) #12086

Closed
pistecid opened this issue Jun 24, 2020 · 3 comments
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@pistecid
Copy link

pistecid commented Jun 24, 2020

Describe the bug
Unable to build a project which uses any vcpkg library due to incorrect path to vcpkg headers/libs

Environment

  • OS: Windows
  • Visual Studio 2015

To Reproduce
Steps to reproduce the behavior:

  1. Clone vcpkg, build it
  2. Install any package
  3. Make integrate install
  4. Run visual studio, create empty project, try to use the package (e.g. include some header)

Expected behavior
No errors during compilation

Additional context
It looks like the problem is in $(VCPKG_ROOT)\scripts\buildsystems\msbuild\vcpkg.targets.
The default $(VcpkgUserTriplet) is initialized as $(PlatformTarget)-$(VcpkgOSTarget). In solution $(PlatformTarget) seems to be empty when usertriplet is calculated. The workaround is to specify $(VcpkgPlatformTarget) variable ( the same way it is defined in vcpkg.props) and use it instead of $(PlatformTarget)

@aggieNick02
Copy link
Contributor

This is one of the other "odd behaviors" I saw in issue #12062 . It is somehow caused by commit 1451450 .

What is even more odd/interesting is that this doesn't always happen in VS2015. I think it may be dependent upon VS2015 bugfix version, as I see it in VS2015 version 14.0.25425.01 Update 3, but not in VS2015 version 14.0.25431.01 Update 3. The former defaults the triplet to $(PlatformTarget)-$(VcpkgOSTarget), while the latter defaults to $(VcpkgPlatformTarget)-$(VcpkgOSTarget).

I don't know how to bugfix upgrade a VS2015 install (running the latest VS2015 Update 3 installer just told me the update was already installed). As a workaround, you could try figuring out how to install the bugfix update (perhaps just remove then reinstall VS2015 Update 3 with the latest installer), or you can clone vcpkg and then checkout before the problematic commit with

git checkout 14514508d8d30bdbd645b2bec89696aec25497f1~1

from the root directory before building it.

@JackBoosY
Copy link
Contributor

JackBoosY commented Jun 28, 2020

@BillyONeal @Neumann-A Could you take a look?

Thanks.

ras0219 pushed a commit to ras0219/vcpkg that referenced this issue Jul 4, 2020
This PR also renames the VcpkgUserTriplet MSBuild variable to VcpkgTriplet to minimize user confusion compared to previous practice and documentation.
ras0219-msft added a commit that referenced this issue Jul 8, 2020
This PR also renames the VcpkgUserTriplet MSBuild variable to VcpkgTriplet to minimize user confusion compared to previous practice and documentation.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
@JackBoosY
Copy link
Contributor

Close this issue via #12257 merged.

@JackBoosY JackBoosY added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

No branches or pull requests

3 participants