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

Generated path to detect compiler information contains a semicolon instead of a colon #43063

Open
CosmoCortney opened this issue Jan 2, 2025 · 8 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@CosmoCortney
Copy link

Describe the bug
When I update all installed packages, I always get an error message that the path to the compiler information supposedly does not exist. The path it attempts to open starts with C;/ (semi-colon) instead of C:/ (colon) and therefore results in an error.

Environment

  • OS: Windows 11
  • Compiler: MSVC 19.42.34435.0

To Reproduce
Steps to reproduce the behavior:

  1. Go to the folder of your VCPKG installation
  2. Open Terminal and run .\vcpkg.exe upgrade --no-dry-run

Expected behavior
VCPKG is expected to upgrade all installed packages

Failure logs
C:\vcpkg\buildtrees\detect_compiler\stdout-x64-windows.log

CMake Error at C:/vcpkg/scripts/ports.cmake:143 (message):
  Cannot find port:

    Directory does not exist: C;/vcpkg/scripts/detect_compiler
@Neumann-A
Copy link
Contributor

Command shell ?

@autoantwort
Copy link
Contributor

Iirc this happens if you try to use the mysys/mingw version of cmake outside of git bash

@CosmoCortney
Copy link
Author

Command shell ?

yes, PowerShell to be specific, if your question refers to this

@LilyWangLL LilyWangLL added the requires:repro The issue is not currently repro-able label Jan 3, 2025
@shijunz
Copy link

shijunz commented Jan 4, 2025

Command shell ?

windows command or powershell or git bash shell , all of them same bug.

@shijunz
Copy link

shijunz commented Jan 4, 2025

I upgrade the CMAKE 3.13.3 and the bug is missed, you can try it.

@dg0yt
Copy link
Contributor

dg0yt commented Jan 4, 2025

This error is known to occur with CMake from MSYS or Cygwin environments (which are not MinGW environments). Check/clean your PATH environment variable.

@autoantwort
Copy link
Contributor

@dg0yt Do you think it is a good idea to skip this cmake version in the vcpkg-tool and fallback to the version from vcpkg-tools.{xml,json}? Is there some path prefix to detect that version?

@dg0yt
Copy link
Contributor

dg0yt commented Jan 4, 2025

IMO it should be skipped in the tool.

There are many possible approaches:

  • Run another CMake script, and check the output of path conversion.
  • Run cmake -G, and check for the absence of Visual Studio Generators.
  • Read the DLLs required by cmake.exe, and check for msys or cygwin ones.
  • Just check if it is placed in <prefix>/usr/bin, that's the MSYS environment in MSYS2.
  • Check for a msys or cygwin DLL in the same dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

6 participants