microsoft / microsoft/OpenCLOn12

Build failure with MSVC 17.12

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
130
Forks
19
Avg merge
11d 23h
Merged PRs (30d)
2

Description

Build Microsoft OpenCL over D3D12 driver (y/n):y

Getting CLonD3D12 ICD source code...
Cloning into 'C:\clon12'...
remote: Enumerating objects: 1871, done.
remote: Counting objects: 100% (725/725), done.
remote: Compressing objects: 100% (302/302), done.
remote: Total 1871 (delta 454), reused 659 (delta 410), pack-reused 1146 (from 1)
Receiving objects: 100% (1871/1871), 987.37 KiB | 9.06 MiB/s, done.
Resolving deltas: 100% (1303/1303), done.

Use Ninja build system for less storage device strain and faster build than MsBuild (y/n):y

CLonD3D12 build configuration command: cmake "C:\clon12" -GNinja -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX="C:\clon12\build\x64"

Press any key to continue . . .

Cleanning CLonD3D12 build. Please wait...

Press any key to continue . . .

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.12.0
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

-- The C compiler identification is MSVC 19.42.34433.0
-- The CXX compiler identification is MSVC 19.42.34433.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at out/x64/_deps/opencl_headers-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Configuring done (10.3s)
-- Generating done (0.0s)
-- Build files have been written to: C:/clon12/out/x64

Press any key to continue . . .

[0/2] Re-checking globbed directories...
[6/43] Building CXX object CMakeFiles\d3d12tran...\d3d12translationlayer\ImmediateContext.cpp.ob
FAILED: CMakeFiles/d3d12translationlayer.dir/src/d3d12translationlayer/ImmediateContext.cpp.obj
C:\PROGRA~2\MICROS~3\2022\BUILDT~1\VC\Tools\MSVC\1442~1.344\bin\Hostx64\x64\cl.exe  /nologo /TP -DDBG -DTRANSLATION_LAYER_DBG=1 -IC:\clon12\include\d3d12translationlayer -IC:\clon12\external -external:IC:\clon12\out\x64\_deps\directx-headers-src\include -external:W0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 -std:c++17 /showIncludes /FoCMakeFiles\d3d12translationlayer.dir\src\d3d12translationlayer\ImmediateContext.cpp.obj /FdCMakeFiles\d3d12translationlayer.dir\d3d12translationlayer.pdb /FS -c C:\clon12\src\d3d12translationlayer\ImmediateContext.cpp
C:\clon12\src\d3d12translationlayer\ImmediateContext.cpp(1364): error C2039: 'generate_n': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\queue(32): note: see declaration of 'std'
C:\clon12\src\d3d12translationlayer\ImmediateContext.cpp(1364): error C3861: 'generate_n': identifier not found
C:\clon12\src\d3d12translationlayer\ImmediateContext.cpp(1370): error C2039: 'generate_n': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\queue(32): note: see declaration of 'std'
C:\clon12\src\d3d12translationlayer\ImmediateContext.cpp(1370): error C3861: 'generate_n': identifier not found
[8/43] Building CXX object CMakeFiles\d3d12tran...src\d3d12translationlayer\PipelineState.cpp.ob
ninja: build stopped: subcommand failed.

Press any key to continue . . .

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/d3d12translationlayer/ImmediateContext.cpp around lines 1364 and 1370, where the MSVC 17.12 build reports std::generate_n as unavailable. Reproduce the configuration with CMake and Ninja using the shown MSVC environment, then verify that the OpenCLOn12 build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.