Linux compile, qt-libs 5.5.1


#1

I think Debian might (just for a change) be tracking a little ahead of HiFi in qt versions here, so this might be a warning of things-to-come rather than a current bug:

Just edited (re-copy-pasted the error report) as student assessment time is coming to an end (my job involves helping students create the best project work they possibly can, even when they turn up one day before due-date!) so hope to get back in to HiFi over the summer (southern) period.

[ 79%] Building CXX object plugins/oculusLegacy/CMakeFiles/oculusLegacy.dir/src/OculusLegacyDisplayPlugin.cpp.o
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/QOpenGLContext:1:0,
                 from /usr/src/hifi/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp:18:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qopenglcontext.h:49:2: warning: #warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined [-Wcpp]
 #warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
  ^
/usr/include/x86_64-linux-gnu/qt5/QtGui/qopenglcontext.h:50:2: warning: #warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h [-Wcpp]
 #warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
  ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:37:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qsize.h:37,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QSize:1,
                 from /usr/src/hifi/libraries/plugins/src/plugins/DisplayPlugin.h:15,
                 from /usr/src/hifi/libraries/display-plugins/src/display-plugins/DisplayPlugin.h:9,
                 from /usr/src/hifi/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h:10,
                 from /usr/src/hifi/libraries/display-plugins/src/display-plugins/WindowOpenGLDisplayPlugin.h:10,
                 from /usr/src/hifi/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.h:10,
                 from /usr/src/hifi/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp:8:
/usr/src/hifi/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp: In member function ‘virtual void OculusLegacyDisplayPlugin::activate()’:
/usr/src/hifi/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp:174:14: error: ‘result’ was not declared in this scope
     Q_ASSERT(result);
              ^
plugins/oculusLegacy/CMakeFiles/oculusLegacy.dir/build.make:62: recipe for target 'plugins/oculusLegacy/CMakeFiles/oculusLegacy.dir/src/OculusLegacyDisplayPlugin.cpp.o' failed
make[2]: *** [plugins/oculusLegacy/CMakeFiles/oculusLegacy.dir/src/OculusLegacyDisplayPlugin.cpp.o] Error 1
CMakeFiles/Makefile2:6652: recipe for target 'plugins/oculusLegacy/CMakeFiles/oculusLegacy.dir/all' failed
make[1]: *** [plugins/oculusLegacy/CMakeFiles/oculusLegacy.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

As mentioned, I may be off the official library versions, so I don’t expect anything that breaks current compiles to be considered, of course.

My qtlbs are on version 5.5.1
My C++ environment is GCC on 5.2.1


#2

The higher GCC might be fine but the higher qt will be an issue.

Luckily High Fidelity keeps a repo with qt 5.4.2 for their Ubuntu 14.04 compile (info found in https://github.com/highfidelity/hifi-cloud )

Now, there is a chance if you uninstall all of the QT files you have installed now for 5.5.1 that you can get this repo to work. I say this as a “maybe” so its honestly just a try and see.

To get it installed, I am pulling from the Ubuntu 14.04 instructions but these SHOULD work on Debian.

apt-get install software-properties-common
add-apt-repository "deb http://hifi-debian-repo.s3.amazonaws.com/ stable main"

now just do a apt-get update then apt-get install qt and you will see it install.

To get the compile to recognize it you can run this
echo QT_CMAKE_PREFIX_PATH=/usr/local/Qt5.4.2/lib/cmake >> /etc/environment

Its been a while since I worked with straight Debian but if you try it, let me know how it works out.