"c: Command not found" error
Asked Answered
P

3

6

I built qt5-toolchain for ARM arthitecture successfully.But I receive following error while compiling any qt application:

Makefile:545: recipe for target 'moc_mainwindow.o' failed Wl,-O1 -o Demo1 main.o mainwindow.o moc_mainwindow.o -L/opt/poky/2.0.1/sysroots/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/usr/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lEGL -lpthread Makefile:199: recipe for target 'Demo1' failed
make: c: Command not found
make: [moc_mainwindow.o] Error 127 (ignored)
make: Wl,-O1: Command not found
make: [Demo1] Error 127 (ignored)

How can I solve this problem? Thank for your reply...

Peti answered 24/3, 2016 at 14:56 Comment(3)
add more informations. OS, build type (qmake/cmake), sources stackoverflow.com/help/mcveLimpkin
Some variable is not set correctly. -Wl,-O1 is supposed to be an argument to a command running in a make recipe but the variable for the command itself (which comes before that) is missing and so make is seeing -Wl,-O1 as the start of the line, stripping the - as "ignore errors from this command" (which is why it says (ignored) there) and then tries to run Wl,-O1 as a command (and that obviously doesn't exist).Apical
what version of qt you are using, from Jethro branch or master?Ovarian
O
6

After you have got the SDK and installed it in /opt, you will need to modify qtcreator.sh to add the environment setup.

so, locate /opt/poky/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

edit /Qt5.5.1/Tools/QtCreator/bin/qtcreator.sh

add this line before the Shebang source /opt/poky/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

Ovarian answered 24/3, 2016 at 17:58 Comment(0)
A
0

I think your qmake.config file is not configure properly.

follow this links : http://exploringbeaglebone.com/chapter11/

Prepare the build by creating a mkspecs file for armhf by modifying the linux-arm-gnueabi-g++ mkspecs file.

Edit the qmake.conf file to have “gnueabihf” entries rather than “gnueabi” entries.

Aisha answered 24/3, 2016 at 15:13 Comment(0)
I
0

Editing qtcreator.sh is not necessary, but it may be convenient.

To fix the make: c: Command not found error you need to start Qt Creator from a shell where the Qt SDK environment setup script has been run.

For example:

. /opt/poky/2.0.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi  
qtcreator > /dev/null 2>&1 &

After you installed the SDK it said this:

Each time you wish to use the SDK in a new shell session, you need to source the environment setup script

Induna answered 22/9, 2017 at 13:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.