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

Can't find open source projecs for Intel OneAPI C++ Compiler

gal_hadar115
Beginner
1,556 Views

I'm trying to play around with the Intel OneAPI C++ 2023 Compiler in Visual Studio 2022. I want to use a large open source project and build it using the compiler. Unfortunately every project I use e.g. OpenCV, Blender, Copperspice, LLVM, fails to build (during the build process it throws many warnings and errors, probably due to the compilers many unsupported features).

I generate the .sln file using cmake and include the compiler with the -t option like so:

cmake -G "Visual Studio 17 2022" -T "Intel C++ Compiler 2023" Path\to\CmakeLists

The samples that come in the oneapi-samples GitHub page are too small and short for me to experience on.

If anyone knows of any large open source projects similar to the ones I mentioned above, I'd greatly appreciate the help.

Labels (3)
0 Kudos
12 Replies
SeshaP_Intel
Moderator
1,516 Views

Hi,


Thank you for posting in Intel communities.


Please refer to the below link for Intel OneAPI samples. You can implement a project based on your use case.

https://github.com/oneapi-src/oneAPI-samples


For building the project using CMake, please refer to the below link for more details.

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-setup/use-the-command-line/use-cmake-with-the-compiler.html


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
gal_hadar115
Beginner
1,504 Views

As I've mentioned before, the OneAPI-Samples are too small an short for me. I was looking for open source projects that are big and heavy (perhaps more than 30 min of build time).

I was looking at LLVM project but when I try to build it in Visual Studio with the Intel OneAPI DPC++ compiler I get many errors and the build fails, where with the default Visual Studio C++ compiler it builds with no errors

0 Kudos
SeshaP_Intel
Moderator
1,457 Views

Hi,


Could you please provide the LLVM project, steps(if followed any), and the complete error log so we can investigate this issue more from our end?


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
gal_hadar115
Beginner
1,412 Views

I will add and say I'm on Windows using Visual Studio 2022 17.4.4 with Desktop Development with C++ workload, and the Intel OneAPI basic toolkit downloaded.

In the Intel OneAPI command prompt for Intel 64 for Visual Studio 2022, these are the steps I used:

1. git clone https://github.com/llvm/llvm-project.git

2. cd llvm-project

3. mkdir build & cd build

4. cmake -G "Visual Studio 17 2022" -T "Intel C++ Compiler 2023" -DCMAKE_BUILD_TYPE=Release ..\llvm

5. msbuild LLVM.sln /t:Rebuild /p:Configuration=release;platform=x64

There are many warnings and errors. Here is an example of some:

C:\projects_to_build\llvm\llvm\utils\TableGen\X86RecognizableInstr.cpp(1302,61): warning : unused parameter 'OpSize'
[-Wunused-parameter] [C:\projects_to_build\llvm\build\utils\TableGen\obj.llvm-tblgen.vcxproj]

C:\projects_to_build\llvm\llvm\include\llvm/TableGen/Record.h(1418,25): warning : unused parameter 'Bit' [-Wunused-pa
rameter] [C:\projects_to_build\llvm\build\utils\TableGen\obj.llvm-tblgen.vcxproj]

xilib: : warning #10006: ignoring unknown option '/Qoption,link,/machine:x64' [C:\projects_to_build\llvm\build\unittest
s\Support\DynamicLibrary\DynamicLibraryLib.vcxproj]

C:\projects_to_build\llvm\llvm\include\llvm/Demangle/MicrosoftDemangleNodes.h(317,33): warning : unused parameter 'OB'
[-Wunused-parameter] [C:\projects_to_build\llvm\build\lib\Demangle\LLVMDemangle.vcxproj]
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override {}
^

C:\projects_to_build\llvm\llvm\include\llvm/Demangle/MicrosoftDemangleNodes.h(317,49): warning : unused parameter 'Flag
s' [-Wunused-parameter] [C:\projects_to_build\llvm\build\lib\Demangle\LLVMDemangle.vcxproj]
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override {}
^

C:\projects_to_build\llvm\llvm\lib\Demangle\MicrosoftDemangleNodes.cpp(130,65): warning : unused parameter 'Flags' [-Wu
nused-parameter] [C:\projects_to_build\llvm\build\lib\Demangle\LLVMDemangle.vcxproj]
void PrimitiveTypeNode::outputPre(OutputBuffer &OB, OutputFlags Flags) const {
^

C:\projects_to_build\llvm\llvm\include\llvm/Support/raw_ostream.h(149,43): warning : unused parameter 'ExtraSize' [-Wun
used-parameter] [C:\projects_to_build\llvm\build\lib\Support\LLVMSupport.vcxproj]
virtual void reserveExtraSpace(uint64_t ExtraSize) {}
^
In file included from C:\projects_to_build\llvm\llvm\lib\Support\ARMAttributeParser.cpp:9:
In file included from C:\projects_to_build\llvm\llvm\include\llvm/Support/ARMAttributeParser.h:13:
In file included from C:\projects_to_build\llvm\llvm\include\llvm/Support/ELFAttributeParser.h:14:
In file included from C:\projects_to_build\llvm\llvm\include\llvm/Support/DataExtractor.h:14:

C:\projects_to_build\llvm\llvm\lib\Support\Compression.cpp(96,34): warning : unused parameter 'InputBuffer' [-Wunused-p
arameter] [C:\projects_to_build\llvm\build\lib\Support\LLVMSupport.vcxproj]
TRACKEDEXEC : error zlib: :uncompress(StringRef InputBuffer, char *UncompressedBuffer, [C:\projects_to_build\llvm\build
\lib\Support\LLVMSupport.vcxproj]
^

Done Building Project "C:\projects_to_build\llvm\build\lib\Support\LLVMSupport.vcxproj" (Rebuild target(s)) -- FAILED.

0 Kudos
Hsbsh
Beginner
1,396 Views
That is funny -- gcc for example requires -1 minor version of gcc to compile itself. You can compile it with clang using some hacks, sure, but I am only sure about gcc 4.7, last version without C++.

Boostraping gcc compiler without gcc compiler takes 14 steps and is insanely complicated. https://stackoverflow.com/a/65708958/11173412
Linux kernel also took a lot of effort to be clang ready: https://github.com/ClangBuiltLinux/linux/issues
As for projects that use icx: https://gitlab.com/libeigen/eigen/-/commit/b52312068766eff6c96ff6d2534ab240ccb48a76
0 Kudos
gal_hadar115
Beginner
1,380 Views

I honestly did not understand your answer at all.

I'm not using Linux so that has nothing todo with gcc.

And the link you posted for "projects using icx", is wrong.

0 Kudos
Hsbsh
Beginner
1,376 Views

Eigen uses Intel DPCPP Compiler. And gcc can be used in Windows, it is just called differently.

0 Kudos
SeshaP_Intel
Moderator
1,322 Views

Hi,

 

We have tried to build your project using cmake and have not encountered any errors. 

Please use the below commands to build the project. We suggest you wait until the project has finished building completely.

cmake -G "Visual Studio 17 2022" -T "Intel C++ Compiler 2023" -DCMAKE_BUILD_TYPE=Release ..\llvm
cmake --build .

Please find the below screenshot for more details. 

SeshaP_Intel_0-1676883828668.png

Please let us know if you face any more issues.  

 

Thanks and Regards,

Pendyala Sesha Srinivas

0 Kudos
gal_hadar115
Beginner
1,301 Views

I did these exact steps and I got the following errors, along with many warnings, similar to your image above.

gal_hadar115_0-1676906467494.png

And then the build fails.

Are there any prerequisites that you are using that perhaps I'm not, and that is why I can't complete a single build?

0 Kudos
SeshaP_Intel
Moderator
1,256 Views

Hi,

 

We followed the below steps in the Intel oneAPI command prompt for Intel 64 for Visual Studio 2022 while building the project. 

git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build & cd build
cmake -G "Visual Studio 17 2022" -T "Intel C++ Compiler 2023" -DCMAKE_BUILD_TYPE=Release ..\llvm
cmake --build .

If you still face the same errors, we suggest you re-install the Intel OneAPI Base toolkit and Intel OneAPI HPC toolkit after successful uninstallation.

 

Thanks and Regards,

Pendyala Sesha Srinivas

 

0 Kudos
SeshaP_Intel
Moderator
1,215 Views

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


0 Kudos
SeshaP_Intel
Moderator
1,170 Views

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


0 Kudos
Reply