Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.
419 Discussions

The compiler cannot find std headers

andreagenor
Beginner
2,002 Views

Hi, I installed the OneAPI BaseToolkit and create a vector-add sample project with oneapi-cli, but when I try to compile I get this error bellow.

I compile everything normally with g++ or clang++ with no errors at all.
How can I solve it?

/opt/intel/oneapi/compiler/2022.2.1/linux/bin-llvm/../include/sycl/CL/__spirv/spirv_types.hpp:26:10: fatal error: 'cstddef' file not found

Kubuntu 22.04
OneAPI Base Toolkit
Intel(R) oneAPI DPC++/C++ Compiler 2022.2.1 (2022.2.1.20221020)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2022.2.1/linux/bin-llvm

0 Kudos
4 Replies
VarshaS_Intel
Moderator
1,978 Views

Hi,

 

Thanks for posting in Intel Communities and providing the details.

 

Could you please try on the system which has cstddef file? This should be available on the machine with Ubuntu's build-essentials package.

 

At our end, we have tried using the same command "oneapi-cli" and we are able to get the expected results. Please find the screenshot for more details:

oneapi-cli.png

 

Thanks & Regards,

Varsha

 

0 Kudos
andreagenor
Beginner
1,973 Views

Hi Varsha,
The file is available on the system, take a look

Screenshot_20221207_115856.png

0 Kudos
andreagenor
Beginner
1,937 Views

I found a solution, I needed to export this path to the CPATH variable

export CPATH=$CPATH:/usr/include/c++/11/

 

 

0 Kudos
VarshaS_Intel
Moderator
1,892 Views

Hi,


Glad to know that your issue is resolved. Thanks for sharing the solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Varsha


Reply