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

Request for comment on NoMSVC #46

Open
JohnScience opened this issue Oct 20, 2022 · 5 comments
Open

Request for comment on NoMSVC #46

JohnScience opened this issue Oct 20, 2022 · 5 comments

Comments

@JohnScience
Copy link

JohnScience commented Oct 20, 2022

@mcgoo Hi, which kind of error is represented by NotMVC and why exactly does it exist? Was it a workaround for a bug or limitation of vcpkg? If so, can you link the issue?

EDIT: corrected from NoMSVC to NotMSVC

@waych
Copy link
Collaborator

waych commented Oct 21, 2022

NoMSVC is, as far as I can tell, a left over from the fact that this crate originally only supported building with MSVC. Later platforms such as Linux and iOS were added later, but the code still reports "NotMSVC" if the compiler triplet setup isn't recognized. This should probably be cleaned up to be NotYetSupportedCompiler or something similar.

@JohnScience
Copy link
Author

JohnScience commented Oct 21, 2022

It appears on line 1346 in the body of msvc_target function, which is used in the impl block of Config, on line 863 of the body of get_target_triplet function.

My concern is that I can't compile for arm64-android target (using vcpkg taxonomy) while using x86_64-pc-windows-msvc platform (in rustup taxonomy). Issue in Rust-SDL2.

Output of vcpkg help triplet
Available architecture triplets:
vcpkg built-in triplets:
arm-uwp
arm64-windows
x64-linux
x64-osx
x64-uwp
x64-windows-static
x64-windows
x86-windows
VCPKG community triplets:
arm-android
arm-ios
arm-linux
arm-mingw-dynamic
arm-mingw-static
arm-neon-android
arm-windows-static
arm-windows
arm64-android
arm64-ios
arm64-linux
arm64-mingw-dynamic
arm64-mingw-static
arm64-osx-dynamic
arm64-osx
arm64-uwp
arm64-windows-static-md
arm64-windows-static
armv6-android
ppc64le-linux
s390x-linux
wasm32-emscripten
x64-android
x64-freebsd
x64-ios
x64-linux-dynamic
x64-linux-release
x64-mingw-dynamic
x64-mingw-static
x64-openbsd
x64-osx-dynamic
x64-osx-release
x64-windows-release
x64-windows-static-md
x86-android
x86-freebsd
x86-ios
x86-mingw-dynamic
x86-mingw-static
x86-uwp
x86-windows-static-md
x86-windows-static
x86-windows-v120
Output of rustc -Vv
rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: x86_64-pc-windows-msvc
release: 1.64.0
LLVM version: 14.0.6

I'm not sure I know vcpkg well enough to solve the problem properly. Can you assist me with it, please? What would it take to solve the issue? Does vcpkg offer the same target triplets on all hosts (Windows/MacOS/Linux)? Thank you in advance!

P.S. I'm in the process of cleaning up the code of vcpkgrs as you can see here.

@waych

@JohnScience
Copy link
Author

JohnScience commented Oct 24, 2022

I got bogged down in the rewriting of TargetTriple part of the code. Making it right is difficult and laborious. Kudos to the person who made it work good enough.

@waych
Copy link
Collaborator

waych commented Oct 25, 2022

@JohnScience yeah.. I took a try at trying to clean that code up in the past but didn't get very far before giving up myself.

As for how to compile and link arm64-android vcpkg code using x86_64-pc-windows-msvc rustup target, that doesn't seem right to me. Wouldn't you have to be compiling with one of the targets output from rustup target list | grep android? Something like aarch64-linux-android maybe I'm guessing would pair with arm64-android?

For what it is worth, vcpkg does not seem to offer all triplets working on all hosts. For instance, many Windows libraries are just not possible from Linux afaict (maybe with some wine tooling and using shoehorning in MSFTs tools?), with many of even the mingw builds also just broken. I've hit this a few times where the vcpkg port really wants e.g. Powershell as a dev dependency when targeting Windows, failing on Linux hosts. YMMV.

@JohnScience
Copy link
Author

JohnScience commented Oct 27, 2022

Clarification: x86_64-pc-windows-msvc was not the rustup target but the host triple.

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