Navio + AccelGyroMag not working

i am using navio+ and raspberry Pi 2 with modified rasbian image provided by emlid.I freshly installed every thing when try to build from source its through an error
// BUILDROOT=/tmp/ArduCopter.build HAL_BOARD=HAL_BOARD_LINUX HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_LINUX_NAVIO TOOLCHAIN=RPI EXTRAFLAGS=-DGIT_VERSION=“0615d7a0”
%% control_rtl.o
cc1plus: error: unrecognized command line option ‘-std=gnu++11’
…/mk/build_rules.mk:11: recipe for target ‘/tmp/ArduCopter.build/control_rtl.o’ failed
make: *** [/tmp/ArduCopter.build/control_rtl.o] Error 1

so i installed the available deb package form emlid website
when i try to run the sudo ./AccelGyroMag after make

i am only getting 0 values its not updating even when i change the orientation of navio+

Acc: +0.000 +0.000 +0.000 Gyr: +0.000 +0.000 +0.000 Mag: +0.000 +0.000 +0.000
Acc: +0.000 +0.000 +0.000 Gyr: +0.000 +0.000 +0.000 Mag: +0.000 +0.000 +0.000
Acc: +0.000 +0.000 +0.000 Gyr: +0.000 +0.000 +0.000 Mag: +0.000 +0.000 +0.000

so whats the solution please help me to slove this and when i try to connect to the apm planner or tower it connects and disconnects after 5 secs. i tryed both udp and tcp.

Need your supports help me in getting this done correctly

Sathish,

Are you running AccelGyroMag at the same time as ArduCopter?

no i tested them seperately

Can you please post a picture of how everything is connected?