提交 72851714 authored 作者: Chiheb Trabelsi's avatar Chiheb Trabelsi

libraries not found by g++ are now printed to the user.

上级 acd4a90f
...@@ -2297,6 +2297,20 @@ class GCC_compiler(Compiler): ...@@ -2297,6 +2297,20 @@ class GCC_compiler(Compiler):
print_command_line_error() print_command_line_error()
# Print errors just below the command line. # Print errors just below the command line.
print(compile_stderr) print(compile_stderr)
not_found_libraries = re.findall('-l["."-_a-zA-Z0-9]*', compile_stderr)
for nf_lib in not_found_libraries:
print('library ' + nf_lib[2:] + ' is not found.')
if re.search('-lPYTHON["."0-9]*', nf_lib, re.IGNORECASE):
py_string = re.search('-lpython["."0-9]*', nf_lib, re.IGNORECASE).group()[8:]
if py_string != '':
print(
'Check if package python-dev ' + py_string + ' or python-devel ' + py_string + ' is installed.'
)
else:
print(
'Check if package python-dev or python-devel is installed.'
)
# We replace '\n' by '. ' in the error message because when Python # We replace '\n' by '. ' in the error message because when Python
# prints the exception, having '\n' in the text makes it more # prints the exception, having '\n' in the text makes it more
# difficult to read. # difficult to read.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论