Compile Error on Banana Pi with Debian 7

I get the following compile error on Debian. Any ideas?

g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIE -DQ_LINUX_32 -D_TTY_NOWARN_ -D__STDC_LIMIT_MACROS -DGIT_COMMIT=2.0.15-18-gfc4d734 -DGIT_HASH=fc4d7343c1e24b955ea409d8977fa53c31d3030f -DQT_NO_DEBUG -DMAVLINK_NO_DATA -DQGC_USE_ARDUPILOTMEGA_MESSAGES -DNOMINMAX -DEXTERNAL_USE -DDATADIR="/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WEBKITWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_OPENGL_LIB -DQT_QML_LIB -DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_TESTLIB_LIB -DQT_SCRIPT_LIB -DQT_SERIALPORT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR="/home/pi/apm_planner" -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -I. -IQsLog -isystem /usr/include -isystem /usr/local/include -Ilibs/mavlink/include/mavlink/v1.0 -Ilibs/mavlink/include/mavlink/v1.0/ardupilotmega -Isrc/apps/mavlinkgen -Isrc/apps/mavlinkgen/ui -Isrc/apps/mavlinkgen/generator -Ilibs/eigen -Ilibs/alglib -Ilibs/opmapcontrol/src/core -Ilibs/opmapcontrol/src/internals -Ilibs/opmapcontrol/src/internals/projections -Ilibs/opmapcontrol/src/mapwidget -Ilibs/utils -Ilibs -Ilibs/opmapcontrol -Ilibs/thirdParty/quazip -I/usr/src/3rdparty/zlib -I. -Isrc -Isrc/ui -Isrc/ui/linechart -Isrc/ui/uas -Isrc/ui/map -Isrc/uas -Isrc/comm -Iinclude/ui -Isrc/input -Isrc/lib/qmapcontrol -Isrc/ui/mavlink -Isrc/ui/param -Isrc/ui/watchdog -Isrc/ui/map3D -Isrc/ui/mission -Isrc/ui/designer -Isrc/ui/configuration -Isrc/output -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtQuick -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWebKitWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtPrintSupport -isystem /usr/include/arm-linux-gnueabihf/qt5/QtSvg -isystem /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL -isystem /usr/include/arm-linux-gnueabihf/qt5/QtQml -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWebKit -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtTest -isystem /usr/include/arm-linux-gnueabihf/qt5/QtScript -isystem /usr/include/arm-linux-gnueabihf/qt5/QtSerialPort -isystem /usr/include/arm-linux-gnueabihf/qt5/QtSql -isystem /usr/include/arm-linux-gnueabihf/qt5/QtXml -isystem /usr/include/arm-linux-gnueabihf/qt5/QtNetwork -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -Ibuild-release/moc -Ibuild-release/ui -o build-release/obj/CameraView.o src/ui/CameraView.cc
src/ui/CameraView.cc: In member function ‘virtual void CameraView::paintGL()’:
src/ui/CameraView.cc:240:94: error: ‘glDrawPixels’ was not declared in this scope
src/ui/CameraView.cc: In member function ‘virtual void CameraView::resizeGL(int, int)’:
src/ui/CameraView.cc:246:18: error: ‘GL_PROJECTION’ was not declared in this scope
src/ui/CameraView.cc:246:31: error: ‘glMatrixMode’ was not declared in this scope
src/ui/CameraView.cc:247:20: error: ‘glLoadIdentity’ was not declared in this scope
src/ui/CameraView.cc:248:30: error: ‘glOrtho’ was not declared in this scope
src/ui/CameraView.cc:249:18: error: ‘GL_MODELVIEW’ was not declared in this scope
make: *** [build-release/obj/CameraView.o] Error 1

Well, after doing some research it appears I (and anyone else wanting to compile on an embedded platform) might be out of luck.
If I’m correct, I’m seeing these compile errors because OpenGL ES does not support these functions like glDrawPixels for example.

Hmm…bummer.

I don’t believe we actually use any of the pieces that use OpenGL (other than the built in Qt stuff), so you may be able to run if you disable the parts that require it. That stuff needs to be cleaned up at some point, for sure.

Hmm…I was looking for a place to help out and get involved. Maybe this would be a good start? I was worried that it would be a ton of work and over my pay grade. :slight_smile:

I see a bug has been logged as an enhancement, Support for ARM architechture. #271.

Dave

you could try and remove the cameraview from the build. it’s not actually being used, but the dependency on QGLWidget is not QOpenGLES compatible. We use SDLv2, but it looks like it has OpenGL and OpenGLES support.

Hope that helps :slight_smile:

Thank you Bill and Michael. I’ll give it a go.

Dave

That did it.

Here’s what I did:

Removed src/ui/CameraView.cc and .h files
Removed CameraView.h from src/ui/MainWindow.h
Removed both from qgroundcontrol.pro

Runs great on the Banana Pi, although I did cheat a little by compiling and running on Ubuntu and not Debian.

Thanks again!

Dave

Just need to put the Banana Pi in the backpack ground station and I will be good to go!

Thanks to all those that contribute to this project–very well done!

Dave