编译AR Drone SDK失败,命令行中缺少DSO

时间:2016-01-28 04:02:41

标签: linux ubuntu ar.drone

我正在尝试在Ubuntu上构建AR Drone SDK。编译库时,我得到错误:

  

// lib / x86_64-linux-gnu / libm.so.6:添加符号时出错:命令行中缺少DSO
  collect2:错误:ld返回1退出状态

我不明白问题所在。我正在关注this tutorial,当我运行make时会出现问题。我已经运行ARDroneLib/Soft/Build/check_dependencies.sh并且输出正常。

任何想法是什么问题?以下是运行make的完整输出。

soribo@soribo-vm:~/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux$ make
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
-- Building ardrone_navigation -- 
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
-- Linking ardrone_navigation --
ld common/mobile_main
/usr/bin/ld: ../../Soft/Build/targets_versions/ffmpeg_static_PROD_MODE_Linux_3.19.0-25-generic_GNU_Linux_usrbingcc_4.8.4/libavutil.a(eval.o): undefined reference to symbol 'fabs@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/../../Build/Release/common/mobile_main] Error 1
make[3]: *** [all] Error 2
make[2]: *** [build_app] Error 2
make[1]: *** [ardrone_navigation] Error 2
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题。我在这里找到了解决方案:

http://jderobot.org/Varribas-tfm/ARDrone:starting_up#Building_Examples

  

寻找对'fabs @@ GLIBC_2.2.5'符号的未定义引用,我达到了[2],这证实了一个unmeet依赖问题[1]。   这里发生了什么?

libavutil.a(eval.o): undefined reference to symbol 'fabs@@GLIBC_2.2.5'
libm.so.6: error adding symbols: DSO missing from command line 
  

第一行告诉我们libavutil正在使用fabs。它被声明为libm库,但命令行(Makefile)中缺少-lm。

ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/Makefile:131
GENERIC_LIBS+=-liw -lpc_ardrone -lgthread-2.0 -lgtk-x11-2.0 -lrt -lxml2 -ludev -lswscale -lSDL -lm
  

然后,Navigation将成功编译。