microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.26k stars 6.41k forks source link

[usockets] Build error #32915

Closed 7c0o closed 1 year ago

7c0o commented 1 year ago

Package: usockets[core,ssl]:x64-windows-static-release -> 0.8.6#1

Host Environment

To Reproduce

vcpkg install usockets[ssl]:x64-windows-static-release

Failure logs

-- Using cached uNetworking-uSockets-v0.8.6.tar.gz.
-- Cleaning sources at D:/soft/vcpkg/buildtrees/usockets/src/v0.8.6-52f28e01ae.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/soft/vcpkg/downloads/uNetworking-uSockets-v0.8.6.tar.gz
-- Using source at D:/soft/vcpkg/buildtrees/usockets/src/v0.8.6-52f28e01ae.clean
CMake Error at ports/usockets/portfile.cmake:29 (vcpkg_cmake_configure):
  Unknown CMake command "vcpkg_cmake_configure".
Call Stack (most recent call first):
  scripts/ports.cmake:147 (include)

Additional context

FrankXie05 commented 1 year ago

The function vcpkg_cmake_config depends on vcpkg-cmake in vcpkg.json, please make sure your json file has not changed. And please run command git pull.\bootstrap-vcpkg.bat.

  Unknown CMake command "vcpkg_cmake_configure".

https://github.com/microsoft/vcpkg/blob/980ec0f49d81f794778386f7bd518b2cc9c092f0/ports/usockets/vcpkg.json#L11

7c0o commented 1 year ago

The function vcpkg_cmake_config depends on vcpkg-cmake in vcpkg.json, please make sure your json file has not changed. And please run command git pull.\bootstrap-vcpkg.bat.

  Unknown CMake command "vcpkg_cmake_configure".

https://github.com/microsoft/vcpkg/blob/980ec0f49d81f794778386f7bd518b2cc9c092f0/ports/usockets/vcpkg.json#L11

I removed installed\vcpkg\ then it can work。

FrankXie05 commented 1 year ago

@7c0o This means that your local vcpkg-cmake is not installed normally. Works when re-cleaning the cache。

7c0o commented 1 year ago

This problem occurs when I install multiple versions

FrankXie05 commented 1 year ago

The older version caches may not have vcpkg-cmake dependencies, please keep using the latest version. :)

dg0yt commented 1 year ago

What you really need to run is:

.\vcpkg upgrade

and when you are happy with it:

.\vcpkg upgrade --no-dry-run

Alternatively, you can try:

.\vcpkg remove --recurse vcpkg-cmake
FrankXie05 commented 1 year ago

We hope your question was answered to your satisfaction; if it wasn't, you can ping me and I will reopen this issue.