sazr
sazr

Reputation: 25928

Compiling AR Drone SDK fails with DSO missing from command line

I am attempting to build the AR Drone SDK on Ubuntu. When compiling the libraries I get the error:

//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I dont understand what the problem is. I am following this tutorial and the problem occurs when I run make. I have run ARDroneLib/Soft/Build/check_dependencies.sh and it outputs ok.

Any ideas what the problem is? Below is the full output from running 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

Upvotes: 2

Views: 1405

Answers (1)

cadeau
cadeau

Reputation: 21

I had the same problem. I found the solution here:

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

Looking for undefined reference to symbol 'fabs@@GLIBC_2.2.5', I reached to [2], that confirms an unmeet dependency problem [1]. What happened here?

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

First line say us that libavutil is using fabs. It is declared into libm library, but -lm is missed in command line (Makefile).

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

Then, Navigation will compile successfully.

Upvotes: 2

Related Questions