1

I met this problem when trying to install a package for Python3.6.1 from Pyenv. See the error message below:

Obtaining file:///home/ml4468/roboschool
Complete output from command python setup.py egg_info:
found resource files: 185
running egg_info
Linux, python3, Ubuntu branch
Link against python 3.6
Slow hardware or software render (no shadows)
rm -f ../robot-test-tool ../robot-test-tool_d ../cpp_household.so ../cpp_household_d.so  .build-release/physics-bullet.o  .build-release/assets-mesh.o  .build-release/random-world-tools.o  .build-release/render-glwidget.o  .build-release/render-hud.o  .build-release/render-simple.o  .build-release/render-simple-primitives.o  .build-release/test-tool-qt4.o  .build-release/python-binding.o  .build-debug/physics-bullet.o  .build-debug/assets-mesh.o  .build-debug/random-world-tools.o  .build-debug/render-glwidget.o  .build-debug/render-hud.o  .build-debug/render-simple.o  .build-debug/render-simple-primitives.o  .build-debug/test-tool-qt4.o  .build-debug/python-binding.o .generated/*.moc *.ilk *.pdb .build-release/physics-bullet.o.dep .build-release/assets-mesh.o.dep .build-release/random-world-tools.o.dep .build-release/render-glwidget.o.dep .build-release/render-hud.o.dep .build-release/render-simple.o.dep .build-release/render-simple-primitives.o.dep .build-release/test-tool-qt4.o.dep .build-release/python-binding.o.dep .build-debug/physics-bullet.o.dep .build-debug/assets-mesh.o.dep .build-debug/random-world-tools.o.dep .build-debug/render-glwidget.o.dep .build-debug/render-hud.o.dep .build-debug/render-simple.o.dep .build-debug/render-simple-primitives.o.dep .build-debug/test-tool-qt4.o.dep .build-debug/python-binding.o.dep
rm -rf .generated
rm -rf .build-debug
rm -rf .build-release
Linux, python3, Ubuntu branch
Link against python 3.6
Slow hardware or software render (no shadows)
mkdir -p .generated
mkdir -p .build-release
mkdir -p .build-debug
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c physics-bullet.cpp  -o.build-release/physics-bullet.o -MMD -MF .build-release/physics-bullet.o.dep
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c assets-mesh.cpp  -o.build-release/assets-mesh.o -MMD -MF .build-release/assets-mesh.o.dep
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c random-world-tools.cpp  -o.build-release/random-world-tools.o -MMD -MF .build-release/random-world-tools.o.dep
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c render-glwidget.cpp  -o.build-release/render-glwidget.o -MMD -MF .build-release/render-glwidget.o.dep
In file included from render-glwidget.h:1:0,
                 from physics-bullet.cpp:1:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
In file included from assets-mesh.cpp:1:0:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
In file included from random-world-tools.cpp:3:0:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
In file included from render-glwidget.h:1:0,
                 from render-glwidget.cpp:2:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
make: *** [.build-release/physics-bullet.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [.build-release/assets-mesh.o] Error 1
make: *** [.build-release/random-world-tools.o] Error 1
make: *** [.build-release/render-glwidget.o] Error 1
cd /home/ml4468/roboschool/roboschool/cpp-household && make clean && make -j4 dirs  ../cpp_household.so

C++ dependencies for this project are:

bullet
tinyxml
boost_python
assimp
Qt5

If you see compilation error FIRST THING TO CHECK if pkg-config call was successful.
Install dependencies that pkg-config cannot find.
  • sudo apt-get install qtbase5-dev might help – J.J. Hakala Jul 10 '17 at 23:57
  • I tried that, but it didn't work. – Mufei Li Jul 11 '17 at 0:21
0

So on Ubuntu 14.04 , Qt version is 5.2.1, and opengl not yet QOpenGLWidget, it actually QGLWidget, in the latter version of Qt it will be renamed. You can check:

dpkg -L libqt5opengl5-dev

And see the list of installed files. Then browse header files and You will see what's what :)

  • It has been some time since I posted problem so I don't remember very clearly what I did afterwards. Thank you for the answer and see if someone will meet a similar problem. – Mufei Li Feb 1 '18 at 14:55
  • I am having this issue now. I corrected the only reference I found to QOpenGLWidget, but now I'm getting an undefined reference to the QGLWidget's constructor. I'm new to Qt (haven't used an IDE or toolkit in a while either.) I don't really know where to start or I would try to tweak it. Does this mean that the generator's Qt version and the system's are independent? (As an aside, a minor version change shouldn't introduce backward incompatible changes. Deprecation would be better.) – John P Nov 9 '18 at 10:15
  • The constructor signature it claims is undefined is exactly the way it appears in the docs. Since that's a linker error, I know it at least compiled, so the signature in question is declared but not defined... I don't see how I could have ended up with just the headers, but seems like it's either that or a version mismatch between headers/libraries. Otherwise all I can think of is the fact that it's being renamed, so could they have deliberately removed the definition? Why leave the declaration? – John P Nov 9 '18 at 11:38
  • If declaration is there, maybe you did not add opengl library to the project, for exmaple: "QT += core gui network opengl" or it's not installed? – Rolas Nov 10 '18 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.