Swordfish90 / cool-retro-term

A good looking terminal emulator which mimics the old cathode display...
22.32k stars 851 forks source link

Dependencies and compilation problem Ubuntu 12.04 #142

Closed atomic closed 10 years ago

atomic commented 10 years ago

My elementaryOS(based on Ubuntu 12.04 Precise) does not have the access to Trusty, so i have to install Qt 5.3.1 from http://qt-project.org/downloads and added the correct path to the qt bin folder. "sudo qmake -v" gives me (i install it on /opt/ so i use sudo):

QMake version 3.0
Using Qt version 5.0.2 in /usr/lib/x86_64-linux-gnu

Here's the error i get when run "sudo make":

cd app/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /opt/cool-retro-term/app/app.pro -o Makefile ) && make -f Makefile 
make[1]: Entering directory `/opt/cool-retro-term/app'
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I/usr/include/qt5 -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o main.o main.cpp
main.cpp:1:39: fatal error: QtQml/QQmlApplicationEngine: No such file or directory
 #include <QtQml/QQmlApplicationEngine>
                                       ^
compilation terminated.
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/opt/cool-retro-term/app'
make: *** [sub-app-make_first] Error 2

But Qt 5.3.1 has QtQml, which is at /opt/Qt5.3.1/5.3/gcc_64/qml

So, how to resolve this?

Swordfish90 commented 10 years ago

Ok, you did the right thing getting Qt directly from Digia. The problem here is that you are not using them, "qmake -v" should return something like "Using Qt version 5.3.1 in /opt/Qt5.3.1/5.3/gcc_64/".

I think the issue here is that you are running everything with sudo, which if I recall correctly restores some environmental variables to prevent security attacks. To be clear you don't need to use sudo to use the version of Qt in /opt/. sudo is not giving you the right to use them is giving you the right to modify them (which you don't need).

atomic commented 10 years ago

Oh my, i didn't know root has different access to different qmake. Yeah, i compile it somewhere else with no sudo, and it worked. I wonder why my root has very old version of qt which i never installed. Thanks, it worked really well.