Package: gdb
Version: 13.0.91.20230210-0.1
Severity: normal

When python is not available, e.g. in firejail with some profiles
(for security reasons), gdb refuses to run:

zira:~> firejail --allow-debuggers --profile=firefox
zira% gdb
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = '/usr/bin/python'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = '/usr/lib/python3.11'
  sys._base_executable = '/usr/bin/python'
  sys.base_prefix = '/usr'
  sys.base_exec_prefix = '/usr'
  sys.platlibdir = 'lib'
  sys.executable = '/usr/bin/python'
  sys.prefix = '/usr'
  sys.exec_prefix = '/usr'
  sys.path = [
    '/usr/lib/python311.zip',
    '/usr/lib/python3.11',
    '/usr/lib/python3.11/lib-dynload',
  ]
Python Exception <class 'ModuleNotFoundError'>: No module named 'encodings'
Python not initialized
zira%

gdb should dynamically consider that python is optional and run
without python support in such a case.

Note that there is no issue with the dynamical linking against the
/usr/lib/x86_64-linux-gnu/libpython3.11.so.1.0 library; it is just
that the /usr/lib/python3.11 directory is not available.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-3-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gdb depends on:
ii  libbabeltrace1          1.5.11-1+b2
ii  libc6                   2.36-8
ii  libdebuginfod1          0.188-2.1
ii  libexpat1               2.5.0-1
ii  libgcc-s1               12.2.0-14
ii  libgmp10                2:6.2.1+dfsg1-1.1
ii  libipt2                 2.0.5-1
ii  liblzma5                5.4.1-0.1
ii  libmpfr6                4.2.0-1
ii  libncursesw6            6.4-2
ii  libpython3.11           3.11.2-2
ii  libreadline8            8.2-1.3
ii  libsource-highlight4v5  3.1.9-4.2+b2
ii  libstdc++6              12.2.0-14
ii  libtinfo6               6.4-2
ii  libxxhash0              0.8.1-1
ii  libzstd1                1.5.2+dfsg2-3
ii  zlib1g                  1:1.2.13.dfsg-1

Versions of packages gdb recommends:
ii  libc6-dbg [libc-dbg]  2.36-8

Versions of packages gdb suggests:
ii  gdb-doc    12.1-1
pn  gdbserver  <none>

-- no debconf information

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to