> On Feb 17, 2022, at 7:09 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > > On Thu, 17 Feb 2022 at 07:56, Jagannathan Raman <jag.ra...@oracle.com> wrote: >> >> The compiler path that cmake gets from meson is corrupted. It results in >> the following error: >> | -- The C compiler identification is unknown >> | CMake Error at CMakeLists.txt:35 (project): >> | The CMAKE_C_COMPILER: >> | /opt/rh/devtoolset-9/root/bin/cc;-m64;-mcx16 >> | is not a full path to an existing compiler tool. >> >> Explicitly specify the C compiler for cmake to avoid this error > > This sounds like a bug in Meson. Is there a Meson bug report > we can reference in the commit message here ?
Hi Peter, This issue reproduces with the latest meson [1] also. I noticed the following about the “binaries” section [2]. The manual says meson could pass the values in this section to find_program [3]. As such I’m wondering if it’s OK to set compiler flags in this section because find_program doesn’t seem to accept any compiler flags. The compiler flags could be set in the “built-in options” section using options such as “c_args”, “cpp_args” and “objc_args” [4]. When I moved CPU_CFLAGS from the binaries section to the built-in-options section in “configure", I don’t see the issue anymore. [1]: https://github.com/mesonbuild/meson.git [2]: https://mesonbuild.com/Machine-files.html#binaries [3]: https://cmake.org/cmake/help/latest/command/find_program.html [4]: https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-tables.md (section “Language arguments parameter names") Thank you! -- Jag > > thanks > -- PMM