I'm trying to compile some C++ and C files using some makefiles and icpx compiler. The problem is that compiler throws errors from some libraries such s gdal library, which doesn't make senses to me. So, I am wondering maybe the problem is with C++ standards that i am trying to use. My question is which C++ standards are defined for Intel oneAPI base toolkit? or can someone help me with suggestions for solving the errors in the screenshot attached?
>>Which C++ standards are defined for Intel oneAPI base toolkit?
The Intel® oneAPI DPC++/C++ Compiler conforms to the ANSI/ISO C++17 standard.
Please visit this link for more information:
Could you please provide the compiler version, OS version, and minimal reproducer along with build steps. So that we can check it on our end.
I appreciate your help!
I tried to go with C++17 standards, but it seems it doesn't work.
- wget https://registrationcenter-download.intel.com/akdlm/irc_nas/17769/l_BaseKit_p_2021.2.0.2883_offline.sh
- sudo bash l_BaseKit_p_2021.2.0.2883_offline.sh
- sudo sh ./l_BaseKit_p_2021.2.0.2883_offline.sh -s -a --silent --eula accept
- sudo apt update
- sudo apt -y install cmake pkg-config build-essential
- sudo apt install python3.8
- sudo apt install libgdal-dev 2- export CPLUS_INCLUDE_PATH=/usr/include/gdal 3- export C_INCLUDE_PATH=/usr/include/gdal 4- pip3 install GDAL==$(gdal-config –version)
Then, I tried to compile GDAL C/C++ files. But lots of errors I face, especially for C programs.
Compiling any C program in the attached rar file throws many errors --> both using icpx /path/ and icx /path/
I appreciate a lot any help,
Thank you so much for your help. After all installations, I ran the "makefile" in the Model folder --> "make -f makefile mk_debug"
This is the way I try to compile them. I see most of the errors are related to C programmes (we have combinations of C and C++ programs), for example, the error of casting "void* to "uint8*", etc. So, I appreciate any help me how I can deal with this issue and combinations of C and C++
Thank you, Rajesh,
Can I please ask you how did you use ICC/ICX 2021.2 compiler? Is it in the Intel OneAPI toolkit? If yes, can you please what tag/syntax you have used? if not can you please tell me how to install it?
Because the only tag I am able to use without error is either icpx.... or icx ...., and both throw errors that I already had.
ICC compiler is present in Intel oneAPI HPC toolkit. You can download it from the below link:
From installing libgdal-dev: gdal-config --version is 2.2.3
I have set the CC=icx or icc in the makefile.
To start the oneAPI environment please source the oneAPI environment using this command:
I have made the above change in your project and it worked.
Please let us know if you face any issues.
I was working on this issue yesterday and your solution worked well! I installed Intel OneAPI HPC toolkit on my ubuntu VM and I used classic C++ compiler (icc) and it worked great. I didn't receive any code-related errors from compiling the gdal library.
Many many thanks to you!
Thanks for the confirmation!
As this issue has been resolved, we will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
Have a Good day.