-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake 3.31.0 causes breakage with cmake module due to --dependency-file
#13888
Comments
I met similar issue too |
meson also fails its own test suite with cmake 3.31.0
|
Just to check here -- what version of binutils is this? I'm wondering if you're hitting https://gitlab.kitware.com/cmake/cmake/-/issues/26401 (https://sourceware.org/bugzilla/show_bug.cgi?id=32300) or if that's a totally different issue. |
strace also confirms that:
And the reason why it says "no error" is a bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32359 |
* CI: Adding initial workflow * Add required meson version * Add temporary project version * Use gnu2x for c_std instead of gnu23 * build.yml: Add more deps * meson.build: Try to find installed sqlite{3,cpp} For #6 * Use clang, reset c_std=gnu23, install bun * Install clang-19 * Use "bun run meson-setup clang-release" * Revert "Use "bun run meson-setup clang-release"" This reverts commit 79c9e22. * Fix version * remove blank line * Add path filters * Update build.yml Attempt to add freeglut3-dev since this was also the issue when building the flatpak * Update build.yml Replaced vs.example with the actual meson command; otherwise, if successful, the machine would run the application without headless mode, and wait for user input. * Update .github/workflows/build.yml Co-authored-by: Andy Alt <[email protected]> * Update build.yml * Try to install cmake 3.30.5 For mesonbuild/meson#13888 * Install libpng-dev * Update build.yml Only keeping 24.04 for now, since the other versions ship with an older incompatible libc++ --------- Co-authored-by: KaruroChori <[email protected]>
This change makes the test suite pass again: diff --git c/mesonbuild/cmake/interpreter.py i/mesonbuild/cmake/interpreter.py
index fafee86ab..12d7049d2 100644
--- c/mesonbuild/cmake/interpreter.py
+++ i/mesonbuild/cmake/interpreter.py
@@ -828,6 +828,7 @@ class CMakeInterpreter:
cmake_args = []
cmake_args += cmake_get_generator_args(self.env)
+ cmake_args += ['-DCMAKE_LINK_DEPENDS_USE_LINKER=FALSE']
cmake_args += [f'-DCMAKE_INSTALL_PREFIX={self.install_prefix}']
cmake_args += extra_cmake_options
if not any(arg.startswith('-DCMAKE_BUILD_TYPE=') for arg in cmake_args): But I'm not sure it's right. |
Describe the bug
Upgrading from cmake 3.30.5 to 3.31.0 causes linking not to succeed when a cmake subproject is used.
To Reproduce
Then simply run
And observe a linker error:
Cause
The difference between the `build.ninja` files
The difference between the generated `meson.build` files
The difference between the outputs of the cmake invocations
cmake biset
Bisecting cmake points to commit c1c4cf9545d17928c065fca344c48e03b80291f0 added in https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9665. This change touches many files, but it seems that change did not introduce the use of
--dependency-file
, so maybe there was an issue with cmake earlier and it did not actually use that argument.I am wondering if maybe it is enough to strip the
--dependency-file
linker options when it specifies a path insideCMakeFiles
and fix the path for manually specified--dependency-file
.Workaround
Add
CMAKE_LINK_DEPENDS_USE_LINKER=FALSE
, e.g.:This is another thing that meson's cmake module could potentially do.
system parameters
3.12.7
1.6.0
1.12.1
The text was updated successfully, but these errors were encountered: