Qt5 Compile Error

Hi,
I am having a trouble to compile the application on the Qt creater.
Embedded Linux Image and SDK were build with no errors and all environment settings done as per the instruction from Toradex website. However, when I compile the empty Qt widget application, the following errors occur.

10:35:19: Running steps for project test...
10:35:19: Starting: "/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" /home/brian/Smartek/workspace/test/test.pro -spec /usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ CONFIG+=debug CONFIG+=qml_debug
10:35:19: The process "/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" exited normally.
10:35:19: Starting: "/usr/bin/make" qmake_all
make: Nothing to be done for 'qmake_all'.
10:35:19: The process "/usr/bin/make" exited normally.
10:35:19: Starting: "/usr/bin/make" 
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/uic ../test/mainwindow.ui -o ui_mainwindow.h
c -pipe  -g -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o main.o ../test/main.cpp
Makefile:789: recipe for target 'main.o' failed
c -pipe  -g -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o mainwindow.o ../test/mainwindow.cpp
Makefile:893: recipe for target 'mainwindow.o' failed
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/moc -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I/home/brian/Smartek/workspace/test -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../test/mainwindow.h -o moc_mainwindow.cpp
make: c: Command not found
make: [main.o] Error 127 (ignored)
make: c: Command not found
make: [mainwindow.o] Error 127 (ignored)
c -pipe  -g -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o moc_mainwindow.o moc_mainwindow.cpp
Makefile:896: recipe for target 'moc_mainwindow.o' failed
o test main.o mainwindow.o moc_mainwindow.o   -L/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib -lQt5Widgets -lQt5Gui -lQt5Core -lEGL -lGLESv2 -lpthread 
Makefile:212: recipe for target 'test' failed
make: c: Command not found
make: [moc_mainwindow.o] Error 127 (ignored)
make: o: Command not found
make: [test] Error 127 (ignored)
10:35:20: The process "/usr/bin/make" exited normally.
10:35:20: Elapsed time: 00:00.

I cannot figure out what cause those errors. Please help me get through to it.

Thanks
Brian

Hi

Something in the setup of qtcreator is wrong. It uses the (not existing) program ‘c’ as the compiler when it should be using angstrom-linux-gnueabi-g++.

Did you start qtcreator with the environment variables set for the SDK, i.e. did you source the environemnt script and then start qtcreator from the same terminal?

$ . /usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi; qtcreator

Max

Hi Max,

Thanks for the prompt response.

Well I was trying to open the Qt Creator from the same shell after having the environment variables set. However the following errors occured.

brian@brian-MacBookPro:~$ . /usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi
brian@brian-MacBookPro:~$ echo $OE_QMAKE_CXX
arm-angstrom-linux-gnueabi-g++ -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi
brian@brian-MacBookPro:~$ qtcreator
Running  "/usr/bin/usdk-target"

Error:

The current user can not access the LXD server which is required for the Ubuntu SDK. Make sure the user is part of the lxd group, relogin and restart the IDE.

I have tried to install Qt Creator in two ways as below and both giving me the same errors.

First installation:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa

sudo apt update

sudo apt dist-upgrade

sudo apt install ubuntu-sdk-ide

Second installation:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa

sudo apt-get update

sudo apt-get install qtcreator qt4-dev-tools

Seems like I messed up something in my Qt installation.

Thanks a lot.

Brian

which ubuntu version uname -a are you using???

Hi Jaski,

I am using Ubuntu 16.04.1 on Macbook pro.

brian@brian-MacBookPro:~$ uname -a
Linux brian-MacBookPro 4.13.0-32-generic #35~16.04.1-Ubuntu SMP Thu Jan 25 10:13:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Thanks a lot

Brian

is it a native installation or are you using a virtual machine?

Hi Jaski,

It is native installation using external hard drive via USB. I remember that Qt Creator(community) ever worked from the terminal shell a few weeks ago but I had a Linux build errors before so I deleted it and installed the commercial version for testing Boot2Qt and now back again to the community version after succeeding the image and SDK build and ended up with Qt creator errors.

Also, in between commercial and community Qt creator installation back and forth, Ubuntu had a couple of system updates.

Thanks a lot

Brian

Hi Jaski,

Solved the problems;

I removed and reinstalled the lxd container and set that up again then everything works now.

Thanks for the support.

Brian

hi brian, thanks for the information.