Skip to content
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

LLVMDependencyConfigTool fails with exception if llvm-config --shared-mode returns in error #7371

Closed
ydirson opened this issue Jun 23, 2020 · 0 comments · Fixed by #7379
Closed
Assignees

Comments

@ydirson
Copy link
Contributor

ydirson commented Jun 23, 2020

While configuring mesa for cross-compiling I hit the following stack trace (with 0.53.2):

;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.

| Checking for function "strtof" : YES
| Checking for function "mkostemp" : YES
| Traceback (most recent call last):
|   File ".../mesonbuild/mesonmain.py", line 129, in run
|     return options.run_func(options)
|   File ".../mesonbuild/msetup.py", line 245, in run
|     app.generate()
|   File ".../mesonbuild/msetup.py", line 159, in generate
|     self._generate(env)
|   File ".../mesonbuild/msetup.py", line 192, in _generate
|     intr.run()
|   File ".../mesonbuild/interpreter.py", line 4168, in run
|     super().run()
|   File ".../mesonbuild/interpreterbase.py", line 412, in run
|     self.evaluate_codeblock(self.ast, start=1)
|   File ".../mesonbuild/interpreterbase.py", line 436, in evaluate_codeblock
|     raise e
|   File ".../mesonbuild/interpreterbase.py", line 430, in evaluate_codeblock
|     self.evaluate_statement(cur)
|   File ".../mesonbuild/interpreterbase.py", line 451, in evaluate_statement
|     return self.evaluate_if(cur)
|   File ".../mesonbuild/interpreterbase.py", line 530, in evaluate_if
|     self.evaluate_codeblock(i.block)
|   File ".../mesonbuild/interpreterbase.py", line 436, in evaluate_codeblock
|     raise e
|   File ".../mesonbuild/interpreterbase.py", line 430, in evaluate_codeblock
|     self.evaluate_statement(cur)
|   File ".../mesonbuild/interpreterbase.py", line 443, in evaluate_statement
|     return self.assignment(cur)
|   File ".../mesonbuild/interpreterbase.py", line 1064, in assignment
|     value = self.evaluate_statement(node.value)
|   File ".../mesonbuild/interpreterbase.py", line 441, in evaluate_statement
|     return self.function_call(cur)
|   File ".../mesonbuild/interpreterbase.py", line 788, in function_call
|     return func(node, posargs, kwargs)
|   File ".../mesonbuild/interpreterbase.py", line 285, in wrapped
|     return f(*wrapped_args, **wrapped_kwargs)
|   File ".../mesonbuild/interpreterbase.py", line 285, in wrapped
|     return f(*wrapped_args, **wrapped_kwargs)
|   File ".../mesonbuild/interpreterbase.py", line 285, in wrapped
|     return f(*wrapped_args, **wrapped_kwargs)
|   [Previous line repeated 2 more times]
|   File ".../mesonbuild/interpreterbase.py", line 155, in wrapped
|     ret = f(*wrapped_args, **wrapped_kwargs)
|   File ".../mesonbuild/interpreterbase.py", line 174, in wrapped
|     return f(*wrapped_args, **wrapped_kwargs)
|   File ".../mesonbuild/interpreter.py", line 3237, in func_dependency
|     d = self.dependency_impl(name, display_name, kwargs)
|   File ".../mesonbuild/interpreter.py", line 3284, in dependency_impl
|     dep = dependencies.find_external_dependency(name, self.environment, kwargs)
|   File ".../mesonbuild/dependencies/base.py", line 2237, in find_external_dependency
|     d = c()
|   File ".../mesonbuild/dependencies/dev.py", line 239, in __init__
|     self._set_new_link_args(environment)
|   File ".../mesonbuild/dependencies/dev.py", line 287, in _set_new_link_args
|     mode = self.get_config_value(['--shared-mode'], 'link_args')[0]
| IndexError: list index out of range

Turns out llvm-config --shared-mode fails (separate issue, https://bugzilla.yoctoproject.org/show_bug.cgi?id=13937), but meson should catch the error and notify the user of the llvm-config failure.

@dcbaker dcbaker self-assigned this Jun 24, 2020
dcbaker added a commit to dcbaker/meson that referenced this issue Jun 24, 2020
dcbaker added a commit to dcbaker/meson that referenced this issue Oct 16, 2020
dcbaker added a commit to dcbaker/meson that referenced this issue Oct 21, 2020
jpakkane pushed a commit that referenced this issue Oct 22, 2020
* depenencies/llvm: Handle llvm-config --shared-mode failing

Fixes: #7371
Fixes: #7878

* test cases/llvm: Refactor to use test.json

Instead of trying to cover everything internally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants