Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel compiler detection in Windows seems not to work with the latest release. #141

Open
3 tasks done
jrmoore opened this issue Feb 21, 2022 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working os:windows Issue on Windows OS.

Comments

@jrmoore
Copy link

jrmoore commented Feb 21, 2022

Make sure you completed the following tasks

Environment and version details

  • Operating System: Windows 10 21H2
  • Compilers: Intel oneAPI HPC Toolkit 2022.1.2 (the traditional C++ compiler, icl.exe) under Visual Studio 2022 17.1.0
Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.5.0 Build 20211109_000000
Copyright (C) 1985-2021 Intel Corporation.  All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.31.31104 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
  • Shell: CMD ran through conhost.exe, no Windows Terminal here.
  • B2 Version:
D:\Libraries\Boost>b2 -v
B2 Version 4.7. OS=NT.
  Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
  Copyright 2001 David Turner.
  Copyright 2001-2004 David Abrahams.
  Copyright 2002-2019 Rene Rivera.
  Copyright 2003-2015 Vladimir Prus.

  DEFAULTS: jobs = 8

D:\Libraries\Boost>b2 --version
B2 4.7-git
  • B2 Configuration: Doesn't apply I believe, running b2 --debug-configuration leads to a successful build of Boost using Microsoft's compiler, msvc-14.3

Brief problem description

Attempting to build Boost using the current version of the traditional Intel C++ Compiler leads to the compiler not being detected. I suspect it'd also apply to the DPC++ or ICX compilers as well, the current scripts seem not to detect any of them.

Steps to reproduce the issue

While the steps to reproduce the issue are trivial, it'd take a while because of the download and installation involved, but I could perform tests over here if needed:

  • Download and install Visual Studio 2022, the Community edition is enough.
  • Download and install Intel's oneAPI Base Toolkit, contains the DPC++ and ICX compilers, but it's a requirement for the traditional one.
  • Download and install Intel's oneAPI HPC Toolkit, it's an addon to the previous, contains their traditional C++ compiler, icl.exe.
  • Download and extract Boost sources, 1.78 being the current release.
  • Open a command prompt for the oneAPI compilers, switch to the Boost sources directory.
  • Bootstrap (msvc-14.3 will be used), all good.
  • Attempt to build the library using Intel's compiler: b2 toolset=intel (or any of the detailed toolsets described in intel-win.jam, like intel-21.1).

Actual behavior summary

ICL isn't detected, at first try the script report no Intel compiler was found. If one of the detailed toolsets is specified a different error message is shown, but the outcome is the same:

  • No compiler version found, toolset=intel:
D:\Libraries\Boost>b2 toolset=intel
D:/Libraries/Boost/tools/build/src/tools\intel-win.jam:58: in intel-win.init from module intel-win
error: No intel compiler version found!
D:/Libraries/Boost/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
D:/Libraries/Boost/tools/build/src/tools\intel.jam:83: in intel.init from module intel
D:/Libraries/Boost/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
D:/Libraries/Boost/tools/build/src\build-system.jam:543: in process-explicit-toolset-requests from module build-system
D:/Libraries/Boost/tools/build/src\build-system.jam:610: in load from module build-system
D:/Libraries/Boost/tools/build/src/kernel\modules.jam:294: in import from module modules
D:/Libraries/Boost/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
D:/Libraries/Boost/boost-build.jam:17: in module scope from module
  • Failure to register a toolset, toolset=intel-21.1:
D:/Libraries/Boost/tools/build/src/tools\intel-win.jam:138: in configure from module intel-win
error: Failed to register an intel toolset!
D:/Libraries/Boost/tools/build/src/tools\intel-win.jam:47: in intel-win.init from module intel-win
D:/Libraries/Boost/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
D:/Libraries/Boost/tools/build/src/tools\intel.jam:83: in intel.init from module intel
D:/Libraries/Boost/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
D:/Libraries/Boost/tools/build/src\build-system.jam:543: in process-explicit-toolset-requests from module build-system
D:/Libraries/Boost/tools/build/src\build-system.jam:610: in load from module build-system
D:/Libraries/Boost/tools/build/src/kernel\modules.jam:294: in import from module modules
D:/Libraries/Boost/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
D:/Libraries/Boost/boost-build.jam:17: in module scope from module
  • No known parameters for VC: intel-win.jam modified to add 14.3 as a supported MSVC version, toolset=intel-21.1:
At line 529:
.iclvars-21.1-supported-vcs = "14.3 14.2 14.1" ;
.iclvars-2021.1-supported-vcs = "14.3 14.2 14.1" ;
D:/Libraries/Boost/tools/build/src/tools\intel-win.jam:221: in configure-really from module intel-win
error: Don't know what parameter to pass for vc version ( vc14.3 )
D:/Libraries/Boost/tools/build/src/tools\intel-win.jam:133: in configure from module intel-win
D:/Libraries/Boost/tools/build/src/tools\intel-win.jam:47: in intel-win.init from module intel-win
D:/Libraries/Boost/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
D:/Libraries/Boost/tools/build/src/tools\intel.jam:83: in intel.init from module intel
D:/Libraries/Boost/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
D:/Libraries/Boost/tools/build/src\build-system.jam:543: in process-explicit-toolset-requests from module build-system
D:/Libraries/Boost/tools/build/src\build-system.jam:610: in load from module build-system
D:/Libraries/Boost/tools/build/src/kernel\modules.jam:294: in import from module modules
D:/Libraries/Boost/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
D:/Libraries/Boost/boost-build.jam:17: in module scope from module

If a project of yours is blocked due to this bug, please, mention it explicitly.

No project of mine is blocked because of this, I can use Microsoft's compiler so it's all good, but it'd be nice if Intel's could be used as usual.

Expected behavior summary

Intel compiler successfully detected and used, at least the traditional one, icl.exe although I suppose some people would like to be able to choose DPC++ or ICX. The command prompt environment seems to be the same for both if the HPC toolkit addon is installed, they're both accessible from there.

Related or links that may be of interest

Issue 697 at the older repo: boostorg/build#697

@jrmoore jrmoore added the bug Something isn't working label Feb 21, 2022
@grafikrobot grafikrobot added the os:windows Issue on Windows OS. label Apr 30, 2022
@fasxmut
Copy link

fasxmut commented Jul 22, 2023

I think you should use clang config, because intel oneapi compiler is based on clang. I am not sure windows.

This works on linux:
Put to /etc/site-config.jam

using clang : sycl : dpcpp ;

Then build your sycl project:

b2 -q -j2 toolset=clang-sycl cxxstd=2b

oneapi compiler supports c++20, c++2a, c++2b, but not c++23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working os:windows Issue on Windows OS.
Projects
Status: No status
Development

No branches or pull requests

3 participants