gpt4 book ai didi

linux - 调试 ld, "Inconsistency detected by ld.so"

转载 作者:IT王子 更新时间:2023-10-29 00:33:48 28 4
gpt4 key购买 nike

我正在尝试使用一个名为 GLV 的小部件库对于我正在开发的应用程序。我正在运行 Linux Mint 17。我安装了所有库并成功构建了 GLV 库,但是当我尝试运行已构建的示例之一时,出现了此共享库错误。

Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions:
Assertion `needed != ((void *)0)' failed!

谁能帮我找出共享库中的不一致是从哪里来的?

更多信息

在 README 文件中说

GLV requires only OpenGL, GLU, and GLEW (Linux only). There are 
no other dependencies, unless a window binding is used, such as GLUT."

当我从源代码安装 GLEW 时,它会打印出已安装文件的列表。

$ sudo make install
install -d -m 0755 /usr/include/GL
install -m 0644 include/GL/wglew.h /usr/include/GL/
install -m 0644 include/GL/glew.h /usr/include/GL/
install -m 0644 include/GL/glxew.h /usr/include/GL/
install -d -m 0755 /usr/lib64
install -m 0644 lib/libGLEW.so.1.8.0 /usr/lib64/
ln -sf libGLEW.so.1.8.0 /usr/lib64/libGLEW.so.1.8
ln -sf libGLEW.so.1.8.0 /usr/lib64/libGLEW.so
install -m 0644 lib/libGLEW.a /usr/lib64/
install -d -m 0755 /usr/lib64
install -d -m 0755 /usr/lib64/pkgconfig
install -m 0644 glew.pc /usr/lib64/pkgconfig/

我查看是否安装了 glew 包,但看起来没有。

$ aptitude search glew
p glew-utils - OpenGL Extension Wrangler - utilities
p glew-utils:i386 - OpenGL Extension Wrangler - utilities
p libglew-dev - OpenGL Extension Wrangler - development environment
p libglew-dev:i386 - OpenGL Extension Wrangler - development environment
v libglew1.5-dev -
v libglew1.5-dev:i386 -
v libglew1.6-dev -
v libglew1.6-dev:i386 -
pi libglew1.8 - OpenGL Extension Wrangler - runtime environment
p libglew1.8:i386 - OpenGL Extension Wrangler - runtime environment
p libglewmx-dev - OpenGL Extension Wrangler MX - development environment
p libglewmx-dev:i386 - OpenGL Extension Wrangler MX - development environment
v libglewmx1.5-dev -
v libglewmx1.5-dev:i386 -
v libglewmx1.6-dev -
v libglewmx1.6-dev:i386 -
p libglewmx1.8 - OpenGL Extension Wrangler (Multiple Rendering Contexts)
p libglewmx1.8:i386 - OpenGL Extension Wrangler (Multiple Rendering Contexts)

我检查了安装了哪些 GLU 包,但这里看起来一切正常。

$ aptitude search glu
p celestia-glut - real-time visual space simulation (GLUT frontend)
p celestia-glut:i386 - real-time visual space simulation (GLUT frontend)
p cluster-glue - Reusable cluster components for Linux HA
p cluster-glue:i386 - Reusable cluster components for Linux HA
p cluster-glue-dev - Development files for the cluster glue components
p cluster-glue-dev:i386 - Development files for the cluster glue components
p freebsd-glue - Emulate a FreeBSD build environment
i freeglut3 - OpenGL Utility Toolkit
p freeglut3:i386 - OpenGL Utility Toolkit
p freeglut3-dbg - OpenGL Utility Toolkit debugging information
p freeglut3-dbg:i386 - OpenGL Utility Toolkit debugging information
i freeglut3-dev - OpenGL Utility Toolkit development files
p freeglut3-dev:i386 - OpenGL Utility Toolkit development files
p gambas3-gb-opengl-glu - Gambas opengl-glu component
p gambas3-gb-opengl-glu:i386 - Gambas opengl-glu component
p gimp-gluas - Lua environment plug-in for GIMP
p gimp-gluas:i386 - Lua environment plug-in for GIMP
p glue-schema - LDAP schema files for the GLUE 1.3 and GLUE 2.0 Schema
p glue-sprite - Simple command line tool to generate CSS sprites
p glurp - GTK+ frontend to the Music Player Daemon (MPD)
p glurp:i386 - GTK+ frontend to the Music Player Daemon (MPD)
p glusterfs-client - clustered file-system (client package)
p glusterfs-client:i386 - clustered file-system (client package)
p glusterfs-common - GlusterFS common libraries and translator modules
p glusterfs-common:i386 - GlusterFS common libraries and translator modules
p glusterfs-dbg - GlusterFS debugging symbols
p glusterfs-dbg:i386 - GlusterFS debugging symbols
p glusterfs-examples - example files for the glusterfs server and client
p glusterfs-server - clustered file-system (server package)
p glusterfs-server:i386 - clustered file-system (server package)
p libcluster-glue - Reusable cluster libraries (transitional package)
p libcluster-glue-dev - Reusable cluster components for Linux HA (transitional package)
p libghc-gluraw-dev - Raw binding for the OpenGL graphics system
p libghc-gluraw-dev:i386 - Raw binding for the OpenGL graphics system
v libghc-gluraw-dev-1.3.0.0-200bb:i386 -
v libghc-gluraw-dev-1.3.0.0-9f9cf -
p libghc-gluraw-doc - Raw binding for the OpenGL graphics system; documentation
p libghc-gluraw-prof - Raw binding for the OpenGL graphics system; profiling libraries
p libghc-gluraw-prof:i386 - Raw binding for the OpenGL graphics system; profiling libraries
v libghc-gluraw-prof-1.3.0.0-200bb:i386 -
v libghc-gluraw-prof-1.3.0.0-9f9cf -
p libghc-glut-dev - Haskell GLUT binding for GHC
p libghc-glut-dev:i386 - Haskell GLUT binding for GHC
v libghc-glut-dev-2.4.0.0-233c0:i386 -
v libghc-glut-dev-2.4.0.0-31a91 -
p libghc-glut-doc - Haskell GLUT binding for GHC; documentation
p libghc-glut-prof - Haskell GLUT binding for GHC; profiling libraries
p libghc-glut-prof:i386 - Haskell GLUT binding for GHC; profiling libraries
v libghc-glut-prof-2.4.0.0-233c0:i386 -
v libghc-glut-prof-2.4.0.0-31a91 -
v libglu-dev -
v libglu-dev:i386 -
v libglu1 -
v libglu1:i386 -
i libglu1-mesa - Mesa OpenGL utility library (GLU)
i A libglu1-mesa:i386 - Mesa OpenGL utility library (GLU)
i A libglu1-mesa-dev - Mesa OpenGL utility library -- development files
p libglu1-mesa-dev:i386 - Mesa OpenGL utility library -- development files
p libgluegen2-build-java - Tool to automatically generate the Java and JNI code.
p libgluegen2-doc - Tool to automatically generate the Java and JNI code.
p libgluegen2-jni - Tool to automatically generate the Java and JNI code.
p libgluegen2-jni:i386 - Tool to automatically generate the Java and JNI code.
p libgluegen2-rt-java - Tool to automatically generate the Java and JNI code.
p libgssglue-dev - header files and docs for libgssglue
p libgssglue-dev:i386 - header files and docs for libgssglue
p libgssglue1 - mechanism-switch gssapi library
p libgssglue1:i386 - mechanism-switch gssapi library
v libhugs-glut -
v libhugs-glut:i386 -
p libhugs-glut-bundled - A binding for the OpenGL Utility Toolkit
p libhugs-glut-bundled:i386 - A binding for the OpenGL Utility Toolkit
p libkwinactiveglutils1abi3 - library used by accellaration for the KDE window manager Active
p libkwinactiveglutils1abi3:i386 - library used by accellaration for the KDE window manager Active
p libkwinglutils1abi3 - library with OpenGL utilities for the KDE window manager
p libkwinglutils1abi3:i386 - library with OpenGL utilities for the KDE window manager
p libmgl-glut5 - library for scientific graphs. (GLUT runtime library)
p libmgl-glut5:i386 - library for scientific graphs. (GLUT runtime library)
p libmodglue1 - C++ library for handling of multiple co-processes
p libmodglue1:i386 - C++ library for handling of multiple co-processes
p libmodglue1-dev - development files for a C++ library for handling of multiple co-processes
p libnet-inet6glue-perl - glue module to make perl modules IPv6 ready
p libnet-sslglue-perl - add/extend SSL support for common perl modules
p libtaoframework-freeglut-cil-dev - Tao CLI binding for freeglut - development files
p libtaoframework-freeglut2.4-cil - Tao CLI binding for freeglut
p mgltools-mglutil - Molecular Graphics Laboratory utility collection
i python-configglue - Glues together optparse.OptionParser and ConfigParser.ConfigParser
p python-django-configglue - Django commands for working with configglue generated settings
p python-gluon - High-level Python web development framework
p python3-configglue - Glues together optparse.OptionParser and ConfigParser.ConfigParser
v xlibmesa-glu-dev -
v xlibmesa-glu-dev:i386 -

最佳答案

Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion 'needed != ((void *)0)' failed!

这是 glibc 中的错误,或者是您的某个共享库中的损坏。 glibc 代码如下:

  while (1)
{
ElfW(Vernaux) *aux;
struct link_map *needed = find_needed (strtab + ent->vn_file, map);

/* If NEEDED is NULL this means a dependency was not found
and no stub entry was created. This should never happen. */
assert (needed != NULL);
...

此时您的选择是:

  • 重新安装并验证所有相关库的 md5sums 以排除磁盘损坏,以及
  • 为 glibc 安装调试信息包,并尝试了解触发断言的库和符号版本,或者
  • 在适用于您的 Linux 发行版的错误跟踪器中报告此问题。

设置 LD_DEBUG=symbols,bindings 甚至 LD_DEBUG=all 也可能提供一些关于正在查找哪些符号的线索。

关于linux - 调试 ld, "Inconsistency detected by ld.so",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22564780/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com