devkitPro / docker

Dockerfiles for https://hub.docker.com/u/devkitpro/
GNU General Public License v3.0
58 stars 28 forks source link

Unable to run arm-none-eabi-gdb #24

Open bmaupin opened 2 years ago

bmaupin commented 2 years ago

I'm unable to run arm-none-eabi-gdb using the devkitpro/devkitarm image. It appears there are a couple issues:

  1. /opt/devkitpro/devkitARM/bin isn't in the path

    $ docker run -it --rm -v "$PWD:/build" devkitpro/devkitarm
    
    # arm-none-eabi-gdb
    bash: arm-none-eabi-gdb: command not found
    
    # find / -name arm-none-eabi-gdb
    /opt/devkitpro/devkitARM/bin/arm-none-eabi-gdb
  2. Dependencies are missing:

    # /opt/devkitpro/devkitARM/bin/arm-none-eabi-gdb
    /opt/devkitpro/devkitARM/bin/arm-none-eabi-gdb: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
    
    # apt install libtinfo5
    ...
    
    # /opt/devkitpro/devkitARM/bin/arm-none-eabi-gdb
    /opt/devkitpro/devkitARM/bin/arm-none-eabi-gdb: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
    
    # apt -y install libpython2.7
    ...
    
    # /opt/devkitpro/devkitARM/bin/arm-none-eabi-gdb
    (gdb) 

Here's my one-liner workaround for anyone running into this:

docker run -it --rm -v "$PWD:/build" devkitpro/devkitarm sh -c "PATH=/opt/devkitpro/devkitARM/bin:"$PATH"; apt -y install libtinfo5 libpython2.7; arm-none-eabi-gdb"

or:

docker run -it --rm -v "$PWD:/build" devkitpro/devkitarm sh -c "PATH=/opt/devkitpro/devkitARM/bin:"$PATH"; apt -y install libtinfo5 libpython2.7; bash"