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
After creating a venv, runnin dep_check shows help preceded by a error message like the following:
(venv) ➜ dep_check
# pkg-config --cflags -- python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'to the PKG_CONFIG_PATH environment variableNo package 'python3' foundpkg-config: exit status 1WARNING:root:Couldn't load GO library, you won't be able to use dep-check on GO projects.usage: dep_check [-h] {build,check,graph}dep_check: error: the following arguments are required: feature(venv) ➜
Segfault
I tried to remove the warning by adding to the the following to my profile file
#setup for pkg-configexport PKG_CONFIG_PATH=$(asdf where python 3.7.7)/lib/pkgconfig/
This solves the warning issue but the resulting goparse.so from the go build is faulty creating a segmentation fault:
(venv) ➜ test python -Xfaulthandler venv/bin/dep_check
Fatal Python error: Segmentation fault
Current thread 0x0000000112af9dc0 (most recent call first):
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 1043 in create_module
File "<frozen importlib._bootstrap>", line 583 in module_from_spec
File "<frozen importlib._bootstrap>", line 670 in _load_unlocked
File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 983 in _find_and_load
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1035 in _handle_fromlist
File "/private/tmp/test/venv/lib/python3.7/site-packages/dep_check/infra/go_parser.py", line 9 in<module>
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 728 in exec_module
File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 983 in _find_and_load
File "/private/tmp/test/venv/lib/python3.7/site-packages/dep_check/main.py", line 13 in<module>
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 728 in exec_module
File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 983 in _find_and_load
File "venv/bin/dep_check", line 6 in<module>
[1] 93970 segmentation fault python -Xfaulthandler venv/bin/dep_check
I'm not sure why there is a segmentation fault, might be related to my environment. But in any case, the project is python only so this seg fault should no happen
Proposed solution:
There 2 solution for this issue from what I could investigate.
1 - No error message:
Do no show the pkg-config error message if possible. This would prevent people like me to try solving it as it is pretty explicit and easy to follow
2 - Only import GoParser if necessary
The seg fault is caused by the
#infra/go_parser.py 9: from .libimportgoparse
I don't the reason why there is a seg fault, but it's most likely a library linking issue, but in a python project this should not matter !
So instead of importing the go module in every case, import it on demand if the project uses go.
The text was updated successfully, but these errors were encountered:
Env
OS: MacOS Catalina 10.15.4 (19E287)
Python: Python 3.7.7 ( using asdf )
Issue
Nominal case
After creating a venv, runnin
dep_check
shows help preceded by a error message like the following:Segfault
I tried to remove the warning by adding to the the following to my profile file
This solves the warning issue but the resulting
goparse.so
from thego build
is faulty creating a segmentation fault:I'm not sure why there is a segmentation fault, might be related to my environment. But in any case, the project is python only so this seg fault should no happen
Proposed solution:
There 2 solution for this issue from what I could investigate.
1 - No error message:
Do no show the
pkg-config
error message if possible. This would prevent people like me to try solving it as it is pretty explicit and easy to follow2 - Only import GoParser if necessary
The seg fault is caused by the
I don't the reason why there is a seg fault, but it's most likely a library linking issue, but in a python project this should not matter !
So instead of importing the go module in every case, import it on demand if the project uses go.
The text was updated successfully, but these errors were encountered: