This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: Qmake error

Part Number: PROCESSOR-SDK-AM335X


Hi

I am using AM335x Starter kit and try to build my QT application as stated in Sitara_Linux_Training_Hands_on_with_QT.pdf  - LAB 1, but when I ran qmake helloworld.pro command it failed with below error  qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake'

I dont have QT4 or QT 5 installed on my ubuntu 16.04, do I need QT4/QT5 on my machine to compile QT projects?

  • The software team have been notified. They will respond here.
  • Hello Dattatray,

    Please, follow the Hands on with Qt labs strictly.
    You probably have not proceed the source step or not chose the proper compiler under Tools -> Options... -> Kits -> <Your board> -> Compiler

    echo $QMAKESPEC
    source /home/sitara/AM335x/ti-processor-sdk-linux-<machine>-<sdk version>/linux-devkit/environment-setup
    echo $QMAKESPEC

    Best regards,
    Kemal

  • Thanks Kemal,

    Yes, I am following as per lab training now I am getting below error

    [linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-04.00.00.04/example-applications/lab1> sudo qmake helloworld.pro
    [linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-04.00.00.04/example-applications/lab1> sudo make
    g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o helloworld.o helloworld.cpp
    helloworld.cpp:1:24: fatal error: QApplication: No such file or directory
    compilation terminated.
    Makefile:308: recipe for target 'helloworld.o' failed
    make: *** [helloworld.o] Error 1

    Only thing I am not doing is not installing QT5

    QT Creator 5.7.0 installed on your Linux host.

    • You can download Qt Creator from open source distribution version of Qt http://download.qt.io/official_releases/qt/5.7/5.7.0/
    • QT will download as a .run file. Make the file executable by running the chmod + <qtfile> command and ./<qtfile>. These steps should launch the QT installer.
    • Extract the package. Qt creator will be under Tools/Qt5.7.0 folder. In some cases it may also be under the opt folder. Type cd /opt/Qt5.7.0 into the command line to locate the file.
    • The labs in this wiki page is validated with Ubuntu 14.04 on 64 bit machine

    as it is failed to install and below is error dont know why, may be some download error

    ~/Documents/AM335x_Starterkit_setup_files$ sudo ./qt-opensource-linux-x64-5.7.0.run
    sudo: ./qt-opensource-linux-x64-5.7.0.run: command not found

  • Do not use the sudo command in front of qmake. It clears the sourced user environment variables and loads the root ones.

  • Thanks Kemal

    It works, I thought I need sudo to add source and make changes on harddisk. Yeah now it is working.

    Secondly, I noticed few thing need to be corrected in this document

    1. QT will download as a .run file. Make the file executable by running the chmod + <qtfile> command and ./<qtfile>. These steps should launch the QT installer.

    Correction:  to make run file executable should use command as chmod +x <qtfile>

    2. helloworld.pro file in downloads zip is missing  "QT += widgets" this generates compilation error

     

    Thank you very much for timely response

  • Thank you for your feedback and assistance.