You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In a pure CUDA project that links an executable built target with a static library build target, meson setup panics if 'c' is not declared as a language in the project() along with 'cuda'
Declaring 'c' as one of the project languages makes it behave just fine.
Removing the static library build target and only compiling main.cu as a normal cuda executable makes it behave just fine.
~/../../meson_repro ❯ meson setup out
The Meson build system
Version: 1.7.0
Source dir: /home/riley/programming/tmp/meson_repro
Build dir: /home/riley/programming/tmp/meson_repro/out
Build type: native build
Project name: meson_repro
Project version: undefined
Cuda compiler for the host machine: nvcc (nvcc 12.8.61
Build cuda_12.8.r12.8/compiler.35404655_0)
Cuda linker for the host machine: nvcc nvlink 12.8.61
Build cuda_12.8.r12.8/compiler.35404655_0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Build targets in project: 2
Found ninja-1.12.1 at /sbin/ninja
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/mesonbuild/mesonmain.py", line 193, in run
return options.run_func(options)
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/mesonbuild/msetup.py", line 365, in run
app.generate()
~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/mesonbuild/msetup.py", line 188, in generate
return self._generate(env, capture, vslite_ctx)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/mesonbuild/msetup.py", line 253, in _generate
captured_compile_args = intr.backend.generate(capture, vslite_ctx)
File "/usr/lib/python3.13/site-packages/mesonbuild/backend/ninjabackend.py", line 663, in generate
self.generate_target(t)
~~~~~~~~~~~~~~~~~~~~^^^
File "/usr/lib/python3.13/site-packages/mesonbuild/backend/ninjabackend.py", line 1097, in generate_target
elem = self.generate_link(target, outname, final_obj_list, linker, pch_objects, stdlib_args=stdlib_args)
File "/usr/lib/python3.13/site-packages/mesonbuild/backend/ninjabackend.py", line 3501, in generate_link
commands = linker.compiler_args()
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'compiler_args'
ERROR: Unhandled python exception
This is a Meson bug and should be reported!
Expected behavior
Not to panic.
system parameters
Arch Linux x86_64
meson 1.7.0
python 3.13.2
ninja 1.12.1
The text was updated successfully, but these errors were encountered:
I was able to reproduce this from the the most recent commit as well as the official arch linux package
I was unable to find a good commit as to bisect from.
But, if it is helpful:
I was able to bisect to find that 0240d760c7699a059cc89e584363c6431cdd2b61 is the first commit that gives the same error message that the most recent version has.
Before this commit I found many different error messages. I did not respect MSPV when poking around for a good bisection commit. To test the different versions, I just did ../meson/meson.py from my dummy repro project.
Describe the bug
In a pure CUDA project that links an executable built target with a static library build target,
meson setup
panics if'c'
is not declared as a language in theproject()
along with'cuda'
Declaring
'c'
as one of the project languages makes it behave just fine.Removing the static library build target and only compiling main.cu as a normal cuda executable makes it behave just fine.
To Reproduce
Expected behavior
Not to panic.
system parameters
meson 1.7.0
python 3.13.2
ninja 1.12.1
The text was updated successfully, but these errors were encountered: