Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938133 - dev-build/meson-1.5.1 test fail : cmake: 24 mixing languages
Summary: dev-build/meson-1.5.1 test fail : cmake: 24 mixing languages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-18 03:14 UTC by Arniii
Modified: 2024-09-20 21:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
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 (meson-1.5.1_llvm_test_fail.tar.lz,192.53 KB, application/x-lzip)
2024-08-18 03:14 UTC, Arniii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniii 2024-08-18 03:14:08 UTC
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.
Comment 1 Eli Schwartz gentoo-dev 2024-08-18 06:02:05 UTC
That is objc code being compiled by an objc compiler. Do you have OBJCFLAGS set to anything?
Comment 2 Arniii 2024-08-18 07:18:58 UTC
(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 **
Comment 3 Arniii 2024-08-18 07:20:13 UTC
` echo $OBJCFLAGS  `
```

```
return code 0
Comment 4 Eli Schwartz gentoo-dev 2024-08-18 20:49:47 UTC
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.)
Comment 5 Larry the Git Cow gentoo-dev 2024-09-20 21:23:33 UTC
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(+)