【问题标题】:How to fix the fatal error at startup in valgrind (connected with libc6-dbg and libc6-dbg:i386 )如何修复 valgrind 启动时的致命错误(与 libc6-dbg 和 libc6-dbg:i386 连接)
【发布时间】:2020-02-15 22:39:53
【问题描述】:

有这个无法解决的问题。我尝试安装 libc6-dbg 和 libc6-dbg:i386 并没有帮助。(我有 64 位 Ubuntu 19.10)。

valgrind:  Fatal error at startup: a function redirection
    valgrind:  which is mandatory for this platform-tool combination
    valgrind:  cannot be set up.  Details of the redirection are:
    valgrind:  
    valgrind:  A must-be-redirected function
    valgrind:  whose name matches the pattern:      strlen
    valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
    valgrind:  was not found whilst processing
    valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
    valgrind:  
    valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
    valgrind:  package on this machine.  (2, longer term): ask the packagers
    valgrind:  for your Linux distribution to please in future ship a non-
    valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
    valgrind:  that exports the above-named function using the standard
    valgrind:  calling conventions for this platform.  The package you need
    valgrind:  to install for fix (1) is called
    valgrind:  
    valgrind:    On Debian, Ubuntu:                 libc6-dbg
    valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
    valgrind:  
    valgrind:  Note that if you are debugging a 32 bit process on a
    valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
    valgrind:  package (e.g. libc6-dbg:i386).
    valgrind:  
    valgrind:  Cannot continue -- exiting now.  Sorry.

所以,向您展示已安装的软件包。如您所见,一切都已正确安装,但不起作用。我不知道该怎么做才能让它发挥作用。

amd64 软件包

Package: libc6-dbg
Status: install ok installed
Priority: optional
Section: debug
Installed-Size: 44570
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: glibc
Version: 2.30-0ubuntu2
Provides: libc-dbg
Depends: libc6 (= 2.30-0ubuntu2)
Description: GNU C Library: detached debugging symbols
 This package contains the detached debugging symbols for the GNU C
 library.
Homepage: https://www.gnu.org/software/libc/libc.html
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>

i386 软件包

Package: libc6-dbg
Status: install ok installed
Priority: optional
Section: debug
Installed-Size: 35315
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Multi-Arch: same
Source: glibc
Version: 2.30-0ubuntu2
Provides: libc-dbg
Depends: libc6 (= 2.30-0ubuntu2)
Description: GNU C Library: detached debugging symbols
 This package contains the detached debugging symbols for the GNU C
 library.
Homepage: https://www.gnu.org/software/libc/libc.html
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>

【问题讨论】:

  • 连同@sam 的评论,请告诉我们您是否成功安装libc6-dbg,以及安装此软件包可能产生的任何输出。
  • 这些包被称为libc6-dbglibc6-dbg:i386。我想你用p而不是b拼写它们。
  • 您应该通过包管理器安装 Valgrind:sudo apt-get install valgrind
  • 您从构建 Valgrind 的目录中运行 sudo make uninstall,然后运行 ​​sudo apt-get install valgrind
  • 发行版向 Valgrinds 调试搜索路径添加了特殊路径。

标签: c++ c memory-leaks valgrind


【解决方案1】:

我在 Ubuntu 20.04 上遇到了同样的问题。正如用户 phd 在他们的评论中指出的那样,这是一个 Valgrind 错误,已在提交 db07db4c8706d17124a621a254bee1b6f08d2e1d 中修复

你可以通过运行类似的东西轻松构建 valgrind

git clone git://sourceware.org/git/valgrind.git
cd valgrind
./autogen.sh
./configure
make -j
sudo make install

(如果您不确定它们的作用,请不要以 sudo 运行命令)

【讨论】:

    【解决方案2】:

    valgrind 正在寻找错误路径中的文件。

    Ubuntu 在/usr/lib/debug 中一团糟。如果你统一 /usr/lib/debug/lib/usr/lib/debug/usr/lib 应该可以工作。

    至少,这为我解决了问题。

    【讨论】:

      【解决方案3】:
      apt install -y libc6-dbg
      

      它对我有用。 (注意:没有:i386。)
      install valgrind, Fatal error at startup 的可能重复项。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-11-05
        • 2017-10-08
        • 2015-08-09
        • 2022-06-14
        • 2020-10-31
        • 1970-01-01
        相关资源
        最近更新 更多