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;

  • 相关阅读:
    centos7系统初始化
    瀑布流无限加载infinitescroll插件与masonry插件使用
    网页前端导出CSV,Excel格式文件
    js添加收藏夹
    Fiddler修改http请求响应简单实例
    Nodejs的Gruntjs使用一则
    Jquery插件validate使用一则
    PostgreSQL操作-psql基本命令
    SSH连接时出现Host key verification failed的原因及解决方法以及ssh-keygen命令的用法
    在ubuntu20.04上设置python2为默认方式
  • 原文地址:https://www.cnblogs.com/happyamyhope/p/12200606.html
Copyright © 2011-2022 走看看