Making APM Linux on BBB

109 views
Skip to first unread message

Steven Xie

unread,
May 21, 2015, 2:11:15 AM5/21/15
to drones-...@googlegroups.com
Hi all,

I am trying to compile APM on Linux locally on my BBB by running 'make linux', however I got the following error message:
-----------------------------

/root/ardupilot/libraries/AP_HAL_Linux/Scheduler.cpp: In member function 'void Linux::LinuxScheduler::_create_realtime_thread(pthread_t*, int, const char*, Linux::LinuxScheduler::pthread_startroutine_t)':
/root/ardupilot/libraries/AP_HAL_Linux/Scheduler.cpp:37:34: error: expected primary-expression before '.' token
/root/ardupilot/libraries/AP_HAL_Linux/Scheduler.cpp: In member function 'virtual void Linux::LinuxScheduler::init(void*)':
/root/ardupilot/libraries/AP_HAL_Linux/Scheduler.cpp:71:34: error: expected primary-expression before '.' token
/root/ardupilot/libraries/AP_HAL_Linux/Scheduler.cpp:80:11: error: expected primary-expression before '.' token
/root/ardupilot/libraries/AP_HAL_Linux/Scheduler.cpp:81:11: error: expected primary-expression before '.' token
/root/ardupilot/libraries/AP_HAL_Linux/Scheduler.cpp:82:11: error: expected primary-expression before '.' token

------------------------------

I have installed the tools on BBB including make\ gawk\ g++-4.6\ gcc-4.6 \ arduino-core\ build-essential\
I suspect I missed the packages required to compile with any code with pthread?

I have tried to compile the code on my Ubuntu desktop and everything did fine. 
Did anyone encounter this problem before? and how to solve this on BBB?

Thanks in advanced.

Cheers,
Steven

Message has been deleted

Steven Xie

unread,
May 21, 2015, 4:20:08 AM5/21/15
to drones-...@googlegroups.com
This issue is fixed by updating gcc/g++ version, on BBB with Debian 7.4 Wheezy

root@beaglebone:/# sudo nano /etc/apt/sources.list
----------------
#append the following at the end if not there: 
deb http://ftp.us.debian.org/debian unstable main contrib non-free
#custom-added
--------------------

root@beaglebone:/# sudo dpkg --add-architecture i386

root@beaglebone:/# sudo dpkg --add-architecture i386

root@beaglebone:/# sudo dpkg --add-architecture armhf

//confirm you have the arm & i386 added.... 

root@beaglebone:/# sudo dpkg --print-foreign-architectures
armel
i386

root@beaglebone:/# sudo apt-get update

root@beaglebone:/# sudo apt-get install make gawk g++ arduino-core

// remove any unnecessary packages in the system
root@beaglebone:~ sudo apt-get autoremove

Run make clean && make linux under ~/ardupilot/ArduCopter folder then everything goes well.

Thanks for the fixed.

Cheers,
Steven
Reply all
Reply to author
Forward
0 new messages