question

Mike Dorsett avatar image
Mike Dorsett asked

howto install and use the sdk

Problem with the SDK

... (Note: the howto tries to compile with CC command not cc so CASE TYPO in text!)!

This is an ARM executable, this can be checked with

file helloworld


This should report something like:

helloworld: ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped

mike@Thorin:~/poky$ file helloworld
helloworld: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /opt/venus/dunfell-arm-cortexa8hf-neon/sysroots/x86_64-ve-linux/lib/ld-linux-x86-64.so.2, BuildID[sha1]=9f1d45b059921bf4c8c650c71df660d572175f6b, for GNU/Linux 3.2.0, not stripped
so major difference is 64bit code generated not 32 bit


Copy the file over to your GX device, and run it there.

ls -l for helloworld

-rwxr-xr-x 1 root root 16488 Sep 28 22:52 helloworld


root@beaglebone:~# ./helloworld
-sh: ./helloworld: cannot execute binary file: Exec format error

So the instructions for the SDK are good, but only if everything goes ok. is there a troubleshoot for this?

OK so to produce 32 bit output - as target is 32 bit ARM processor the instruction should be:

cc -m32 helloworld.c -o helloworld2

However this results in the following error:

n file included from /opt/venus/dunfell-arm-cortexa8hf-neon/sysroots/x86_64-ve-linux/usr/include/features.h:489,
from /opt/venus/dunfell-arm-cortexa8hf-neon/sysroots/x86_64-ve-linux/usr/include/bits/libc-header-start.h:33,
from /opt/venus/dunfell-arm-cortexa8hf-neon/sysroots/x86_64-ve-linux/usr/include/stdio.h:27,
from helloworld.c:1:
/opt/venus/dunfell-arm-cortexa8hf-neon/sysroots/x86_64-ve-linux/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
7 | # include <gnu/stubs-32.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
GNU Wiki says:-

Build fails with ''fatal error: gnu/stubs-32.h: No such file or directory''. What is the problem?

[ Permalink ]

On x86_64 GNU/Linux the default behaviour is to build GCC so it supports compiling both 64-bit and 32-bit objects. To compile 32-bit versions of the runtime libraries you need to have the 32-bit glibc headers installed, which are not installed by default on many GNU/Linux distributions.

To fix the problem either:

  • install the 32-bit glibc package (which your system's package manager probably calls something like libc6-dev, libc6-dev-i386, glibc-devel.i686, or glibc-devel-32bit), or

  • disable 32-bit support by configuring GCC with --disable-multilib.


However, all above libc6 packages are installed!!.

venus sdk
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

0 Answers

Related Resources

Additional resources still need to be added for this topic