microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
8.01k stars 1.65k forks source link

CMake error when trying to install Casablanca using vcpkg #578

Open DragonOsman opened 7 years ago

DragonOsman commented 7 years ago

I had this output when I tried to install Casablanca C++ REST SDK using vcpkg:

The following packages will be built and installed:

  • boost:x86-windows
  • boost:x64-windows
  • bzip2:x64-windows cpprestsdk:x86-windows cpprestsdk:x64-windows
  • openssl:x64-windows
  • websocketpp:x86-windows
  • websocketpp:x64-windows
  • zlib:x64-windows Additional packages (*) will be installed to complete this operation. Starting package 1/9: boost:x86-windows Building package boost:x86-windows... -- CURRENT_INSTALLED_DIR=C:/Program Files/vcpkg/installed/x86-windows -- DOWNLOADS=C:/Program Files/vcpkg/downloads -- CURRENT_PACKAGES_DIR=C:/Program Files/vcpkg/packages/boost_x86-windows -- CURRENT_BUILDTREES_DIR=C:/Program Files/vcpkg/buildtrees/boost -- CURRENT_PORT_DIR=C:/Program Files/vcpkg/ports/boost/. -- Using cached C:/Program Files/vcpkg/downloads/boost_1_65_1.7z -- Testing integrity of cached file... -- Testing integrity of cached file... OK -- Extracting done -- Using cached C:/Program Files/vcpkg/downloads/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2-2.diff -- Testing integrity of cached file... -- Testing integrity of cached file... OK -- Applying patch C:/Program Files/vcpkg/buildtrees/boost/src/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed -- Applying patch failed. This is expected if this patch was previously applied. -- Applying patch C:/Program Files/vcpkg/buildtrees/boost/src/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed done -- Applying patch C:/Program Files/vcpkg/ports/boost/0001-Fix-boost-ICU-support.patch -- Applying patch failed. This is expected if this patch was previously applied. -- Applying patch C:/Program Files/vcpkg/ports/boost/0001-Fix-boost-ICU-support.patch done -- Bootstrapping done -- Building x86-windows-rel CMake Error at C:/Program Files/vcpkg/scripts/cmake/vcpkg_execute_required_process_repeat.cmake:21 (message): Command failed: C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/b2.exe;--stagedir=C:/Program Files/vcpkg/buildtrees/boost/x86-windows-rel/stage;--build-dir=C:/Program Files/vcpkg/buildtrees/boost/x86-windows-rel;-sZLIB_INCLUDE="C:/Program Files/vcpkg/installed/x86-windows\include";-sBZIP2_INCLUDE="C:/Program Files/vcpkg/installed/x86-windows\include";-sICU_PATH="C:/Program Files/vcpkg/installed/x86-windows";-j4;--debug-configuration;--ignore-site-config;--hash;-q;threading=multi;runtime-link=shared;link=shared;--without-python;boost.locale.icu=off;--disable-icu;toolset=msvc-14.1;-sZLIB_BINARY=zlib;-sZLIB_LIBPATH="C:/Program Files/vcpkg/installed/x86-windows\lib";-sBZIP2_BINARY=bz2;-sBZIP2_LIBPATH="C:/Program Files/vcpkg/installed/x86-windows\lib";variant=release;debug-symbols=on Working Directory: C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1 See logs for more information: C:\Program Files\vcpkg\buildtrees\boost\build-x86-windows-rel-out.log C:\Program Files\vcpkg\buildtrees\boost\build-x86-windows-rel-err.log

Call Stack (most recent call first): C:/Program Files/vcpkg/ports/boost/portfile.cmake:228 (vcpkg_execute_required_process_repeat) C:/Program Files/vcpkg/scripts/ports.cmake:72 (include)

Please note the CMake Error. So does anyone have a good solution for this? Thanks in advance for any replies and/or solutions.

Log files; first is the build-x86-windows-rel-out.log:

notice: found boost-build.jam at C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/boost-build.jam notice: loading Boost.Build from C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src notice: Site configuration files will be ignored due to the notice: --ignore-site-config command-line option. notice: Searching 'C:\Users\Osman' 'C:\Users\Osman' 'C:\Program Files\vcpkg\buildtrees\boost\src\boost_1_65_1\tools/build/src' 'C:/Program Files/vcpkg/buildtrees/boost/x86-windows-rel' 'C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/kernel' 'C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/util' 'C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/build' 'C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/tools' 'C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/contrib' 'C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/.' for user-config configuration file 'user-config.jam'. notice: Loading user-config configuration file 'user-config.jam' from 'C:/Program Files/vcpkg/buildtrees/boost/x86-windows-rel'. notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' notice: [msvc-cfg] msvc-12.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe' notice: [msvc-cfg] msvc-11.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cl.exe' notice: [msvc-cfg] msvc-14.1 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\arm\cl.exe' notice: will use 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' 'cl.exe' for msvc, condition msvc-14.0 notice: [msvc-cfg] condition: 'msvc-14.0//', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0//32', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0/x86/', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0/x86/32', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0//64', setup: 'call "echo" amd64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0/x86/64', setup: 'call "echo" amd64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0/ia64/', setup: 'call "echo" x86_ia64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0/ia64/64', setup: 'call "echo" x86_ia64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.0/arm/', setup: 'call "echo" x86_arm >nul ' notice: [msvc-cfg] condition: 'msvc-14.0/arm/32', setup: 'call "echo" x86_arm >nul ' notice: will use 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\arm\cl.exe' 'cl.exe' for msvc, condition msvc-14.1 notice: [msvc-cfg] condition: 'msvc-14.1//', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1//32', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1/x86/', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1/x86/32', setup: 'call "echo" x86 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1//64', setup: 'call "echo" amd64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1/x86/64', setup: 'call "echo" amd64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1/ia64/', setup: 'call "echo" x86_ia64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1/ia64/64', setup: 'call "echo" x86_ia64 >nul ' notice: [msvc-cfg] condition: 'msvc-14.1/arm/', setup: 'call "echo" x86_arm >nul ' notice: [msvc-cfg] condition: 'msvc-14.1/arm/32', setup: 'call "echo" x86_arm >nul ' notice: [python-cfg] Configuring python... notice: [python-cfg] Checking interpreter command "python"... notice: [python-cfg] running command 'python -c "from sys import ; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1' notice: [python-cfg] ...does not invoke a working interpreter notice: [python-cfg] Python headers and libraries not found. notice: [python-cfg] Configuring python... notice: [python-cfg] user-specified condition: "on" notice: [python-cfg] Checking interpreter command "python"... notice: [python-cfg] running command 'python -c "from sys import ; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1' notice: [python-cfg] ...does not invoke a working interpreter notice: [python-cfg] Python headers and libraries not found. C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/build\property.jam:529: in property.translate from module property error: 'Files/vcpkg/installed/x86-windows/lib' is not a valid property specification C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/build\property-set.jam:432: in property-set.create-from-user-input from module property-set C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/build\property-set.jam:484: in property-set.refine-from-user-input from module property-set C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/build\targets.jam:1619: in targets.main-target-requirements from module targets C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src/tools\builtin.jam:539: in lib from module builtin C:/Program Files/vcpkg/buildtrees/boost/x86-windows-rel\user-config.jam:16: in modules.load from module user-config C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src\build-system.jam:249: in load-config from module build-system C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src\build-system.jam:389: in load-configuration-files from module build-system C:/Program Files/vcpkg/buildtrees/boost/src/boost_1_65_1/tools/build/src\build-system.jam:524: in load from module build-system C:\Program Files\vcpkg\buildtrees\boost\src\boost_1_65_1\tools\build\src/kernel\modules.jam:295: in import from module modules C:\Program Files\vcpkg\buildtrees\boost\src\boost_1_65_1\tools\build\src/kernel/bootstrap.jam:139: in boost-build from module C:\Program Files\vcpkg\buildtrees\boost\src\boost_1_65_1\boost-build.jam:17: in module scope from module

And then the -err one:

'"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file. '"echo"' is not recognized as an internal or external command, operable program or batch file.

Anyway, yeah, any help would be greatly appreciated. Thanks in advance.

ras0219-msft commented 7 years ago

error: 'Files/vcpkg/installed/x86-windows/lib' is not a valid property specification

This looks like a "not-handling-spaces" bug. I'll look at getting a fix added upstream -- in the meantime, could you try moving vcpkg to a path without spaces such as "C:/src/vcpkg/"?

DragonOsman commented 7 years ago

Maybe I should put it directly in the C: drive, then. Though it doesn't seem like that's the only reason for the error.

Anyway, yeah, getting a fix added for this bug would be good.

DragonOsman commented 7 years ago

Okay, so that really was the problem. I moved the vcpkg folder to directly in the C:\ drive so that there are no spaces in the path, and it worked.

But now I have errors when I try to build the app in the "Getting Started tutorial" for Casablanca while having the /std:c++17 and /permissive- flags turned on. I'm putting the link to file on OneDrive here: https://1drv.ms/t/s!As6LkLqTe7Ps-HckMlrf1uFUvzUr .