This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

gcc-arm-11.2-2022.02-x86_64-arm-none-eabi gdb FAILS on ubuntu

Hi,

I downloaded gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads.

Unpacked the tar into my home folder. When I then run

```

p@bp-legion:~/Downloads/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin$ ./arm-none-eabi-gdb --version
./arm-none-eabi-gdb: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

```

I got this AFTER being forced to `ln`

- /usr/lib/x86_64-linux-gnu/libncursesw.so.6

- /usr/lib/x86_64-linux-gnu/libtinfo.so.6

I didn't graduate on linux, did I miss "the easy way" to get the arm toolchain working on my ubuntu installation?

I can't imagine that I am the first to install the arm toolchain on a fresh installed ubuntu 22.04 environment......

Parents
  • Hi,

    So the trick is that everyone got a Python on the system. Please note that you can easily download sources and build Python 3.6 with shared library Arm GDB requires.

    Please see below. What is skipped in my answer and already covered in answer below is that you need GCC toolchain to compiler and build Python.

    > I didn't graduate on linux, did I miss "the easy way" to get the arm toolchain working on my ubuntu installation?

    It is understandable that this "missing dependency" can be an obstacle for a user who is used to "out of the box experience".

    Short answer already posted below:

    $ PREFIX=/tmp/tt/python3.6
    $ wget www.python.org/.../Python-3.6.14.tgz
    $ tar xf www.python.org/.../Python-3.6.14.tgz
    $ mkdir -p $PREFIX && cd $PREFIX
    $ ../path/to/Python-3.6.14/configure --prefix=$PREFIX --enable-shared
    $ make -j16
    $ make install -j16

    # We can see that we've produced shared library (.so file successfully):

    $ find . -name libpython3.6m.so.1.0
    ./libpython3.6m.so.1.0
    ./lib/libpython3.6m.so.1.0

    # Trick is to tell GDB where to look for shared libs with LD_LIBRARY_PATH environment variable.


    $ LD_LIBRARY_PATH=/tmp/tt/python3.6/lib ./bin/arm-none-eabi-gdb --version
    GNU gdb (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.90.20220202-git

    Below example shows how to install Python 3.6 locally without sudo access to your machine.

    kind regards,
    P. Wirkus

Reply
  • Hi,

    So the trick is that everyone got a Python on the system. Please note that you can easily download sources and build Python 3.6 with shared library Arm GDB requires.

    Please see below. What is skipped in my answer and already covered in answer below is that you need GCC toolchain to compiler and build Python.

    > I didn't graduate on linux, did I miss "the easy way" to get the arm toolchain working on my ubuntu installation?

    It is understandable that this "missing dependency" can be an obstacle for a user who is used to "out of the box experience".

    Short answer already posted below:

    $ PREFIX=/tmp/tt/python3.6
    $ wget www.python.org/.../Python-3.6.14.tgz
    $ tar xf www.python.org/.../Python-3.6.14.tgz
    $ mkdir -p $PREFIX && cd $PREFIX
    $ ../path/to/Python-3.6.14/configure --prefix=$PREFIX --enable-shared
    $ make -j16
    $ make install -j16

    # We can see that we've produced shared library (.so file successfully):

    $ find . -name libpython3.6m.so.1.0
    ./libpython3.6m.so.1.0
    ./lib/libpython3.6m.so.1.0

    # Trick is to tell GDB where to look for shared libs with LD_LIBRARY_PATH environment variable.


    $ LD_LIBRARY_PATH=/tmp/tt/python3.6/lib ./bin/arm-none-eabi-gdb --version
    GNU gdb (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.90.20220202-git

    Below example shows how to install Python 3.6 locally without sudo access to your machine.

    kind regards,
    P. Wirkus

Children
No data