Created attachment 900506 [details] how_it_was_called.txt emerge_--info.txt /var/tmp/portage/dev-build/meson-1.5.1/{build-info/**,files/**,temp/**,work/**.log} /var/lib/portage/ /etc/portage/ elog Sam James asked to separate a report with two test failures for each failure. from build.log: ``` ========================== cmake: 24 mixing languages ========================== Failed during: build Reason: Compiling source code failed. ... FAILED: subprojects/cmTest/libcmTest.a.p/cmTest.m.o ccache clang -Isubprojects/cmTest/libcmTest.a.p -Isubprojects/cmTest '-I../test cases/cmake/24 mixing languages/subprojects/cmTest' -Isubprojects/cmTest/__CMake_build '-I../test cases/cmake/24 mixing languages/subprojects/cmTest/__CMake_build' -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -fPIE -O3 -pipe -march=alderlake -mabm -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=48 --param=l2-cache-size=30720 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fgraphite-identity -floop-interchange -floop-strip-mine -floop-nest-optimize -ggdb3 -frecord-gcc-switches -g -DSOME_MAGIC_DEFINE=42 -MD -MQ subprojects/cmTest/libcmTest.a.p/cmTest.m.o -MF subprojects/cmTest/libcmTest.a.p/cmTest.m.o.d -o subprojects/cmTest/libcmTest.a.p/cmTest.m.o -c '../test cases/cmake/24 mixing languages/subprojects/cmTest/cmTest.m' clang: error: unknown argument '-mabm'; did you mean '-marm'? clang: error: unknown argument: '-fgraphite-identity' clang: error: unknown argument: '-floop-interchange' clang: error: unknown argument: '-floop-strip-mine' clang: error: unknown argument: '-floop-nest-optimize' [3/5] Compiling C object subprojects/cmTest/libcmTest.a.p/cmTest.c.o ninja: build stopped: subcommand failed. ``` Looks like it doesn't strip compilation flags somewhere. IDK how it should be solved ideally.
That is objc code being compiled by an objc compiler. Do you have OBJCFLAGS set to anything?
(In reply to Eli Schwartz from comment #1) > That is objc code being compiled by an objc compiler. Do you have OBJCFLAGS > set to anything? `rg "OBJCFLAGS" /etc/` ** no output, return code 1 **
` echo $OBJCFLAGS ` ``` ``` return code 0
objc code should only ever build with OBJCFLAGS, not CFLAGS. CMake is a bit broken here and in our test case we triggered the bug. It was, coincidentally, fixed in git master -- which is why originally I was confused as it worked correctly for me in a development clone and failed for you using the ebuild! (The upstream fix did a few things surrounding mixed compilers for mixed code, because at least on Windows it is a fools errand to try compiling ObjC using cl.exe, but it might be the default C compiler, so you have to correctly handle the case where C and ObjC are compiled in the same project using different branded compilers. This is *also* the case on Gentoo because GCC is built without USE=objc.)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=274cd7d5c629406c817a03eadbf1d8da50791172 commit 274cd7d5c629406c817a03eadbf1d8da50791172 Author: Eli Schwartz <eschwartz@gentoo.org> AuthorDate: 2024-09-20 21:22:28 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-09-20 21:23:06 +0000 dev-build/meson: add 1.5.2 Closes: https://bugs.gentoo.org/938133 Closes: https://bugs.gentoo.org/938259 Closes: https://bugs.gentoo.org/936670 Closes: https://bugs.gentoo.org/936911 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> dev-build/meson/Manifest | 3 + dev-build/meson/meson-1.5.2.ebuild | 190 +++++++++++++++++++++++++++++++++++++ 2 files changed, 193 insertions(+)