Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

intel/oneapi-basekit:devel-ubuntu22.04 + cmake + intel compiler does not seem to work

bungeetux
Beginner
831 Views

I have try to build my project with the docker image intel/oneapi-basekit:devel-ubuntu22.04 using cmake.
But I am blocked at the very beginning, cmake complaint when testing the c++ support.

I have done a minimal standalone script to reproduce the problem, it write a 3 lines CMakeLists.txt with just the faulty find_package :

 

#!/bin/bash -x

image=intel/oneapi-basekit:devel-ubuntu22.04
docker pull "$image"

mkdir -p myproject

# cmake_minimum_required(VERSION 3.25.1)
# project(myproject)
# find_package(IntelDPCPP REQUIRED)
echo "cmake_minimum_required(VERSION 3.25.1)" > myproject/CMakeLists.txt
echo "project(myproject)" >> myproject/CMakeLists.txt
echo "find_package(IntelDPCPP REQUIRED)" >> myproject/CMakeLists.txt

# run the test
docker run -v $(pwd):/test -it "$image" /bin/bash -c "cd /test && mkdir -p build && cd build && cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx ../myproject"

 

the result output :

 

ubuntu@ip-10-0-187-190:~/work2023/dockerbugreport$ ./mytest.sh 
+ image=intel/oneapi-basekit:devel-ubuntu22.04
+ docker pull intel/oneapi-basekit:devel-ubuntu22.04
devel-ubuntu22.04: Pulling from intel/oneapi-basekit
Digest: sha256:99220a923d7509285bd60e46e6261d39ff730d6ac23164106eaa9f1e6511d159
Status: Image is up to date for intel/oneapi-basekit:devel-ubuntu22.04
docker.io/intel/oneapi-basekit:devel-ubuntu22.04
+ mkdir -p myproject
+ echo 'cmake_minimum_required(VERSION 3.25.1)'
+ echo 'project(myproject)'
+ echo 'find_package(IntelDPCPP REQUIRED)'
++ pwd
+ docker run -v /home/ubuntu/work2023/dockerbugreport:/test -it intel/oneapi-basekit:devel-ubuntu22.04 /bin/bash -c 'cd /test && mkdir -p build && cd build && cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx ../myproject'
SYCL feature test compile failed!
compile output is: 
CMake Error at /opt/intel/oneapi/compiler/2023.0.0/linux/IntelDPCPP/IntelDPCPPConfig.cmake:270 (SYCL_FEATURE_TEST_EXTRACT):
  SYCL_FEATURE_TEST_EXTRACT Function invoked with incorrect arguments for
  function named: SYCL_FEATURE_TEST_EXTRACT
Call Stack (most recent call first):
  CMakeLists.txt:3 (find_package)


-- The SYCL compiler is /opt/intel/oneapi/compiler/2023.0.0/linux/bin/icx
-- The SYCL Flags are -fsycl 
-- The SYCL Language Version is 
-- Configuring incomplete, errors occurred!
See also "/test/build/CMakeFiles/CMakeOutput.log".

 

 I will test other docker images , not sure if i can fix the problem installing some software, i have verify that gcc and g++ is installed.

0 Kudos
1 Solution
NoorjahanSk_Intel
Moderator
786 Views

Hi,


Since this is a duplicate thread of, https://community.intel.com/t5/Intel-oneAPI-Data-Parallel-C/Unable-to-use-cmake-intel-compiler-intel-oneapi-basekit-devel/m-p/1477858#M2984

we will no longer monitor this thread. We will continue addressing this issue in the other thread.


Thanks & Regards,

Noorjahan.


View solution in original post

0 Kudos
1 Reply
NoorjahanSk_Intel
Moderator
787 Views

Hi,


Since this is a duplicate thread of, https://community.intel.com/t5/Intel-oneAPI-Data-Parallel-C/Unable-to-use-cmake-intel-compiler-intel-oneapi-basekit-devel/m-p/1477858#M2984

we will no longer monitor this thread. We will continue addressing this issue in the other thread.


Thanks & Regards,

Noorjahan.


0 Kudos
Reply