Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

meson support

Ferruh
직원
4,969 조회수

Using oneAPI compiler with meson is giving the following error [1], clang is on the path [2].

I assume this is because oneAPI does not expose itself as a clang compiler. Will there be official meson support for oneAPI?

 

Btw, this is for DPDK opensource project. We used to support 'icc' which works fine with meson, but the new oneAPI compiler is failing.

 

Thanks for your support, Ferruh.

 

[1]

$ CC=clang meson setup build-clang

The Meson build system

Version: 0.56.2

Source dir: /root/development/dpdk-next-net

Build dir: /root/development/dpdk-next-net/build-clang

Build type: native build

Program cat found: YES (/usr/bin/cat)

Project name: DPDK

Project version: 21.08.0-rc0

Using 'CC' from environment with value: 'clang'

 

meson.build:4:0: ERROR: Unknown compiler(s): [['clang']]

 

 

[2]

$ clang --version

Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0 (2021.3.0.20210619)

Target: x86_64-unknown-linux-gnu

Thread model: posix

InstalledDir: /opt/intel/oneapi/compiler/2021.3.0/linux/bin

 

0 포인트
7 응답
VidyalathaB_Intel
중재자
4,947 조회수

Hi,

Thanks for reaching out to us.

>>$ CC=clang meson setup build-clang

Could you please try using CXX instead of CC and dpcpp against clang and let us know if it helps.

Regards,

Vidya.


0 포인트
Ferruh
직원
4,934 조회수

Thanks Vidya.

CXX worked for both  'clang' & 'dpcpp'.

0 포인트
Ferruh
직원
4,924 조회수

Ahh, it seems I replied too early.

When CXX is set, the compiler is not used at all. Since the project is a C project, when CXX=dpcpp set, all builds are done with another compiler in the system (GCC).

So still not able to compile the project with oneAPI.

0 포인트
VidyalathaB_Intel
중재자
4,898 조회수

Hi,

We are looking into this issue internally. we will get back to you soon.

Thanks & Regards,

Vidya.


0 포인트
Ferruh
직원
4,888 조회수

I have experimented with following if it helps.

- First, run "meson setup" with default (non oneAPI) clang

- source " .../oneapi/setvars.sh/" to make oneAPI clang in the path

- build project with ninja

This worked fine and I confirmed the correct toolchain used for compilation [1], so the compiler works fine only meson support needs to be added.

 

[1]

$ readelf -p .comment build/lib/librte_ethdev.so.21.3

String dump of section '.comment':

  [     0]  GCC: (GNU) 11.1.1 20210531 (Red Hat 11.1.1-3)

  [    2e]  Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0 (2021.3.0.20210619)

0 포인트
Alina_S_Intel
중재자
4,848 조회수

This is a known issue: https://github.com/mesonbuild/meson/issues/8113 . As far as I understand, you need to ask meson about support.


I checked our internal resources and found one application using meson. It is built using ninja, too. So meson + ninja could be a workaround.


0 포인트
Alina_S_Intel
중재자
4,820 조회수

Sorry for the delay, the issue is escalated to the development team (CMPLRLLVM-29939).


We will no longer monitor this thread.  

If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.

Thanks


0 포인트
응답