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

Update getting started docs to reflect gdb python requirements #34397

Closed
ghost opened this issue Apr 19, 2021 · 4 comments · Fixed by #34429
Closed

Update getting started docs to reflect gdb python requirements #34397

ghost opened this issue Apr 19, 2021 · 4 comments · Fixed by #34429
Assignees
Labels
area: Documentation bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@ghost
Copy link

ghost commented Apr 19, 2021

Describe the bug
west debug fails with error

/home/user/zephyr-sdk-0.12.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb: error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory
FATAL ERROR: command exited with status 127: /home/user/zephyr-sdk-0.12.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb /home/user/app/build/zephyr/zephyr.elf -ex 'target remote :2331' -ex 'monitor halt' -ex 'monitor reset' -ex load

I followed the getting started guide and the application development steps to create a very simple hello world program outside of the zephyr base directory. It compiles and flashes fine however when trying to get debug functioning I get the above error. I am using a jlink and mimxrt1060_evk.

Based on some stack exchange posts of other people missing that library I installed libpython3.8-dev and that solved the problem. Perhaps this should be added to the list of dependencies? Or did I miss something in the documentation?

To Reproduce
Steps to reproduce the behavior:

  1. west build
  2. west flash
  3. west debug

Expected behavior
GDB starts with no errors

Environment (please complete the following information):

  • OS: Linux Ubuntu 18.04
  • Toolchain: Zephyr SDK, West
@ghost ghost added the bug The issue is a bug, or the PR is fixing a bug label Apr 19, 2021
@galak
Copy link
Collaborator

galak commented Apr 20, 2021

You need to do:
sudo apt get install python3.8-dev

@galak
Copy link
Collaborator

galak commented Apr 20, 2021

This is a known requirement. You can also utilize the /home/user/zephyr-sdk-0.12.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb-no-py version

@galak galak closed this as completed Apr 20, 2021
@jfischer-no
Copy link
Collaborator

Unfortunately, exactly this Python version is no longer available on some distributions.

@ghost
Copy link
Author

ghost commented Apr 20, 2021

You need to do:
sudo apt get install python3.8-dev

If specifically python3.8 is required the getting started documentation should be changed to reflect that. Currently it just calls out installing python3 which on 18.04 installs python3.6.9

I appreciate that your solution solves my problem, and I had even already found a solution before I posted. The issue here is more with the documentation.

@galak galak reopened this Apr 20, 2021
@galak galak changed the title Missing libpython3.8.so.1.0 when running debug Update getting started docs to reflect gdb python requirements Apr 20, 2021
@galak galak added area: Documentation priority: low Low impact/importance bug labels Apr 20, 2021
@galak galak added the has-pr label Apr 20, 2021
@galak galak linked a pull request Apr 20, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Documentation bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants