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
If you call declare_dependency(link_with:...).extract_objects(...), then Meson crashes.
To Reproduce
Add this line to the test case:
diff --git a/test cases/common/80 declare dep/meson.build b/test cases/common/80 declare dep/meson.build
index e427defaf..761a92478 100644
--- a/test cases/common/80 declare dep/meson.build+++ b/test cases/common/80 declare dep/meson.build@@ -6,6 +6,7 @@ exe = executable('dep_user', 'main.c',
dependencies : entity_dep)
test('dep', exe)
+entity_dep.extract_objects('entity1.c')
# just to make sure [] works as a no-op dep here
executable('dummy', 'main.c',
dependencies : [entity_dep, []])
then run meson.py setup 'test cases/common/80 declare dep' build, which produces this exception:
Traceback (most recent call last):
File "/home/elliott/code/meson/mesonbuild/mesonmain.py", line 194, in runreturn options.run_func(options)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/elliott/code/meson/mesonbuild/msetup.py", line 356, in run
app.generate()
File "/home/elliott/code/meson/mesonbuild/msetup.py", line 179, in generatereturnself._generate(env, capture, vslite_ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/elliott/code/meson/mesonbuild/msetup.py", line 224, in _generate
intr.run()
File "/home/elliott/code/meson/mesonbuild/interpreter/interpreter.py", line 3011, in runsuper().run()
File "/home/elliott/code/meson/mesonbuild/interpreterbase/interpreterbase.py", line 162, in runself.evaluate_codeblock(self.ast, start=1)
File "/home/elliott/code/meson/mesonbuild/interpreterbase/interpreterbase.py", line 188, in evaluate_codeblockraise e
File "/home/elliott/code/meson/mesonbuild/interpreterbase/interpreterbase.py", line 180, in evaluate_codeblockself.evaluate_statement(cur)
File "/home/elliott/code/meson/mesonbuild/interpreterbase/interpreterbase.py", line 200, in evaluate_statementreturnself.method_call(cur)
^^^^^^^^^^^^^^^^^^^^^
File "/home/elliott/code/meson/mesonbuild/interpreterbase/interpreterbase.py", line 545, in method_callself.validate_extraction(obj.held_object)
File "/home/elliott/code/meson/mesonbuild/interpreter/interpreter.py", line 3381, in validate_extractionifself.subproject != buildtarget.subproject:
^^^^^^^^^^^^^^^^^^^^^^AttributeError: 'InternalDependency' object has no attribute 'subproject'
meson.build:9:27: ERROR: Unhandled python exception
This is a Meson bug and should be reported!
Expected behavior
A clear error that this is not supported.
system parameters
Is this a cross build or just a plain native build (for the same computer)? native
Describe the bug
If you call
declare_dependency(link_with:...).extract_objects(...)
, then Meson crashes.To Reproduce
Add this line to the test case:
then run
meson.py setup 'test cases/common/80 declare dep' build
, which produces this exception:Expected behavior
A clear error that this is not supported.
system parameters
meson --version
1.2.99 (32be9bd)ninja --version
if it's a Ninja build n/aThe text was updated successfully, but these errors were encountered: