microsoft / vcpkg

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

[boost-compatibility] build failure #9549

Closed yihongyishui closed 4 years ago

yihongyishui commented 4 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install boost-compatibility

Call Stack (most recent call first): installed/x64-windows/share/boost-vcpkg-helpers/boost-modular-headers.cmake:17 (vcpkg_download_distfile) ports/boost-compatibility/portfile.cmake:14 (boost_modular_headers) scripts/ports.cmake:94 (include)

Error: Building package boost-compatibility:x64-windows failed with: BUILD_FAILED Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: boost-compatibility:x64-windows Vcpkg version: 2019.09.12-nohash

Additionally, attach any relevant sections from the log files above.

Failure logs -Cut and past the appropriate build messages from the console output. -Please attach any additional failure logs mentioned in the console output.

Additional context Add any other context about the problem here, such as what you have already tried to resolve the issue.

PhoebeHui commented 4 years ago

@yihongyishui , I can't repro this issue. From your failure log, it seems that failed with vcpkg_download_distfile step, could you double confirm if you can download https://raw.githubusercontent.com/boostorg/boost/boost-1.71.0/LICENSE_1_0.txt?

For me: Starting package 2/2: boost-compatibility:x86-windows Building package boost-compatibility[core]:x86-windows... -- Downloading https://github.com/boostorg/compatibility/archive/boost-1.71.0.tar.gz... -- Extracting source F:/VCPKG/boost/vcpkg/downloads/boostorg-compatibility-boost-1.71.0.tar.gz -- Using source at F:/VCPKG/boost/vcpkg/buildtrees/boost-compatibility/src/ost-1.71.0-d69e2f6205 -- Packaging headers -- Packaging headers done -- Downloading https://raw.githubusercontent.com/boostorg/boost/boost-1.71.0/LICENSE_1_0.txt... -- Installing: F:/VCPKG/boost/vcpkg/packages/boost-compatibility_x86-windows/share/boost-compatibility/copyright -- Performing post-build validation -- Performing post-build validation done Building package boost-compatibility[core]:x86-windows... done Installing package boost-compatibility[core]:x86-windows... Installing package boost-compatibility[core]:x86-windows... done Elapsed time for package boost-compatibility:x86-windows: 2.073 s

Total elapsed time: 35.36 s

vanturman commented 4 years ago

@yihongyishui i am facing the same problem with you. Have you solved this problem of vcpkg when installing folly?

PhoebeHui commented 4 years ago

@vanturman, does it fail with vcpkg_download_distfile step for you? could you double confirm if you can download https://raw.githubusercontent.com/boostorg/boost/boost-1.71.0/LICENSE_1_0.txt

yihongyishui commented 4 years ago

@yihongyishui i am facing the same problem with you. Have you solved this problem of vcpkg when installing folly?

"vcpkg\ports\opengl\portfile.cmake"

vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT)
vcpkg_get_windows_sdk(WINDOWS_SDK)

if (WINDOWS_SDK MATCHES "10.")
    set(LIBGLFILEPATH  "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
    set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
    set(HEADERSPATH    "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
elseif(WINDOWS_SDK MATCHES "8.")
    set(LIBGLFILEPATH  "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
    set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
    set(HEADERSPATH    "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um")
else()
    message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
endif()

reviewed:

    GET_FILENAME_COMPONENT(SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE CACHE)
    vcpkg_get_windows_sdk(WINDOWS_SDK)

    if (WINDOWS_SDK MATCHES "10.")
        set(LIBGLFILEPATH  "${SDK_PATH}\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
        set(LIBGLUFILEPATH "${SDK_PATH}\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
        set(HEADERSPATH    "${SDK_PATH}\\Include\\${WINDOWS_SDK}\\um")
    elseif(WINDOWS_SDK MATCHES "8.")
        set(LIBGLFILEPATH  "${SDK_PATH}\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
        set(LIBGLUFILEPATH "${SDK_PATH}\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
        set(HEADERSPATH    "${SDK_PATH}\\Include\\um")
    else()
        message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
    endif()
yihongyishui commented 4 years ago

Just try it again. but rewriten a file @vanturman "vcpkg\ports\opengl\portfile.cmake"

vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT)
vcpkg_get_windows_sdk(WINDOWS_SDK)

if (WINDOWS_SDK MATCHES "10.")
    set(LIBGLFILEPATH  "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
    set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
    set(HEADERSPATH    "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
elseif(WINDOWS_SDK MATCHES "8.")
    set(LIBGLFILEPATH  "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
    set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
    set(HEADERSPATH    "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um")
else()
    message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
endif()

修改为:

    GET_FILENAME_COMPONENT(SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE CACHE)
    vcpkg_get_windows_sdk(WINDOWS_SDK)

    if (WINDOWS_SDK MATCHES "10.")
        set(LIBGLFILEPATH  "${SDK_PATH}\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
        set(LIBGLUFILEPATH "${SDK_PATH}\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
        set(HEADERSPATH    "${SDK_PATH}\\Include\\${WINDOWS_SDK}\\um")
    elseif(WINDOWS_SDK MATCHES "8.")
        set(LIBGLFILEPATH  "${SDK_PATH}\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
        set(LIBGLUFILEPATH "${SDK_PATH}\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
        set(HEADERSPATH    "${SDK_PATH}\\Include\\um")
    else()
        message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
    endif()
vanturman commented 4 years ago

Thanks a lot,it works for me!

------------------ 原始邮件 ------------------ 发件人: "Jihao Liu"<notifications@github.com>; 发送时间: 2020年2月19日(星期三) 晚上9:17 收件人: "microsoft/vcpkg"<vcpkg@noreply.github.com>; 抄送: ""<handong.yang@foxmail.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [microsoft/vcpkg] [boost-compatibility] build failure (#9549)

Just try it again. but rewriten a file @vanturman "vcpkg\ports\opengl\portfile.cmake" vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\Windows Kits\10\Lib\${WINDOWS_SDK}\um\${TRIPLET_SYSTEM_ARCH}\OpenGL32.Lib") set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\Windows Kits\10\Lib\${WINDOWS_SDK}\um\${TRIPLET_SYSTEM_ARCH}\GlU32.Lib") set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\Windows Kits\10\Include\${WINDOWS_SDK}\um") elseif(WINDOWS_SDK MATCHES "8.") set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\Windows Kits\8.1\Lib\winv6.3\um\${TRIPLET_SYSTEM_ARCH}\OpenGL32.Lib") set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\Windows Kits\8.1\Lib\winv6.3\um\${TRIPLET_SYSTEM_ARCH}\GlU32.Lib") set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\Windows Kits\8.1\Include\um") else() message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") endif()

修改为: GET_FILENAME_COMPONENT(SDK_PATH "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots;KitsRoot10]" ABSOLUTE CACHE) vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") set(LIBGLFILEPATH "${SDK_PATH}\Lib\${WINDOWS_SDK}\um\${TRIPLET_SYSTEM_ARCH}\OpenGL32.Lib") set(LIBGLUFILEPATH "${SDK_PATH}\Lib\${WINDOWS_SDK}\um\${TRIPLET_SYSTEM_ARCH}\GlU32.Lib") set(HEADERSPATH "${SDK_PATH}\Include\${WINDOWS_SDK}\um") elseif(WINDOWS_SDK MATCHES "8.") set(LIBGLFILEPATH "${SDK_PATH}\Lib\winv6.3\um\${TRIPLET_SYSTEM_ARCH}\OpenGL32.Lib") set(LIBGLUFILEPATH "${SDK_PATH}\Lib\winv6.3\um\${TRIPLET_SYSTEM_ARCH}\GlU32.Lib") set(HEADERSPATH "${SDK_PATH}\Include\um") else() message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") endif()

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

PhoebeHui commented 4 years ago

@yihongyishui, thanks for your updates!

I'm not clear the relationship between the build failures and solution, however, it's good to know that works for you, @vanturman.

yihongyishui commented 4 years ago

It is possible because the vcpkg is not installed in the system disk.

JordiGR-TheBreachStudios commented 4 years ago

Hi,

I'm facing the same problem. I found out that any access to https://raw.githubusercontent.com is blocked by our corporate network, for security reasons. Could the boost-compatibility package be built without needing to download the file https://raw.githubusercontent.com/boostorg/boost/boost-1.72.0/LICENSE_1_0.txt? Any manual modification to some config file is not an option, since the solution needs to work with any CI/CD setup.

Thank you

PhoebeHui commented 4 years ago

The license file is needed, as a workaound you can download that file, rename to boost_LICENSE_1_0.txt, and copy to vcpkg\download folder in setting up steps.

Duplicated to https://github.com/microsoft/vcpkg/issues/11627.

chatyan commented 4 years ago

Got the same problem with boost

D:\Work 2019\GIT Code\vcpkg>.\vcpkg install pcl Computing installation plan... The following packages will be built and installed:

Call Stack (most recent call first): scripts/cmake/vcpkg_download_distfile.cmake:110 (test_hash) installed/x86-windows/share/boost-vcpkg-helpers/boost-modular-headers.cmake:17 (vcpkg_download_distfile) ports/boost-compatibility/portfile.cmake:12 (boost_modular_headers) scripts/ports.cmake:76 (include)

Error: Building package boost-compatibility:x86-windows failed with: BUILD_FAILED Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: boost-compatibility:x86-windows Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above.

thouger commented 3 years ago

same problem,download boost_LICENSE_1_0.txt is can work.