- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel icpx fails with CMake with lots of different errors and refuses to work. I fix one and another pops up... Its a complete mess and completely unusable. I have tried to fix every error I keep getting with this toolkit but it is unusable with CMake for me as it always finds a way to fail or break. I have followed Installation instructions perfectly and it just does not want to work. I cant find a fix for the error it gives me. It should work according to:
Here is my cmake:
cmake_minimum_required(VERSION 3.23.0)
project(TestingDPCPP LANGUAGES CXX)
find_package(IntelDPCPP REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
The error I get:
shmarvdogg@nuc11extremea770:~/TestingDPCPP$ cmake CMakeLists.txt -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
-- The CXX compiler identification is IntelLLVM 2023.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx
-- Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx - broken
CMake Error at /usr/share/cmake-3.25/Modules/CMakeTestCXXCompiler.cmake:63 (message):
The C++ compiler
"/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/shmarvdogg/TestingDPCPP/CMakeFiles/CMakeScratch/TryCompile-BDAPI3
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_3ba2d/fast && /usr/bin/gmake -f CMakeFiles/cmTC_3ba2d.dir/build.make CMakeFiles/cmTC_3ba2d.dir/build
gmake[1]: Entering directory '/home/shmarvdogg/TestingDPCPP/CMakeFiles/CMakeScratch/TryCompile-BDAPI3'
Building CXX object CMakeFiles/cmTC_3ba2d.dir/testCXXCompiler.cxx.o
/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx -MD -MT CMakeFiles/cmTC_3ba2d.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_3ba2d.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_3ba2d.dir/testCXXCompiler.cxx.o -c /home/shmarvdogg/TestingDPCPP/CMakeFiles/CMakeScratch/TryCompile-BDAPI3/testCXXCompiler.cxx
Linking CXX executable cmTC_3ba2d
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3ba2d.dir/link.txt --verbose=1
/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx CMakeFiles/cmTC_3ba2d.dir/testCXXCompiler.cxx.o -o cmTC_3ba2d
/usr/bin/ld: cannot find -lstdc++: No such file or directory
icpx: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_3ba2d.dir/build.make:100: cmTC_3ba2d] Error 1
gmake[1]: Leaving directory '/home/shmarvdogg/TestingDPCPP/CMakeFiles/CMakeScratch/TryCompile-BDAPI3'
gmake: *** [Makefile:127: cmTC_3ba2d/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
-- Configuring incomplete, errors occurred!
See also "/home/shmarvdogg/TestingDPCPP/CMakeFiles/CMakeOutput.log".
See also "/home/shmarvdogg/TestingDPCPP/CMakeFiles/CMakeError.log".
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
Could you please remove the below line in the CMakeLists.txt file and let us know the results?
find_package(IntelDPCPP REQUIRED)
We have tried to build a hello world C++ program. We have not found any issues with CMake.
Please find the below output screenshot and TestingDPCPP.zip file for more details.
If the above workaround did not resolve your issue, could you please share the complete reproducer file and the steps to reproduce your issue?
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there, it is a bug that I have been told is going to be fixed in a release soon. The issue was it was defaulting to GCC12 over 11 which I did not have some build tools installed for but the compiler was not saying this. Figured it out after many hours of debugging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Has the information provided above helped? If yes, could you please confirm whether we can close this thread from our end?
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also encountered the issue on Ubuntu22. The issue could be fixed by removing the gcc-12 package.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page