APM 2.X make apm2 not working with ubuntu

I’ve been trying to compile in ubuntu the source code for the ardupilot following the instructions on http://dev.ardupilot.com/wiki/building-the-code-onlinux/ and I have the following error on both the terminal and eclipse while building with the make target apm2:

make apm2 // BUILDROOT=/tmp/ArduPlane.build HAL_BOARD=HAL_BOARD_APM2 HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_AVR_APM2 TOOLCHAIN=AVR EXTRAFLAGS=-DGIT_VERSION="96d6b8eb" %% control_modes.o In file included from control_modes.cpp:3:0: Plane.h:172:74: error: could not convert '{"ArduPlane V3.4.0beta3 (96d6b8eb)"}' from '<brace-enclosed initializer list>' to 'DataFlash_Class' ../mk/build_rules.mk:11: recipe for target '/tmp/ArduPlane.build/control_modes.o' failed DataFlash_Class DataFlash{FIRMWARE_STRING}; ^ make: *** [/tmp/ArduPlane.build/control_modes.o] Error 1

If I try to build it with a different make target such as linux, it works fine. However the apm2 and apm1 make targets have the same output. In addition, I tried to build it with apm2 -j2 and apm2 -j4 and it returns the following errror

make apm2 -j4 // BUILDROOT=/tmp/ArduPlane.build HAL_BOARD=HAL_BOARD_APM2 HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_AVR_APM2 TOOLCHAIN=AVR EXTRAFLAGS=-DGIT_VERSION="96d6b8eb" %% landing.o %% control_modes.o %% ArduPlane.o %% events.o In file included from control_modes.cpp:3:0: Plane.h:172:74: error: could not convert '{"ArduPlane V3.4.0beta3 (96d6b8eb)"}' from '<brace-enclosed initializer list>' to 'DataFlash_Class' DataFlash_Class DataFlash{FIRMWARE_STRING}; ../mk/build_rules.mk:11: recipe for target '/tmp/ArduPlane.build/control_modes.o' failed ^ make: *** [/tmp/ArduPlane.build/control_modes.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from landing.cpp:3:0: Plane.h:172:74: error: could not convert '{"ArduPlane V3.4.0beta3 (96d6b8eb)"}' from '<brace-enclosed initializer list>' to 'DataFlash_Class' DataFlash_Class DataFlash{FIRMWARE_STRING}; ^ ../mk/build_rules.mk:11: recipe for target '/tmp/ArduPlane.build/landing.o' failed make: *** [/tmp/ArduPlane.build/landing.o] Error 1 In file included from events.cpp:3:0: Plane.h:172:74: error: could not convert '{"ArduPlane V3.4.0beta3 (96d6b8eb)"}' from '<brace-enclosed initializer list>' to 'DataFlash_Class' DataFlash_Class DataFlash{FIRMWARE_STRING}; ^ ../mk/build_rules.mk:11: recipe for target '/tmp/ArduPlane.build/events.o' failed make: *** [/tmp/ArduPlane.build/events.o] Error 1 In file included from ArduPlane.cpp:25:0: Plane.h:172:74: error: could not convert '{"ArduPlane V3.4.0beta3 (96d6b8eb)"}' from '<brace-enclosed initializer list>' to 'DataFlash_Class' DataFlash_Class DataFlash{FIRMWARE_STRING}; ^ ../mk/build_rules.mk:11: recipe for target '/tmp/ArduPlane.build/ArduPlane.o' failed make: *** [/tmp/ArduPlane.build/ArduPlane.o] Error 1

Any ideas on how can I solve this issue?

I have the some issue.

I believe version 3.2 was the last supported build on that hardware. Try checking that branch out.