zoukankan      html  css  js  c++  java
  • 【error】libGL.so: undefined reference to `drmGetDevices2'

    前言

    在TX2上测试姿态估计并显示的代码时出现了问题,代码使用了dlib和PCL开源库,在NVIDIA官网上看到了解决方法,记录下来。

    error

    [100%] Linking CXX executable head_pose_estimation
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmGetDevices2'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmCloseOnce'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmMap'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmUnmap'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmFreeDevice'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmGetDeviceNameFromFd2'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmOpenOnce'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmGetDevice2'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmFreeDevices'
    collect2: error: ld returned 1 exit status
    CMakeFiles/head_pose_estimation.dir/build.make:396: recipe for target 'head_pose_estimation' failed
    make[2]: *** [head_pose_estimation] Error 1
    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/head_pose_estimation.dir/all' failed
    make[1]: *** [CMakeFiles/head_pose_estimation.dir/all] Error 2
    Makefile:83: recipe for target 'all' failed
    make: *** [all] Error 2

    solution

    cd /usr/lib/aarch64-linux-gnu/
    sudo ln -sf tegra/libGL.so libGL.so

    参考

    1. nvidia_building-opencv-with-opengl-support;

  • 相关阅读:
    通过命令行配置samba服务
    新版python logging 封装,支持同时向console,file,socket输出
    python多进程管理DEMO
    注意tornado中的日志操作
    一个简单的python日志服务器
    NoVNC的使用、websockify以及VNC截图
    Oracle——distinct的用法
    C# Excel数据转化为Datatable
    C# winform 无API函数实现系统快捷键
    [转]C# WInForm 无框窗体移动
  • 原文地址:https://www.cnblogs.com/happyamyhope/p/12200606.html
Copyright © 2011-2022 走看看