fstl-app / fstl

A fast STL file viewer
449 stars 105 forks source link

compiling with qt5 and debian #26

Closed ruenahcmohr closed 6 years ago

ruenahcmohr commented 6 years ago

libqt5opengl5-dev installed,

zippo:/files/programming/src/fstl/fstl/build# make -j8 g++ -c -pipe -O3 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../qt -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/X11R6/include -I. -I../qt -I. -o app.o ../src/app.cpp . . . compilation terminated.

digging turns out that even with qt4 removed, system was trying to use it.

so

zippo:/files/programming/src/fstl/fstl/build# /usr/lib/i386-linux-gnu/qt5/bin/qmake ../qt/fstl.pro Info: creating stash file /files/programming/src/fstl/fstl/build/.qmake.stash zippo:/files/programming/src/fstl/fstl/build# ls Makefile zippo:/files/programming/src/fstl/fstl/build# make -j8 . . . (happyness)

I dont know if this was caused by something in my build env. or by the fstl.pro

thanks for watching!

DeveloperPaul123 commented 6 years ago

@ruenahcmohr

So just to be clear you:

  1. Installed qt4
  2. Tried to build fstl (build failed)
  3. Installed qt5
  4. Tried to build fstl again with qt5 -> this is where it still tried to use qt4?
ruenahcmohr commented 6 years ago

correct, I had to run the qt5 qmake directly to get it to behave, I'm not up on QT, I just know that they make sure there is no backwards compatibility between versions!

DeveloperPaul123 commented 6 years ago

@ruenahcmohr Hmm, just the steps that occured make me lean towards thinking there was something left over in your build from when you tried to use qt4 that didn't get cleaned up all the way when you switched to qt5.

Can you reproduce this if you start from scratch with qt5 and qt4 installed but skip steps 1-3 above?

I'm not up on QT, I just know that they make sure there is no backwards compatibility between versions! 😂 This is true to a certain extent, but qt5 introduced a lot of new and useful features so it's worth the switch IMO.

ruenahcmohr commented 6 years ago

This is with qt4 uninstalled...

mv build _build mkdir build cd build qmake ../qt/fstl.pro qmake: could not exec '/usr/lib/i386-linux-gnu/qt4/bin/qmake': No such file or directory which qmake /usr/bin/qmake ls -l /usr/bin/qmake /usr/bin/qmake -> qtchooser dpkg -S qtchooser qtchooser: /usr/bin/qtchooser apt-get install qtchooser qtchooser is already the newest version (63-g13a3d08-1). apt-cache search qtchooser qt4-default - Qt 4 development defaults package qt5-default - Qt 5 development defaults package qtchooser - Wrapper to select between Qt development binary versions ...hmm apt-get install qt5-default 0 upgraded, 1 newly installed, 0 to remove qmake ../qt/fstl.pro Info: creating stash file /files/programming/src/fstl/fstl/build/.qmake.stash less Makefile ... -I/usr/lib/i386-linux-gnu/qt5/mkspe... make -j8 (happyness)

the lesson might be that, on debian, qt5-default and libqt5opengl5-dev are required packages.

"I did not know the contents of this email before I wrote it, I barely knew it while I was writing it"

ruenahcmohr commented 6 years ago

All in all, so far this has been the smoothest QT project I'v ever tried to compile. :-)

mkeeter commented 6 years ago

Alright, I've added those two packages into the README – glad you got things working!