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

arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi gdb fails on Ubuntu 22.04

gdb not working on Ubuntu 22.04 is a well known issue.

[This topic](community.arm.com/.../gcc-arm-11-2-2022-02-x86_64-arm-none-eabi-gdb-fails-on-ubuntu) is focused on gcc-arm-11.2-2022.02-x86_64-arm-none-eabi where gdb doesn'tt work for some missing dependencies.

[The solution](https://community.arm.com/support-forums/f/compilers-and-libraries-forum/52805/gcc-arm-11-2-2022-02-x86_64-arm-none-eabi-gdb-fails-on-ubuntu/178088#178088) said that next release would have a better compatiblity with newer Linux distros.

And so I downloaded the new arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.

gdb doesn't work, but now the error message from`gdb --version`is different:

```

Could not find platform independent libraries <prefix>

Could not find platform dependent libraries <exec_prefix>

Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

Python path configuration:

  PYTHONHOME = (not set)

  PYTHONPATH = (not set)

  program name = '/usr/local/bld-tools/bld-tools-virtual-env/bin/python'

  isolated = 0

  environment = 1

  user site = 1

  import site = 1

  sys._base_executable = '/usr/local/bld-tools/bld-tools-virtual-env/bin/python'

  sys.base_prefix = '/usr'

  sys.base_exec_prefix = '/usr'

  sys.executable = '/usr/local/bld-tools/bld-tools-virtual-env/bin/python'

  sys.prefix = '/usr'

  sys.exec_prefix = '/usr'

  sys.path = [

    '/usr/lib/python38.zip',

    '/usr/lib/python3.8',

    '/usr/lib/lib-dynload',

  ]

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding

Python runtime state: core initialized

ModuleNotFoundError: No module named 'encodings'



Current thread 0x00007fed232c0c00 (most recent call first):

<no Python frame>

```

This seems related to [this bug](https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1992947)

Is there any workaround?

Parents
  • Hello

    Ubuntu 22.04 comes with Python 3.10 installed, so Python 3.8 is not installed out of the box.

    I installed manually Python 3.8 with the Method 2: Install Python 3.8 manually, as described here.

    And now

    ./arm-none-eabi-gdb --version

    returns


    GNU gdb (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.1.90.20221210-git
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Other methods to install Python 3.8 don't work for me.

    I'm going to verify is everything is ok.

Reply
  • Hello

    Ubuntu 22.04 comes with Python 3.10 installed, so Python 3.8 is not installed out of the box.

    I installed manually Python 3.8 with the Method 2: Install Python 3.8 manually, as described here.

    And now

    ./arm-none-eabi-gdb --version

    returns


    GNU gdb (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.1.90.20221210-git
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Other methods to install Python 3.8 don't work for me.

    I'm going to verify is everything is ok.

Children