Using oneAPI compiler with meson is giving the following error , clang is on the path .
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.
$ CC=clang meson setup build-clang
The Meson build system
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']]
$ clang --version
Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0 (2021.3.0.20210619)
Thread model: posix
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.
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.
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 , so the compiler works fine only meson support needs to be added.
$ 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)
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.
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.