Qtcreator: stubs-32.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found

Hey Toradex Team!

There seems to be a BSP related issue when using the newest qtcreator 4.8.0 (tested on Ubuntu 18.04 and Ubuntu 18.10).
First of all, building our application works as expected, so these are only visual errors. However, qtcreator shows many of them, because the file gnu/stubs-soft.h cannot be found. So these seems to be a BSP related issue.

When I open any file of our project using the Toradex Kit, I get the following error:

stubs-32.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
main.cpp:1:1: note: in file included from /home/christian/sources/project/src/main.cpp:1:
main.cpp:1:10: note: in file included from /home/christian/sources/project/src/main.cpp:1:
mainwindow.h:4:10: note: in file included from /home/christian/sources/project/src/mainwindow.h:4:
QMainWindow:1:10: note: in file included from /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets/QMainWindow:1:
qmainwindow.h:43:10: note: in file included from /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets/qmainwindow.h:43:
qtwidgetsglobal.h:43:10: note: in file included from /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets/qtwidgetsglobal.h:43:
qtguiglobal.h:43:10: note: in file included from /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/qt5/QtGui/qtguiglobal.h:43:
...
os_defines.h:39:10: note: in file included from /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/c++/7.3.0/arm-angstrom-linux-gnueabi/bits/os_defines.h:39:
features.h:447:10: note: in file included from /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/features.h:447:
stubs.h:53:10: note: in file included from /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/gnu/stubs.h:53:

Then I took a look into the stubs-32.h:

/* This file is automatically generated.
   This file selects the right generated file of `__stub_FUNCTION' macros
   based on the architecture being compiled for.  */


#if !defined __ARM_PCS_VFP
# include <gnu/stubs-soft.h>
#endif
#if defined __ARM_PCS_VFP
# include <gnu/stubs-hard.h>
#endif

Then I looked up the files in the sysroot:

christian@customer-linux-dev:/usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/gnu$ ls -l
total 28
-rw-r--r-- 1 root root 1263 Okt 28 19:29 libc-version.h
-rw-r--r-- 1 root root  374 Okt 28 19:29 lib-names-32.h
-rw-r--r-- 1 root root 1884 Okt 28 19:30 lib-names.h
-rw-r--r-- 1 root root 1720 Okt 28 19:30 lib-names-hard.h
-rw-r--r-- 1 root root  295 Okt 28 19:29 stubs-32.h
-rw-r--r-- 1 root root 1868 Okt 28 19:30 stubs.h
-rw-r--r-- 1 root root  742 Okt 28 19:30 stubs-hard.h
christian@customer-linux-dev:/usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/gnu$ 

So as we can see, there is no stubs-soft.h, however there is a stubs-hard.h, so the errors can be resolved with a simple #define __ARM_PCS_VFin every file - yeah. (ATTENTION: I don’t know the effects of this change!).

However, this is something, that should be fixed in the BSP itself.

Please let me know, if you need further information.

BR Christian

hi @cheesi

There seems to be a BSP related issue when using the newest qtcreator 4.8.0 (tested on Ubuntu 18.04 and Ubuntu 18.10). First of all, building our application works as expected, so these are only visual errors. However, qtcreator shows many of them, because the file gnu/stubs-soft.h cannot be found. So these seems to be a BSP related issue.

What did you build exactly and how?

Could you check where this is defined in your SDK or QT creator Environment?

#define __ARM_PCS_VFP

Thanks and best regards, Jaski

I setup a Ubuntu 18.04 as a VM and installed qtcreator 4.8.0 with the installer from the Qt FTP. I manually created the toolchain with our bitbake buildsystem (“bitbake meta-toolchain-qt5”) and installed it on the VM. I configured the qt creator kit/compiler/etc. as described in your tutorials on developer.toradex.com. And finally: i tried to compile our custom application. The compilation - as I already mentioned - works just fine. There are just really many “visual errors”: alt text

Could you check where this is defined in your SDK or QT creator Environment?

Sure, there you go (sorry for the formatting, somehow, I don’t get it right…)

christian@customer-ubuntu-1804:~$ grep -rnw '/usr/local/oecore-x86_64/' -e '__ARM_PCS_VFP' /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/share/libtool/build-aux/config.guess:932: if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/share/libtool/build-aux/config.guess:933: | grep -q __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/share/gnu-config/config.guess:932: if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/share/gnu-config/config.guess:933: | grep -q __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/share/automake-1.15/config.guess:943: if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/share/automake-1.15/config.guess:944: | grep -q __ARM_PCS_VFP Binary file /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/7.3.0/cc1 matches Binary file /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/7.3.0/cc1plus matches /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/gnu/lib-names-32.h:7:#if !defined __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/gnu/lib-names-32.h:10:#if defined __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/gnu/stubs-32.h:6:#if !defined __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/gnu/stubs-32.h:9:#if defined __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/bits/syscall-32.h:8:#if !defined __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/include/bits/syscall-32.h:366:#if defined __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/lib/libffi-3.2.1/include/ffitarget.h:46:#ifdef __ARM_PCS_VFP /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/share/libtool/build-aux/config.guess:932: if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/share/libtool/build-aux/config.guess:933: | grep -q __ARM_PCS_VFP grep: /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/share/polkit-1/rules.d: Permission denied /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/usr/src/debug/libffi/3.2.1-r0/libffi-3.2.1/src/arm/ffitarget.h:46:#ifdef __ARM_PCS_VFP grep: /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/etc/group-: Permission denied grep: /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/etc/securetty: Permission denied grep: /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/etc/shadow: Permission denied grep: /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/etc/gshadow: Permission denied grep: /usr/local/oecore-x86_64/sysroots/cortexa9t2hf-neon-angstrom-linux-gnueabi/etc/passwd-: Permission denied

Further information: qtcreator 4.7 has the same problem qtcreator 4.6 does NOT have the problem It seems like the QtCreator-Teams switched on their Clang code model by default with qtcreator 4.7, which doesn’t sallow this error anymore.
BR Christian

hi

Thanks for this Information.

As you said, this seems to only a visual error, then this shouldn’t be that important. For the solution you wrote:

So as we can see, there is no stubs-soft.h, however there is a stubs-hard.h, so the errors can be resolved with a simple #define __ARM_PCS_VFin every file - yeah. (ATTENTION: I don’t know the effects of this change!).

Adding define in every file will be very time consuming. It will be better to find a common file for all the files which have this missing file error or just create a empty stubs-soft.h in the gnu folder.

Best regards, Jaski

Hi @jaski.tx !

Thanks for the respone. Yeah, it isn’t that important, just really annoying.

Adding define in every file will be very time consuming. It will be better to find a common file for all the files which have this missing file error or just create a empty stubs-soft.h in the gnu folder.

Didn’t thought about that, but yeah that should work to. Thanks for the hint.

BR Christian

You are welcome. Best regards, Jaski