qmake /bin/sh: OE_QMAKE_CXX: command not found



  • I have been working on building an application in Qt Creator for a version of embedded Linux that runs on a Colibri iMX7D board from a company called Toradex. I've posted a similar question to this one over on the Toradex developer forums, but the suggestions I received from their technical support all tell me to do things that I've already tried to resolve this issue. Here is my issue:

    Every time I start Qt Creator I follow the Toradex document: How to set up Qt Creator to cross compile for embedded Linux to start QtCreator from the same shell where the environment script was sourced.

    This is the output from my Linux Terminal Emulator. I am running Ubuntu Linux 14.04.5 LTS 64-bit:

    carloval@ubuntu:~$ . /usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon- angstrom-linux-gnueabi

    carloval@ubuntu:~$ 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

    This is exactly the output I should expect to see based on the contents of the linked document above. After the above steps I am suppose to run Qt Creator from the same shell by typing:

    qtcreator

    This works and launches Qt Creator 4.0.2. After Qt Creator 4.0.2 is launched I can connect to our device successfully using Qt Creator "Tools->options..." and going to the "Device" screen. The device returns an identification string for the version of embedded Linux that it's running. This version matches with what I am building and loading onto our device.

    The problem I have is when we run Qt Creator I see the following two lines in the General Messages tab of Qt Creator:

    /bin/sh: OE_QMAKE_CXX: command not found
    /bin/sh: OE_QMAKE_CXXFLAGS: command not found

    Does anyone know why I'm seeing these messages? I am able to successfully build an application, or at least when I build I do not see any warning or error messages from the compiler output, and the executable is generated.

    There is another forum member kptt who posted a question about this identical issue 7 months ago: here. There were responses to the post, but there doesn't appear to be any resolution to his issue. I sent this forum member a private chat message to see if the issue was every resolved for them, but this member has not been on the forum in 6 months so I don't expect to hear anything back soon from them, if at all.

    Does anyone have any ideas about how this issue can be resolved?

    Thank You



  • @Gage05 It could be the variables didn't carry into your creator. So OE_QMAKE_CXX would be undefined as a command.

    The more likely is that creator can't find arm-angstrom-linux-gnueabi-g++ in order to execute it. You could try adding the full path to your command before starting creator and see if that fixes it.



  • @ambershark Thanks for the information. I'm waiting for my embedded Linux build to complete. When that finishes and I get back into Qt Creator I'll try what you're saying and let you know how it went.

    Thanks again for the information.



  • @ambershark said in qmake /bin/sh: OE_QMAKE_CXX: command not found:

    arm-angstrom-linux-gnueabi-g++

    Okay, I was finally able to try this. I modified the line in the script file that I was running: environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi, from the Terminal Emulator window, but I still see the same errors. Do you have any other suggestions on what else that I might try?



  • @ambershark Okay, after trying your suggestion, and still seeing the errors, I reverted back to using the original file that I made as backup.

    Now, the problem is gone. I mean that makes no sense because the script file contents are the same as what they were originally.

    Maybe the fact that I logged in as root and moved the file back had something to do with it. I don't see that the file permissions have changed and the file is still in a root folder path. I don't know. It's working though.....for now. Well see how it goes.

    Anyway, thanks for the suggestion. I believe it had an impact on helping to get this issue resolved.

    Take Care. :).


  • Moderators

    @Gage05 You can use diff command to compare both files. It is possible that the one not working contains characters which are not visible or hard to see (Unicode).



  • @Gage05 Sorry I was busy the last few days so I didn't have a chance to check the boards here. Looks like it was solved by restoring an old file.

    I would have said what @jsulm said about invisible characters being the culprit. Either way it's working now so you're all set. :)



  • @ambershark Well, it's working.....somewhat. After I wrote my response I went back and tested opening a closing Qt Creator a few more times. The problem appears intermittent. When I first open Qt Creator, and sometimes on the first build after opening, I still see the problem occur, but then it goes away. I can run Build->Run qmake after things begin working and everything is fine.

    Sometimes the problem never occurs after starting Qt Creator.

    It's very strange, but I seem to be able to get around the problem for now. I wonder if it has something to do with Qt 4.8 and Qt5 existing side-by-side on the same host system.

    It's something that I can live with for now, because I seem to be able to get around the problem and build applications fine.

    Thank you ambershark and jsulm for your helpful comments and suggestions.

    Take Care. :).



  • Hi everybody,

    I am experiencing the same problem. AFAIK qmake runs in its own sub-shell, which does not inherit the environment variables OE_QMAKE_CXX and OE_QMAKE_CXXFLAGS. They seem to be used only for sanity checks, since they appear in the generated Makefile, and it cross-compiles without further problems.

    The issue can be reproduced by running either qmake or qt-creator. And as posted above, the variables were already defined by sourcing the toolchain environment. Interestingly, if the file .qmake.stash is already present, qmake does not complain about the OE_QMAKE_xxx symbols. If I delete this file and run qmake again, the error messages re-appear.

    On one hand, I would like to know the cause of the issue, which seems to be related to the Yocto meta-qt5 layer -- I will ask also in another forum. On the other hand, @Gage05 says he was able to get this issue gone by restoring an old file. Could you please give more details on what you did?

    Thank you in advance.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.