Problem Compiling on Raspberry Pi 2

I just ask that future builds are named apmplanner_2.0.18_rpi.deb or apmplanner_2.0.18_rpi2.deb if RPi2 specific. Otherwise nobody will be able to tell from other ARM based build (like ODroid etc…)

see firmware.diydrones.com/Tools/APMPlanner/

I also posted a link on ardupilot.com download section

ardupilot.com/downloads/?did=122

Is this an RPI 2 only build?

No, it should run on any ARMv7 device running Ubuntu.

Does it run on RPi and RPi2, that all I need to know for now?

Sorry I misunderstood. RPi2 only.

Thanks, see diydrones.com/profiles/blogs/apm … berry-pi-2

If there is anything you want reworded or changed, let me know.

[quote=“jfkerekes”]After removing the 6 lines you specified and re-compiling I got A LOT Farther before it finally failed with the following output:

/usr/lib/libGLESv2.so: undefined reference to khrn_pointer_map_delete' /usr/lib/libGLESv2.so: undefined reference torpc_send_ctrl_write’
/usr/lib/libGLESv2.so: undefined reference to rpc_recv' /usr/lib/libGLESv2.so: undefined reference tokhrn_platform_malloc’
/usr/lib/libGLESv2.so: undefined reference to rpc_flush' /usr/lib/libGLESv2.so: undefined reference torpc_begin’
/usr/lib/libGLESv2.so: undefined reference to platform_memcpy' /usr/lib/libGLESv2.so: undefined reference torpc_send_bulk’
/usr/lib/libGLESv2.so: undefined reference to khrn_error_assist' /usr/lib/libGLESv2.so: undefined reference torpc_send_ctrl_end’
/usr/lib/libGLESv2.so: undefined reference to client_tls' /usr/lib/libGLESv2.so: undefined reference toplatform_tls_get’
/usr/lib/libGLESv2.so: undefined reference to khrn_pointer_map_iterate' /usr/lib/libGLESv2.so: undefined reference torpc_end’
/usr/lib/libGLESv2.so: undefined reference to khrn_get_type_size' /usr/lib/libGLESv2.so: undefined reference torpc_send_ctrl_begin’
/usr/lib/libGLESv2.so: undefined reference to khrn_platform_free' /usr/lib/libGLESv2.so: undefined reference tokhrn_pointer_map_insert’
/usr/lib/libGLESv2.so: undefined reference to khrn_pointer_map_lookup' /usr/lib/libGLESv2.so: undefined reference tokhrn_pointer_map_term’
/usr/lib/libGLESv2.so: undefined reference to `khrn_pointer_map_init’
collect2: error: ld returned 1 exit status
Makefile:1737: recipe for target ‘release/apmplanner2’ failed
make: *** [release/apmplanner2] Error 1
root@jf-RPi2:/home/jf/apm_planner#[/quote]

im getting the same errors as the OP. I have already completed moving everything to the .bak file (sudo mv /usr/lib/libGLESv2.so /usr/lib/libGLESv2.so.bak), but i get this error when i run 'make.

/usr/lib/libGLESv2.so: undefined reference to khrn_pointer_map_delete' /usr/lib/libGLESv2.so: undefined reference torpc_send_ctrl_write’
/usr/lib/libGLESv2.so: undefined reference to rpc_recv' /usr/lib/libGLESv2.so: undefined reference tokhrn_platform_malloc’
/usr/lib/libGLESv2.so: undefined reference to rpc_flush' /usr/lib/libGLESv2.so: undefined reference torpc_begin’
/usr/lib/libGLESv2.so: undefined reference to platform_memcpy' /usr/lib/libGLESv2.so: undefined reference torpc_send_bulk’
/usr/lib/libGLESv2.so: undefined reference to khrn_error_assist' /usr/lib/libGLESv2.so: undefined reference torpc_send_ctrl_end’
/usr/lib/libGLESv2.so: undefined reference to client_tls' /usr/lib/libGLESv2.so: undefined reference toplatform_tls_get’
/usr/lib/libGLESv2.so: undefined reference to khrn_pointer_map_iterate' /usr/lib/libGLESv2.so: undefined reference torpc_end’
/usr/lib/libGLESv2.so: undefined reference to khrn_get_type_size' /usr/lib/libGLESv2.so: undefined reference torpc_send_ctrl_begin’
/usr/lib/libGLESv2.so: undefined reference to khrn_platform_free' /usr/lib/libGLESv2.so: undefined reference tokhrn_pointer_map_insert’
/usr/lib/libGLESv2.so: undefined reference to khrn_pointer_map_lookup' /usr/lib/libGLESv2.so: undefined reference tokhrn_pointer_map_term’
/usr/lib/libGLESv2.so: undefined reference to `khrn_pointer_map_init’
collect2: error: ld returned 1 exit status
Makefile:1766: recipe for target ‘release/apmplanner2’ failed
make: *** [release/apmplanner2] Error 1
stewart@stewbuntu:

help?!

It’s possible you did a “sudo apt-get update” after you moved the file out of the way?
I ask because after doing an “update” it links libGLESv2.so to libGLESv2.so.bak and you will have the same problem.

There should be a better solution. The issue is that the Qt libraries are using either OpenGLES1.0 or OpenGLES2.0, and by moving the library you are downgrading to the older behaviour. Maybe a runtime or config option?

Another option might be to statically link the Qt library compiled with OpenGLES1.0 only support

I think what’s happening is at compile time it’s finding the wrong libGLESv2.so. It’s finding the one that comes with Ubuntu Mate in /usr/lib and not the one in /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.

I gave up on compiling. I decided to just download the .img and install the lazy way, but I don’t want to give up on compiling (since I’m new to Linux, I’m using this as a learning process.)

@ carpy…yes, I did a sudo apt-get. How do I reverse that? I deleted the directory that I was working in and started everything from scratch (after I tried to download the .img just to confirm that it wasn’t my pi as an issue). By deleting that directory how do I delete the link between libGLESv2.so to libGLESv2.so.bak ?

Cheers
Stew

Make sure the .bak file exists first. Execute:
$ ls -la /usr/lib/libGLE*

If you have a backup file, then to remove the link (or file), type:
$ sudo rm /usr/lib/libGLESv2.so