Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
768 Discussions

Update procedure for boost compilation (>=1.81) using oneAPI toolkit (2024.2.1.20240711) on Windows

brunodema
Beginner
180 Views

Hello

I need to compile Boost 1.81 binaries for our development purposes, preferably using the Clang compiler. I found a page describing a procedure that should be valid for the C++ Compiler 2022.0.0 and Boost versions 1.75/1.78 (Building Boost with Intel® oneAPI). However, these instructions do not seem to work with Boost 1.81, and I fear they might not work with any newer versions either.

First of all, even after editing the project-config.jam file, whenever I run the bootstrap script, the toolset chosen ends up being VC143, regardless of whether I added the clang-win line in the file. If I try to run the bootstrap script with an invalid toolset option, the available options are:

  • borland
  • como
  • gcc
  • gcc-nocygwin
  • intel-win32
  • mingw
  • vc12
  • vc14
  • vc141
  • vc142
  • vc143

In my case, I'd like to compile the x64 binaries, so the intel-win32 option would not be applicable. By inspecting the bootstrap script, I can see that the following options exist:

REM Ideally, we should obtain the toolset that build.bat has
REM guessed. However, it uses setlocal at the start and does not
REM export BOOST_JAM_TOOLSET, and I don't know how to do that
REM properly. Default to msvc if not specified.

 

SET TOOLSET=msvc

 

IF "%1"=="gcc" SET TOOLSET=gcc
IF "%1"=="clang" SET TOOLSET=clang
IF "%1"=="borland" SET TOOLSET=embarcadero
IF "%1"=="vc71" SET TOOLSET=msvc : 7.1
IF "%1"=="vc8" SET TOOLSET=msvc : 8.0
IF "%1"=="vc9" SET TOOLSET=msvc : 9.0
IF "%1"=="vc10" SET TOOLSET=msvc : 10.0
IF "%1"=="vc11" SET TOOLSET=msvc : 11.0
IF "%1"=="vc12" SET TOOLSET=msvc : 12.0
IF "%1"=="vc14" SET TOOLSET=msvc : 14.0
IF "%1"=="vc141" SET TOOLSET=msvc : 14.1
IF "%1"=="vc142" SET TOOLSET=msvc : 14.2
IF "%1"=="vc143" SET TOOLSET=msvc : 14.3
 
Even though there seems to be a clang option, I end up getting many errors during the bootstrap execution, as it seems that MSVC files are being targeted instead.
 
Is there an updated procedure somewhere else?

0 Kudos
1 Reply
brunodema
Beginner
111 Views

It seems that the clang-win option mentioned in the tutorial I posted in the original post is naturally supported by boost only for versions >=1.85. That means that I remain blocked for my case with version 1.81.

0 Kudos
Reply