Compiling with make (avr-gcc flags?)

Attempting to compile ArduCopter with make, things aren't linking correctly:

[brian@brian-arch ArduCopter]$ make
%% ArduCopter.elf
/tmp/ArduCopter.build/ArduCopter.o: In function `test_ins(unsigned char, Menu::arg const*)':
/home/brian/Documents/ardupilot/ArduCopter/test.pde:325: undefined reference to `__dso_handle'
/home/brian/Documents/ardupilot/ArduCopter/test.pde:325: undefined reference to `__dso_handle'
/home/brian/Documents/ardupilot/ArduCopter/test.pde:325: undefined reference to `__cxa_atexit'
/usr/bin/avr-ld: /tmp/ArduCopter.build/ArduCopter.elf: hidden symbol `__dso_handle' isn't defined
/usr/bin/avr-ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make: *** [/tmp/ArduCopter.build/ArduCopter.elf] Error 1

I am running Arch Linux and have installed all the dependencies via the Arch repositories, so most are probably newer versions than the Ubuntu repositories. My avr-gcc/avr-ld:

[brian@brian-arch ArduCopter]$ avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.8.0/lto-wrapper
Target: avr
Configured with: /build/src/gcc-4.8.0/configure --disable-cloog-version-check --disable-install-libiberty --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-linker-build-id --disable-nls --disable-werror --enable-__cxa_atexit --enable-checking=release --enable-clocale=gnu --enable-cloog-backend=isl --enable-gnu-unique-object --enable-gold --enable-languages=c,c++ --enable-ld=default --enable-lto --enable-plugin --enable-shared --infodir=/usr/share/info --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --prefix=/usr --target=avr --with-as=/usr/bin/avr-as --with-gnu-as --with-gnu-ld --with-ld=/usr/bin/avr-ld --with-plugin-ld=ld.gold --with-system-zlib
Thread model: single
gcc version 4.8.0 (GCC)
[brian@brian-arch ArduCopter]$ avr-ld -v
GNU ld (GNU Binutils) 2.23.2

Any suggestions would be much appreciated. Might I have to build avr-gcc with different options, or is there something in board_avr.mk (I'm building for APM 2.6) that I could change?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Did you solve this? I'm in same boat.

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @chr1sa: You can see this in person in two weeks for our next live event with real cars. It's great fun for adults and kids alike, and…
Sunday
DIY Robocars via Twitter
RT @chr1sa: The final race (1:24) at yesterday's @DIYRobcars virtual event was our best. It's only two minutes long but it has everything,…
Sunday
DIY Robocars via Twitter
RT @chr1sa: The monthly @diyrobocars virtual race is starting now! https://www.twitch.tv/roboticists2
Saturday
Mike Whitney liked Mike Whitney's profile
Jul 19
DIY Robocars via Twitter
Jul 2
DIY Robocars via Twitter
Jun 26
Abdulatif Tlaib liked Ryan's profile
Jun 24
DIY Robocars via Twitter
RT @SmallpixelCar: First time at @wsraceways. After tuning @HokuyoUsa lidar signal and camera sensor on @NVIDIAEmbedded, my car was able to…
Jun 20
DIY Robocars via Twitter
RT @breadcentric: The handy bit about racing with self-driving cars is that one can type while the car is racing. Report from #AWSDeepRacer…
Jun 18
DIY Robocars via Twitter
RT @chr1sa: Our Bay Area @DIYRobocars meetup is now at 2,700 members. Next in-person events (in Oakland) are training day on July 17 and…
Jun 18
DIY Robocars via Twitter
Videos from the ICRA autonomous racing workshop are now available: https://linklab-uva.github.io/icra-autonomous-racing/
Jun 10
DIY Robocars via Twitter
RT @SmallpixelCar: Prepared race track for Warm Spring Raceways @wsraceways and looking forward to test my new car at RAMS RC @ramsaicar fa…
Jun 6
DIY Robocars via Twitter
RT @f1tenth: Trying out some nasty blocking maneuvers 🏎️🤖 #f1tenth #autonomousracing https://t.co/nMTstsaogM
Jun 5
DIY Robocars via Twitter
May 27
DIY Robocars via Twitter
RT @araffin2: I will talk this Saturday from 18:00 to 19:00 Paris time for the @diyrobocars community about learning to race in hours using…
May 27
DIY Robocars via Twitter
RT @a1k0n: Luckily the infeasible hairpin problem was easily reproducible in simulation and I could test the fix before bringing the car ba…
May 26
More…