Vcpkg: opencl[core]:x86-windows build failure

Created on 25 Mar 2020  路  14Comments  路  Source: microsoft/vcpkg

Host Environment

  • OS: Windows 32 bit
  • Compiler: vs2017

To Reproduce
Steps to reproduce the behavior:
./vcpkg install opencl

Failure logs
Computing installation plan...
The following packages will be built and installed:
opencl[core]:x86-windows
Starting package 1/1: opencl:x86-windows
Building package opencl[core]:x86-windows...
-- Using cached D:/vcpkg/downloads/KhronosGroup-OpenCL-Headers-0d5f18c6e7196863bc1557a693f1509adfcee056.tar.gz
-- Extracting source D:/vcpkg/downloads/KhronosGroup-OpenCL-Headers-0d5f18c6e7196863bc1557a693f1509adfcee056.tar.gz
-- Using source at D:/vcpkg/buildtrees/opencl/src/9adfcee056-effc37b04c
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d10.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d11.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing_intel.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_egl.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext_intel.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl_ext.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_platform.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_va_api_media_sharing_intel.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_version.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/opencl.h
-- Using cached D:/vcpkg/downloads/KhronosGroup-OpenCL-CLHPP-d62a02090625655e5b2d791d6a58618b043c989c.tar.gz
-- Extracting source D:/vcpkg/downloads/KhronosGroup-OpenCL-CLHPP-d62a02090625655e5b2d791d6a58618b043c989c.tar.gz
-- Using source at D:/vcpkg/buildtrees/opencl/src/8b043c989c-02b68d7dd1
-- Generating OpenCL C++ headers done
-- Using cached D:/vcpkg/downloads/KhronosGroup-OpenCL-ICD-Loader-e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae.tar.gz
-- Extracting source D:/vcpkg/downloads/KhronosGroup-OpenCL-ICD-Loader-e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae.tar.gz
-- Using source at D:/vcpkg/buildtrees/opencl/src/e28e2a4eae-5831440a3e
-- Configuring x86-windows-rel
-- Building x86-windows-rel
CMake Error at ports/opencl/portfile.cmake:78 (file):
file INSTALL cannot find
"D:/vcpkg/buildtrees/opencl/x86-windows-rel/OpenCL.lib": File exists.
Call Stack (most recent call first):
scripts/ports.cmake:90 (include)

Error: Building package opencl: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: opencl:x86-windows
Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above.
-Please attach any additional failure logs mentioned in the console output.
build-x86-windows-rel-out.log

Additional context
My vcpkg is updated and
I can see that OpenCL.lib is generated on that Path vcpkgbuildtreesopenclx86-windows-relRelease.
openCl

port-bug

Most helpful comment

Hi @ParoRahul
Thanks for posting this issue.
It seems that you only build release type.
I have submitted a PR #10567 to fix this. You can try to rebuid openclbased on this PR.

All 14 comments

Hi @ParoRahul
Thanks for posting this issue.
It seems that you only build release type.
I have submitted a PR #10567 to fix this. You can try to rebuid openclbased on this PR.

Hi @NancyLi1013
Thanks for PR #10567
Opencl Successfully installed.

OpenCL Successfully Installed but found anther new Issue.

find_package(OpenCL REQUIRED)

is not working. After little analysis, I found even if installing done message shown at the console, binary files are not moved to vcpkginstalledx86-windows directory. So I manually move them to vcpkginstalledx86-windowsbin and vcpkginstalledx86-windowslib directory.
Now find_package(OpenCL REQUIRED) is working fine.
image
build-x86-windows-rel-out.log

Thanks for your test and feedback.
I will check this later.

Sorry for my mistake. This is caused by the case-sensitive issue.
I have updated the PR. It should work now.

Again the old error is coming

Computing installation plan...
The following packages will be built and installed:
opencl[core]:x86-windows
Starting package 1/1: opencl:x86-windows
Building package opencl[core]:x86-windows...
-- Downloading https://github.com/KhronosGroup/OpenCL-Headers/archive/0d5f18c6e7196863bc1557a693f1509adfcee056.tar.gz...
-- Using source at D:/vcpkg/buildtrees/opencl/src/9adfcee056-effc37b04c
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d10.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d11.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing_intel.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_egl.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext_intel.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl_ext.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_platform.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_va_api_media_sharing_intel.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/cl_version.h
-- Installing: D:/vcpkg/packages/opencl_x86-windows/include/CL/opencl.h
-- Downloading https://github.com/KhronosGroup/OpenCL-CLHPP/archive/d62a02090625655e5b2d791d6a58618b043c989c.tar.gz...
-- Using source at D:/vcpkg/buildtrees/opencl/src/8b043c989c-02b68d7dd1
-- Generating OpenCL C++ headers done
-- Downloading https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae.tar.gz...
-- Using source at D:/vcpkg/buildtrees/opencl/src/e28e2a4eae-5831440a3e
-- Configuring x86-windows-rel
-- Building x86-windows-rel
CMake Error at ports/opencl/portfile.cmake:81 (file):
file INSTALL cannot find
"D:/vcpkg/buildtrees/opencl/x86-windows-rel/OpenCL.lib": File exists.
Call Stack (most recent call first):
scripts/ports.cmake:90 (include)

Error: Building package opencl: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: opencl:x86-windows
Vcpkg version: 2020.02.04-nohash

image
build-x86-windows-rel-out.log

OpenCL.lib OpenCL.dll OpenCL.pdb is generated on that Path vcpkgbuildtreesopenclx86-windows-relRelease.

Hi @ParoRahul
Sorry for the late reply.
Could you please help check it again?
I can install it successfully on my local.

PS F:\10567\vcpkg> .\vcpkg.exe install opencl
Computing installation plan...
The following packages will be built and installed:
    opencl[core]:x86-windows
A suitable version of powershell-core was not found (required v6.2.1). Downloading portable powershell-core v6.2.1...
Downloading powershell-core...
  https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/PowerShell-6.2.1-win-x86.zip -> F:\10567\vcpkg\downloads\PowerShell-6.2.1-win-x86.zip
Extracting powershell-core...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
  https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> F:\10567\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
A suitable version of nuget was not found (required v4.6.2). Downloading portable nuget v4.6.2...
Downloading nuget...
  https://dist.nuget.org/win-x86-commandline/v4.6.2/nuget.exe -> F:\10567\vcpkg\downloads\nuget.exe
Starting package 1/1: opencl:x86-windows
Building package opencl[core]:x86-windows...
A suitable version of git was not found (required v2.25.1). Downloading portable git v2.25.1...
Downloading git...
  https://github.com/git-for-windows/git/releases/download/v2.25.1.windows.1/PortableGit-2.25.1-32-bit.7z.exe -> F:\10567\vcpkg\downloads\PortableGit-2.25.1-32-bit.7z.exe
Extracting git...
-- Downloading https://github.com/KhronosGroup/OpenCL-Headers/archive/0d5f18c6e7196863bc1557a693f1509adfcee056.tar.gz...
-- Extracting source F:/10567/vcpkg/downloads/KhronosGroup-OpenCL-Headers-0d5f18c6e7196863bc1557a693f1509adfcee056.tar.gz
-- Using source at F:/10567/vcpkg/buildtrees/opencl/src/9adfcee056-effc37b04c
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d10.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d11.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing_intel.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_egl.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext_intel.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl_ext.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_platform.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_va_api_media_sharing_intel.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/cl_version.h
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/include/CL/opencl.h
-- Downloading https://github.com/KhronosGroup/OpenCL-CLHPP/archive/d62a02090625655e5b2d791d6a58618b043c989c.tar.gz...
-- Extracting source F:/10567/vcpkg/downloads/KhronosGroup-OpenCL-CLHPP-d62a02090625655e5b2d791d6a58618b043c989c.tar.gz
-- Using source at F:/10567/vcpkg/buildtrees/opencl/src/8b043c989c-02b68d7dd1
-- Downloading https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-win32.zip...
-- Generating OpenCL C++ headers done
-- Downloading https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae.tar.gz...
-- Extracting source F:/10567/vcpkg/downloads/KhronosGroup-OpenCL-ICD-Loader-e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae.tar.gz
-- Using source at F:/10567/vcpkg/buildtrees/opencl/src/e28e2a4eae-5831440a3e
-- Configuring x86-windows
-- Building x86-windows-rel
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/lib/OpenCL.lib
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/bin/OpenCL.dll
-- Installing: F:/10567/vcpkg/packages/opencl_x86-windows/share/opencl/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package opencl[core]:x86-windows... done
Installing package opencl[core]:x86-windows...
Installing package opencl[core]:x86-windows... done
Elapsed time for package opencl:x86-windows: 59.61 s

Total elapsed time: 1.204 min

The package opencl is compatible with built-in CMake targets via CMake v3.6 and prior syntax

    find_package(OpenCL REQUIRED)
    target_link_libraries(main PRIVATE ${OpenCL_LIBRARIES})
    target_include_directories(main PRIVATE ${OpenCL_INCLUDE_DIRS})

and the CMake v3.7 and beyond imported target syntax

    find_package(OpenCL REQUIRED)
    target_link_libraries(main PRIVATE OpenCL::OpenCL)

This package is only an OpenCL SDK. To actually run OpenCL code you also need to install an implementation.

    WINDOWS: implementations typically ship with the drivers of you CPU/GPU vendors.
    LINUX: implementations may be installed from your distro's repo or manually. There are too many to count.
    APPLE: consult your distribution vendor on the state of OpenCL support: https://support.apple.com/en-us/HT202823

Could you please help confirm how to set the build type as release in your build process?
I add it to _triplets/x86-windows.cmake_ via set(VCPKG_BUILD_TYPE release).

Hi @NancyLi1013 ,

I manually add set(VCPKG_BUILD_TYPE release) to the triplets/x86-windows.cmake.
And another thing I want to be mentioned that, CONTROL and portfile.cmake is been changed according to PR #10567, is there any other file do I need to update.

I only updated the CONTROLand portfile.cmake. Also add set(VCPKG_BUILD_TYPE release) to the _triplets/x86-windows.cmake_. Besides this, I didn't do other changes about this port.

Could you please try to clone the PR to a new clean folder and then build openclagain?
The steps are as follows:

@ParoRahul
Can this work for you?

Sorry for the late response,
The issue still persists. and returning with the same error and Log.
But for time being I update the portfile.cmake with following, And it is working.
image

Thanks for your update.
I also check it again on my local. There is no Release sub directory.

image

I can build it successfully.

PS F:\tools\vcpkg> .\vcpkg.exe install opencl
Computing installation plan...
The following packages will be built and installed:
    opencl[core]:x86-windows
Starting package 1/1: opencl:x86-windows
Building package opencl[core]:x86-windows...
-- Using cached F:/tools/vcpkg/downloads/KhronosGroup-OpenCL-Headers-0d5f18c6e7196863bc1557a693f1509adfcee056.tar.gz
-- Using source at F:/tools/vcpkg/buildtrees/opencl/src/9adfcee056-effc37b04c
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d10.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_d3d11.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_dx9_media_sharing_intel.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_egl.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_ext_intel.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_gl_ext.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_platform.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_va_api_media_sharing_intel.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/cl_version.h
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/include/CL/opencl.h
-- Using cached F:/tools/vcpkg/downloads/KhronosGroup-OpenCL-CLHPP-d62a02090625655e5b2d791d6a58618b043c989c.tar.gz
-- Using source at F:/tools/vcpkg/buildtrees/opencl/src/8b043c989c-02b68d7dd1
-- Generating OpenCL C++ headers done
-- Using cached F:/tools/vcpkg/downloads/KhronosGroup-OpenCL-ICD-Loader-e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae.tar.gz
-- Using source at F:/tools/vcpkg/buildtrees/opencl/src/e28e2a4eae-5831440a3e
-- Configuring x86-windows
-- Building x86-windows-rel
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/lib/OpenCL.lib
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/bin/OpenCL.dll
-- Installing: F:/tools/vcpkg/packages/opencl_x86-windows/share/opencl/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package opencl[core]:x86-windows... done
Installing package opencl[core]:x86-windows...
Installing package opencl[core]:x86-windows... done
Elapsed time for package opencl:x86-windows: 44 s

Total elapsed time: 44.17 s

The package opencl is compatible with built-in CMake targets via CMake v3.6 and prior syntax

    find_package(OpenCL REQUIRED)
    target_link_libraries(main PRIVATE ${OpenCL_LIBRARIES})
    target_include_directories(main PRIVATE ${OpenCL_INCLUDE_DIRS})

and the CMake v3.7 and beyond imported target syntax

    find_package(OpenCL REQUIRED)
    target_link_libraries(main PRIVATE OpenCL::OpenCL)

This package is only an OpenCL SDK. To actually run OpenCL code you also need to install an implementation.

    WINDOWS: implementations typically ship with the drivers of you CPU/GPU vendors.
    LINUX: implementations may be installed from your distro's repo or manually. There are too many to count.
    APPLE: consult your distribution vendor on the state of OpenCL support: https://support.apple.com/en-us/HT202823

@ParoRahul
The PR has been merged. Please try to update vcpkg and rebuild this.
This issue should be fixed now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spindensity picture spindensity  路  3Comments

jack17529 picture jack17529  路  3Comments

invy picture invy  路  3Comments

cjvaijo picture cjvaijo  路  3Comments

ThinkalVB picture ThinkalVB  路  3Comments