It is currently Sat Aug 22, 2020 4:27 am


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Can't compile devel branch due to a problem with QT5
PostPosted: Thu Mar 27, 2014 7:16 pm 

Joined: Sat Mar 22, 2014 5:55 pm
Posts: 7
It seems to me that cmake has a bug, or it is configured incorrectly or something like that. Since it finds Qt5 but then make install is not able to compile.

I'm now getting


Code:
In file included from ~/Documents/polyvox/examples/Basic/main.cpp:24:0:
~/Documents/polyvox/examples/Basic/OpenGLWidget.h:31:21: fatal error: QGLWidget: No such file or directory
compilation terminated.


but then

Code:
~/Documents/polyvox/build$ find /usr/ -name 'QGLWidget'
/usr/local/Qt-5.3.0/include/QtOpenGL/QGLWidget


I'm using Ubuntu 12.10.

So I'm wondering. In what linux distribuition is Polyvox compiling at the moment? What method did you use to install QT5? (compile QT5, distro repository, etc)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Can't compile devel branch due to a problem with QT5
PostPosted: Thu Mar 27, 2014 9:42 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
PolyVox currently compiles on OpenSUSE and Fedora, both using Qt packages from the official repositories. There is no reason why it shouldn't work in principle in Ubuntu.

It's possible there's a bug in the older version of CMake you're using (and if there is then we might have to raise the requirement). What version do you have?

Also, could you give the output of make VERBOSE=1 in the terminal from the build directory as that will print the actual include directories the compiler is seeing. For example, if I do it on my machine I see the following at the end:
Code:
[ 92%] Building CXX object examples/Basic/CMakeFiles/BasicExample.dir/OpenGLWidget.cpp.o
cd /home/matt/polyvox/build/examples/Basic && /usr/bin/c++   -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -g -fPIE -I/home/matt/polyvox/build/library/PolyVoxCore/include -I/home/matt/polyvox/library/PolyVoxCore/include -I/usr/include/qt5 -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/lib64/qt5/mkspecs/linux-g++    -std=c++0x -o CMakeFiles/BasicExample.dir/OpenGLWidget.cpp.o -c /home/matt/polyvox/examples/Basic/OpenGLWidget.cpp
and you can see that one of the options given to g++ is -I/usr/include/qt5/QtOpenGL which is where it's looking for QGLWidget.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Can't compile devel branch due to a problem with QT5
PostPosted: Fri Mar 28, 2014 3:21 pm 

Joined: Sat Mar 22, 2014 5:55 pm
Posts: 7
Ok, my cmake version is 2.8.9

And it seems from the verbose output that none of the qt5 folders are included:

Code:
[ 27%] Building CXX object examples/Basic/CMakeFiles/BasicExample.dir/main.cpp.o
cd /home/pozzoe/Documents/polyvox/build/examples/Basic && /usr/bin/c++   -DGLEW_STATIC -I/home/pozzoe/Documents/polyvox/build/library/PolyVoxCore/include -I/home/pozzoe/Documents/polyvox/library/PolyVoxCore/include -I/home/pozzoe/Documents/polyvox/examples/common    -std=c++0x -o CMakeFiles/BasicExample.dir/main.cpp.o -c /home/pozzoe/Documents/polyvox/examples/Basic/main.cpp
In file included from /home/pozzoe/Documents/polyvox/examples/Basic/main.cpp:24:0:
/home/pozzoe/Documents/polyvox/examples/Basic/OpenGLWidget.h:31:21: fatal error: QGLWidget: No such file or directory
compilation terminated.


This is strange, since Qt5 is correctly detected when running cmake.

What version of cmake do you use? (btw, Ubuntu 12.04 LTS and Ubuntu 12.10 do not provide Qt5.2, I was able to find a repository providing Qt 5.0.2 at most; I think the bleeding edge version 13.10 does provide Qt5)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Can't compile devel branch due to a problem with QT5
PostPosted: Sun Mar 30, 2014 6:08 pm 

Joined: Sat Mar 22, 2014 5:55 pm
Posts: 7
Ok, I was able to solve this issue and I'm writing this to let people know how I solved this problem (This comes to mind https://xkcd.com/979/)

First, Ubuntu 12.04 is the LTS version but it doesn't seem to be updated enough to work.

I installed Ubuntu 13.10 (latest at the moment) and this came with qt5 and cmake 2.8.11. After that, the install worked perfectly. I'm not sure if it was because qt5 was insalled properly now or because of some bug fix on cmake between 2.8.9 and 2.8.11

There were some weird issues regarding python bindings, I'll explain how I solved some of those here http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=577


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Can't compile devel branch due to a problem with QT5
PostPosted: Sun Mar 30, 2014 8:58 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
As you have seen from the discussion on the BitBucket issue tracker I have also been having a lot of difficulty with the update to Qt 5. My problems are different, and are mostly related to the OpenGL situation for Qt 5 on Windows and the lack of prebuilt SDKs for the compiler I'm using.

I discussed this with Matt over the weekend and we basically agreed that the transition to Qt 5 is causing too many problems, and that we will revert to Qt 4 for now. In the future we will try to upgrade again, but this is probably at least one month away (maybe more). Perhaps by that time Qt 5 is better supported by the various Linux distros.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net