调试ld,"ld.so检测到不一致". [英] debugging ld, "Inconsistency detected by ld.so"

查看:117
本文介绍了调试ld,"ld.so检测到不一致".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to use a widget library called GLV for an application I am developing. I am running Linux Mint 17. I installed all the libraries and I have succeeded in building the GLV library, but when I try to running one of samples that was built I get this shared library error.

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

有人可以帮助我找出共享库中的不一致之处吗?

Can anyone help me find out where the inconsistency in the shared library is coming from?

在README文件中显示

In the README file it says

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

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

When I installed GLEW from source it printed a list of files that were installed.

$ 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软件包,但看起来好像没有.

I checked to see if there might be a glew package installed, but it looks like there is none.

$ 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软件包,但是在这里一切都还不错.

I checked what GLU packages were installed but everything looks ok here too.

$ 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代码如下:

This is a bug in glibc, or a corruption in one of your shared libraries. The glibc code reads:

  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);
 ...

您目前的选择是:

  • 为所有涉及的库重新安装并验证md5sum,以排除磁盘损坏,并且
  • 为glibc安装debuginfo软件包,并尝试了解哪个库和哪个符号版本触发了该断言,或者
  • 在适合您的Linux发行版的错误跟踪器中报告此内容.

设置LD_DEBUG=symbols,bindings甚至LD_DEBUG=all可能还会提供一些有关正在查找哪些符号的线索.

Setting LD_DEBUG=symbols,bindings or even LD_DEBUG=all may also provide some clues on exactly which symbols are being looked up.

这篇关于调试ld,"ld.so检测到不一致".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆