CROSS Compiler error

Hello,

I’m setting up my pc following these instructions : link
And at the end of the step 7 when I execute the command:

ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- make scripts

The terminal returns the following error:

CC scripts/mod/empty.o
arm-poky-linux-gnueabi-gcc: No such file or directory
Is your PATH set correctly?
scripts/Makefile.build:257: recipe for target ‘scripts/mod/empty.o’ failed
make[2]: *** [scripts/mod/empty.o] Error 2
scripts/Makefile.build:402: recipe for target ‘scripts/mod’ failed
make[1]: *** [scripts/mod] Error 2
Makefile:560: recipe for target ‘scripts’ failed
make: *** [scripts] Error 2

After several researches I did not find any solutions and I created this topic in the hope that you can help me out.

I have a mangOH Red WP7702 and I set my PATH like this :
export PATH=$PATH:/opt/swi/y22-ext-wp77XX/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi

Thank you.

The make scripts step is no longer required with current toolchains.

1 Like

Thank you for your prompt answer, so I keep moving on and when I do in the mangOH directory :

make red_wp77xx

The terminal returns this :

echo “Not building LEGATO due to $LEGATO == 0”
Not building LEGATO due to $LEGATO == 0
# NOTE: When using leaf, these TOOLCHAIN_X variables don’t need to be passed to mksys.
TOOLCHAIN_DIR=/opt/swi/y22-ext-wp77xx/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi-
mksys -t wp77xx --object-dir=build/red_wp77xx --output-dir=build/update_files red.sdef
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** ERROR:
/home/insa/mangOH/apps/BatteryService/batteryUtils/Component.cdef:3:13: error: Unexpected subsection name ‘headerDir’ in ‘provides’ section.
Makefile:109: recipe for target ‘red_wp77xx’ failed
make: *** [red_wp77xx] Error 1

Any ideas for this ?

provides/headerDir is a feature that is only supported by relatively recent versions of Legato. Which legato version are you building against?

I am using legato 18.09 the latest one for wp77xx

So I decided to uninstall et reinstall legato 18.09.0 with the command :

sudo repo init -u GitHub - legatoproject/manifest: repo manifests for Legato -m legato/releases/18.09.0/legato.xml

Remark : as git://github.com/legatoproject/manifest -m legato/releases/18.09.0/legato.xml with git prefix doesn’t work on my machine I replaced it by https prefix.

And I noticed that there is a line that triggers me, here is the whole terminal return and the line is highlighted :

Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get git-repo - Git at Google
remote: Finding sources: 100% (61/61)
remote: Total 61 (delta 14), reused 61 (delta 14)
Dépaquetage des objets: 100% (61/61), fait.
Depuis git-repo - Git at Google
0c0e934…745be2e master → origin/master

… A new repo command ( 1.25) is available.
… You should upgrade soon:

cp /home/insa/legato_framework/.repo/repo/repo /usr/bin/repo

Get GitHub - legatoproject/manifest: repo manifests for Legato
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:-- 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 824 (delta 3), reused 7 (delta 2), pack-reused 814
Réception d’objets: 100% (824/824), 104.42 KiB | 379.00 KiB/s, fait.
Résolution des deltas: 100% (381/381), fait.
Depuis GitHub - legatoproject/manifest: repo manifests for Legato

  • [nouvelle branche] master → origin/master

Your identity is: tuxedo *******@myEmail.com
If you want to change this, please re-run ‘repo init’ with --config-name

repo has been initialized in /home/insa/legato_framework

So actually I think this error might cause some packages or files to be missing.
And if I continue with repo sync command this error occurs several times during the execution.
So what do you think about it ?

So, I have tried to download manually legato [legato-18.08.0.tar.bz2] from link (the version 18.09.0 is missing) and extract it in ~/legato_framework/legato and of course I have cleaned the folder before.
then I do make wp77xx, the execution ends up with an error :
/bin/sh: 1: /opt/swi/y22-ext-wp77xx/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc: not found

so I decide to check the toolchain that I’ve installed previously. I do :

source /opt/swi/y22-ext-wp77xx/environment-setup-armv7a-neon-poky-linux-gnueabi

then I try to execute arm-poky-linux-gnueabi-gcc compiler to compile a hello-world.c file

arm-poky-linux-gnueabi-gcc -o hello-world hello-world.c

The terminal returns:

bash: arm-poky-linux-gnueabi-gcc : command not found

I’ve installed the packages : gcc-arm-linux-gnueabi and gcc-arm-linux-gnueabihf as suggested by my researches on google but nothing have changed

So I have found many errors and maybe they are linked to each other.

Hope you can clarify this more

So after several attempts, the issue is not solved yet but I succeeded into compiling legato tools by using this command :
repo init -u GitHub - legatoproject/manifest: repo manifests for Legato
(I think by not specifying the version of legato it will download the latest one)
After that I built legato with make wp77xx (my version of magnOH)
For the next step, I did : make red_wp77xx in the my mangOH directory but the following error popped up :

echo “Not building LEGATO due to $LEGATO == 0”
Not building LEGATO due to $LEGATO == 0

NOTE: When using leaf, these TOOLCHAIN_X variables don’t need to be passed to mksys.

TOOLCHAIN_DIR=/opt/swi/SWI9X06Y_02.22.12.00/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi-
mksys -t wp77xx --object-dir=build/red_wp77xx --output-dir=build/update_files red.sdef
** ERROR:
/home/insa/mangOH/apps/RedSensorToCloud/redSensorToCloud.adef:30:4: error: Binding to non-existent server app ‘avcService’.
Makefile:109: recipe for target ‘red_wp77xx’ failed
make: *** [red_wp77xx] Error 1

the error still persists even after I followed your suggestions : Make red_wp85, return ERROR - #9 by Alex
Hope you can bring me an anwser

Hi Tutxdo95,

I think you can try this export again
export PATH=/opt/swi/y22-ext-wp77XX/sysroots/x86_64-pokysdk-linux/usr/bin/:$PATH

GJ 2019/07/30

1 Like

Thank you for your answer, I’ve tried to edit the PATH like you said but the terminal returns : “not a valid identifier” .

Anyway, I have found an other solution, I’m using a Virtual Machine and I managed to do all the configurations and installations.

Thank you for your help.

@tuxedo95 I’m getting the same error, can you let me know how you solved it?
/home/insa/mangOH/apps/BatteryService/batteryUtils/Component.cdef:3:13: error: Unexpected subsection name ‘headerDir’ in ‘provides’ section.

For this error I’ve just installed an other version of legato and compiled it before compiling mangOH but on my PC several other errors appeared and as I said, I am using a virtual machine to be able to program apps and transfert them to my mangOH red.

@tuxedo95 Thanks for your reply. I’m using a virtual machine as well per the instructions in this link - https://mangoh.io/setting-up-vm

What VM image did you use?

Ubuntu 18.04 that I had downloaded on the official website of Linux, I don’t have the link but it’s easy with a Google research.

Good luck

@dfrey I’m getting the same error for the red_wp77xx build.
/home/insa/mangOH/apps/BatteryService/batteryUtils/Component.cdef:3:13: error: Unexpected subsection name ‘headerDir’ in ‘provides’ section.

I’m following the instructions as in https://mangoh.io/setting-up-vm. Is the VM image provided in that link supports build for red_wp77xx?

I’m getting the same headerDir issue in json/Component.cdef, and this is based on the MangOH VM, legato 18.09.0 on Ubuntu 18.04. Following the Rev 5 instructions online, for the Windows w/ VM option, command is make red_wp76xx. Getting a bit frustrated with the hoops required just to start building…