Error while "make yellow"

Can anyone please help me with the error below?

:
make[2]: Leaving directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9/platform-specific’
make[2]: Entering directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9/sha2’
test -d /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2 || mkdir -p /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2
cp sha2.h /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2
make[2]: Leaving directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9/sha2’
make[2]: Entering directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9/aes’
test -d /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes || mkdir -p /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes
cp rijndael.h /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes
make[2]: Leaving directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9/aes’
make[2]: Entering directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9/ecc’
test -d /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/ecc || mkdir -p /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/ecc
cp ecc.h test_helper.h /home/spsagar13/myWorkspace/leaf-data/MANGOH-YELLOW-WP76XX/mangOH-yellow-wp76xx-legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/ecc
make[2]: Leaving directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9/ecc’
make[1]: Leaving directory ‘/home/spsagar13/myWorkspace/mangOH/build/yellow_wp76xx/component/f0f8f2fba375cb55ffd69bb62722e0c9’
ninja: build stopped: subcommand failed.
make: *** [Makefile:125: yellow_wp76xx] Error 1

where is the error?
You should paste the full log.

Please find the full log attached.

I was executing the steps given in the link Building the Legato "system" (apps) for mangOH Yellow · mangOH/mangOH Wiki · GitHub

I executed it on my Ubuntu terminal on windows 10 machine.

make_yellow_full_log.txt (88.9 KB)

I still cannot find where is the error…

The make command stopped saying Error1. Do you know from whre I can get the logs?

I don’t know…

You can download the " swi-wp77_4.0.1 " which using the same legato version as mangOH-yellow-wp77xx_0.7.0 , and see if you can build the legato image by “make wp77xx”

my module is WP7611. I believe I am running the steps for the same.

then you should try “swi-wp76_5.0.1” which using the same legato version as mangOH-yellow-wp76xx_0.7.0 and build the legato image by “make wp76xx”

I get the below error while making

-I/home/sasurend/legato_framework/legato/framework/include \
-I/home/sasurend/legato_framework/legato/3rdParty/include

mkPatch.c: In function ‘main’:
mkPatch.c:1412:55: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size between 4045 and 4063 [-Werror=format-truncation=]
1412 | “cat patch.%u.cwe.hdr patch.%u.cwe >%s/patch-%s.cwe”,
| ^~
1413 | pid, pid, CurrentWorkDir, targetPtr );
| ~~~~~~~~~~~~~~
mkPatch.c:1411:9: note: ‘snprintf’ output 45 or more bytes (assuming 4140) into a destination of size 4096
1411 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | “cat patch.%u.cwe.hdr patch.%u.cwe >%s/patch-%s.cwe”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1413 | pid, pid, CurrentWorkDir, targetPtr );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1147:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1147 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^
mkPatch.c:1147:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1147 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1170:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1170 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^
mkPatch.c:1170:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1170 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1223:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1223 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^
mkPatch.c:1223:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1223 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1253:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1253 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^
mkPatch.c:1253:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1253 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1389:60: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size between 4048 and 4066 [-Werror=format-truncation=]
1389 | “cat patch.%u.hdr patch.%u.bin >>%s/patch-%s.cwe”,
| ^~
1390 | pid, pid, CurrentWorkDir, productPtr );
| ~~~~~~~~~~~~~~
mkPatch.c:1388:17: note: ‘snprintf’ output 42 or more bytes (assuming 4137) into a destination of size 4096
1388 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1389 | “cat patch.%u.hdr patch.%u.bin >>%s/patch-%s.cwe”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1390 | pid, pid, CurrentWorkDir, productPtr );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:20:16: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4089 [-Werror=format-truncation=]
20 | #define BSDIFF “bsdiff”
| ^~~~~~~~
mkPatch.c:1298:27: note: in expansion of macro ‘BSDIFF’
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~~~~~
mkPatch.c:1298:36: note: format string is defined here
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~
mkPatch.c:20:16: note: using the range [0, 4294967295] for directive argument
20 | #define BSDIFF “bsdiff”
| ^~~~~~~~
mkPatch.c:1298:27: note: in expansion of macro ‘BSDIFF’
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~~~~~
mkPatch.c:1297:17: note: ‘snprintf’ output between 25 and 8234 bytes into a destination of size 4096
1297 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1299 | OrigName, tmpName, pid, patchNum );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the full log

sasurend@sagar-ubuntu-desktop:~/legato_framework/legato$ make wp76xx
Module: WiFi
********************* VERSION ********************
Legato WiFi version: 18.04.0


Module: Dualsys
make -f Makefile.hostTools
make[1]: Entering directory ‘/home/sasurend/legato_framework/legato’
mkdir -p bin
Using ninja installed at: /usr/bin/ninja
mkdir -p /home/sasurend/legato_framework/legato/build/tools
export TOOLS_ARCH=x86_64 &&
framework/tools/mkTools/ninja-generator
Tools arch: x86_64
ln -sf …/build/tools/mk bin/mk
ln -sf mk bin/mkcomp
ln -sf mk bin/mkexe
ln -sf mk bin/mkapp
ln -sf mk bin/mksys
ln -sf …/framework/tools/scripts/splitdebug …/framework/tools/scripts/instsys …/framework/tools/scripts/settime …/framework/tools/scripts/mkinfo …/framework/tools/scripts/legato-qemu …/framework/tools/scripts/stoplegato …/framework/tools/scripts/cextgenerator.py …/framework/tools/scripts/settz …/framework/tools/scripts/createsdk …/framework/tools/scripts/systoimg …/framework/tools/scripts/instlegato …/framework/tools/scripts/checkpa …/framework/tools/scripts/legato-install …/framework/tools/scripts/update-pack …/framework/tools/scripts/security-pack …/framework/tools/scripts/instapp …/framework/tools/scripts/mklegatoimg …/framework/tools/scripts/app …/framework/tools/scripts/av-pack …/framework/tools/scripts/releaselegato …/framework/tools/scripts/findtoolchain …/framework/tools/scripts/remoteDebug …/framework/tools/scripts/systocwe …/framework/tools/scripts/configlegatoenv …/framework/tools/scripts/update …/framework/tools/scripts/sbhelper …/framework/tools/scripts/configtargetssh …/framework/tools/scripts/legs …/framework/tools/scripts/gettargettype …/framework/tools/scripts/update-util …/framework/tools/scripts/configToolchainDirEnvVars …/framework/tools/scripts/simu …/framework/tools/scripts/fwupdate …/framework/tools/scripts/setname …/framework/tools/scripts/mkdoc …/framework/tools/scripts/startlegato …/framework/tools/scripts/shlib …/framework/tools/scripts/mklegatotreero bin/
ln -sf /home/sasurend/legato_framework/legato/framework/tools/ifgen/ifgen bin/
ln -sf /home/sasurend/legato_framework/legato/3rdParty/ima-support-tools/ima-sign.sh bin/
ln -sf /home/sasurend/legato_framework/legato/3rdParty/ima-support-tools/ima-gen-keys.sh bin/
make -C framework/tools/mkPatch mkPatch
make[2]: Entering directory ‘/home/sasurend/legato_framework/legato/framework/tools/mkPatch’
/usr/bin/gcc -Wall -Werror -o /home/sasurend/legato_framework/legato/bin/mkPatch
mkPatch.c /home/sasurend/legato_framework/legato/framework/liblegato/crc.c
-I/home/sasurend/legato_framework/legato/framework/include
-I/home/sasurend/legato_framework/legato/3rdParty/include
mkPatch.c: In function ‘main’:
mkPatch.c:1412:55: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size between 4045 and 4063 [-Werror=format-truncation=]
1412 | “cat patch.%u.cwe.hdr patch.%u.cwe >%s/patch-%s.cwe”,
| ^~
1413 | pid, pid, CurrentWorkDir, targetPtr );
| ~~~~~~~~~~~~~~
mkPatch.c:1411:9: note: ‘snprintf’ output 45 or more bytes (assuming 4140) into a destination of size 4096
1411 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | “cat patch.%u.cwe.hdr patch.%u.cwe >%s/patch-%s.cwe”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1413 | pid, pid, CurrentWorkDir, targetPtr );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1147:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1147 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^
mkPatch.c:1147:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1147 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1170:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1170 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^
mkPatch.c:1170:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1170 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1223:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1223 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^
mkPatch.c:1223:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1223 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1253:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1253 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^
mkPatch.c:1253:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1253 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1389:60: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size between 4048 and 4066 [-Werror=format-truncation=]
1389 | “cat patch.%u.hdr patch.%u.bin >>%s/patch-%s.cwe”,
| ^~
1390 | pid, pid, CurrentWorkDir, productPtr );
| ~~~~~~~~~~~~~~
mkPatch.c:1388:17: note: ‘snprintf’ output 42 or more bytes (assuming 4137) into a destination of size 4096
1388 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1389 | “cat patch.%u.hdr patch.%u.bin >>%s/patch-%s.cwe”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1390 | pid, pid, CurrentWorkDir, productPtr );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:20:16: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4089 [-Werror=format-truncation=]
20 | #define BSDIFF “bsdiff”
| ^~~~~~~~
mkPatch.c:1298:27: note: in expansion of macro ‘BSDIFF’
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~~~~~
mkPatch.c:1298:36: note: format string is defined here
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~
mkPatch.c:20:16: note: using the range [0, 4294967295] for directive argument
20 | #define BSDIFF “bsdiff”
| ^~~~~~~~
mkPatch.c:1298:27: note: in expansion of macro ‘BSDIFF’
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~~~~~
mkPatch.c:1297:17: note: ‘snprintf’ output between 25 and 8234 bytes into a destination of size 4096
1297 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1299 | OrigName, tmpName, pid, patchNum );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:21: mkPatch] Error 1
make[2]: Leaving directory ‘/home/sasurend/legato_framework/legato/framework/tools/mkPatch’
make[1]: *** [Makefile.hostTools:85: mkPatch] Error 2
make[1]: Leaving directory ‘/home/sasurend/legato_framework/legato’
make: *** [Makefile:266: tools] Error 2

Also,

mkapp command is not working as well

sasurend@sagar-ubuntu-desktop:~/legato_framework/legato/apps/sample/helloWorld$ mkapp -t wp76xx helloWorld.adef
mkapp: command not found

Are you compiling “swi-wp76_5.0.1”?
you need to run mkapp inside “leaf shell”

I was following the steps in the below link, and I got the error.

But now, I created a new workspace based on Get Started - Legato Docs.
I selected swi-wp76_5.0.1 to setup.

I cd’s into the new workspace.
sasurend@sagar-ubuntu-desktop:~/workspace2$ ls
legato legato-af-master legato-af-master.zip letp

sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ make wp76xx
Building Legato for target ‘wp76xx’
Makefile:252: *** Unable to find toolchain for target ‘wp76xx’. Stop.
sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ cd …/legato-af-master/
sasurend@sagar-ubuntu-desktop:~/workspace2/legato-af-master$ make wp76xx
Building Legato for target ‘wp76xx’
Makefile:252: *** Unable to find toolchain for target ‘wp76xx’. Stop.

is the 64 bit toolchain, the one I need to install now?
https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-latest-release-components/#sthash.VTpILqiQ.dpbs

I ultimately want to read one sensor data preferably the temperature sensor, without using octave or any other IoT platform. and for that I am trying to get just the basic helloworld app running.

or Is there a document that I need to follow, step by step, to install, configure etc from scratch and just run one small app?

Did you compile in leaf shell

sasurend@sagar-ubuntu-desktop:~/legato_framework/legato$ leaf shell
Leaf Shell /bin/bash started in Leaf environment.

(lsh) sasurend@sagar-ubuntu-desktop:~/legato_framework/legato$ make wp76xx
Module: WiFi
********************* VERSION ********************
Legato WiFi version: 18.04.0


Module: Dualsys
make -f Makefile.hostTools
make[1]: Entering directory ‘/home/sasurend/legato_framework/legato’
Using ninja installed at: /usr/bin/ninja
ln -sf …/build/tools/mk bin/mk
ln -sf mk bin/mkcomp
ln -sf mk bin/mkexe
ln -sf mk bin/mkapp
ln -sf mk bin/mksys
ln -sf …/framework/tools/scripts/splitdebug …/framework/tools/scripts/instsys …/framework/tools/scripts/settime …/framework/tools/scripts/mkinfo …/framework/tools/scripts/legato-qemu …/framework/tools/scripts/stoplegato …/framework/tools/scripts/cextgenerator.py …/framework/tools/scripts/settz …/framework/tools/scripts/createsdk …/framework/tools/scripts/systoimg …/framework/tools/scripts/instlegato …/framework/tools/scripts/checkpa …/framework/tools/scripts/legato-install …/framework/tools/scripts/update-pack …/framework/tools/scripts/security-pack …/framework/tools/scripts/instapp …/framework/tools/scripts/mklegatoimg …/framework/tools/scripts/app …/framework/tools/scripts/av-pack …/framework/tools/scripts/releaselegato …/framework/tools/scripts/findtoolchain …/framework/tools/scripts/remoteDebug …/framework/tools/scripts/systocwe …/framework/tools/scripts/configlegatoenv …/framework/tools/scripts/update …/framework/tools/scripts/sbhelper …/framework/tools/scripts/configtargetssh …/framework/tools/scripts/legs …/framework/tools/scripts/gettargettype …/framework/tools/scripts/update-util …/framework/tools/scripts/configToolchainDirEnvVars …/framework/tools/scripts/simu …/framework/tools/scripts/fwupdate …/framework/tools/scripts/setname …/framework/tools/scripts/mkdoc …/framework/tools/scripts/startlegato …/framework/tools/scripts/shlib …/framework/tools/scripts/mklegatotreero bin/
ln -sf /home/sasurend/legato_framework/legato/framework/tools/ifgen/ifgen bin/
ln -sf /home/sasurend/legato_framework/legato/3rdParty/ima-support-tools/ima-sign.sh bin/
ln -sf /home/sasurend/legato_framework/legato/3rdParty/ima-support-tools/ima-gen-keys.sh bin/
make -C framework/tools/mkPatch mkPatch
make[2]: Entering directory ‘/home/sasurend/legato_framework/legato/framework/tools/mkPatch’
/usr/bin/gcc -Wall -Werror -o /home/sasurend/legato_framework/legato/bin/mkPatch
mkPatch.c /home/sasurend/legato_framework/legato/framework/liblegato/crc.c
-I/home/sasurend/legato_framework/legato/framework/include
-I/home/sasurend/legato_framework/legato/3rdParty/include
mkPatch.c: In function ‘main’:
mkPatch.c:1412:55: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size between 4045 and 4063 [-Werror=format-truncation=]
1412 | “cat patch.%u.cwe.hdr patch.%u.cwe >%s/patch-%s.cwe”,
| ^~
1413 | pid, pid, CurrentWorkDir, targetPtr );
| ~~~~~~~~~~~~~~
mkPatch.c:1411:9: note: ‘snprintf’ output 45 or more bytes (assuming 4140) into a destination of size 4096
1411 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412 | “cat patch.%u.cwe.hdr patch.%u.cwe >%s/patch-%s.cwe”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1413 | pid, pid, CurrentWorkDir, targetPtr );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1147:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1147 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^
mkPatch.c:1147:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1147 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1170:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1170 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^
mkPatch.c:1170:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1170 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1223:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1223 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^
mkPatch.c:1223:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1223 | snprintf(OrigName, sizeof(OrigName), “%s/%s”, CurrentWorkDir, OrigPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1253:60: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
1253 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^
mkPatch.c:1253:17: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
1253 | snprintf(DestName, sizeof(DestName), “%s/%s”, CurrentWorkDir, DestPtr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:1389:60: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size between 4048 and 4066 [-Werror=format-truncation=]
1389 | “cat patch.%u.hdr patch.%u.bin >>%s/patch-%s.cwe”,
| ^~
1390 | pid, pid, CurrentWorkDir, productPtr );
| ~~~~~~~~~~~~~~
mkPatch.c:1388:17: note: ‘snprintf’ output 42 or more bytes (assuming 4137) into a destination of size 4096
1388 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1389 | “cat patch.%u.hdr patch.%u.bin >>%s/patch-%s.cwe”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1390 | pid, pid, CurrentWorkDir, productPtr );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkPatch.c:20:16: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4089 [-Werror=format-truncation=]
20 | #define BSDIFF “bsdiff”
| ^~~~~~~~
mkPatch.c:1298:27: note: in expansion of macro ‘BSDIFF’
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~~~~~
mkPatch.c:1298:36: note: format string is defined here
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~
mkPatch.c:20:16: note: using the range [0, 4294967295] for directive argument
20 | #define BSDIFF “bsdiff”
| ^~~~~~~~
mkPatch.c:1298:27: note: in expansion of macro ‘BSDIFF’
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ^~~~~~
mkPatch.c:1297:17: note: ‘snprintf’ output between 25 and 8234 bytes into a destination of size 4096
1297 | snprintf( CmdBuf, sizeof(CmdBuf),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1298 | BSDIFF " %s %s patched.%u.bin.%d",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1299 | OrigName, tmpName, pid, patchNum );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:21: mkPatch] Error 1
make[2]: Leaving directory ‘/home/sasurend/legato_framework/legato/framework/tools/mkPatch’
make[1]: *** [Makefile.hostTools:85: mkPatch] Error 2
make[1]: Leaving directory ‘/home/sasurend/legato_framework/legato’
make: *** [Makefile:266: tools] Error 2
(lsh) sasurend@sagar-ubuntu-desktop:~/legato_framework/legato$

(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ make wp76xx
Building Legato for target ‘wp76xx’
Makefile:252: *** Unable to find toolchain for target ‘wp76xx’. Stop.
(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ cd …/legato-af-master/
(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2/legato-af-master$ make wp76xx
Building Legato for target ‘wp76xx’
Makefile:252: *** Unable to find toolchain for target ‘wp76xx’. Stop.
(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2/legato-af-master$

lsh) sasurend@sagar-ubuntu-desktop:~/workspace2/legato-af-master$ leaf status
Not in a workspace, use ‘leaf init’ to create one
(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2/legato-af-master$ cd …
(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2$ leaf init
Workspace initialized /home/sasurend/workspace2
(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2$ leaf status
HINT:
There is no profile yet. You should create a new profile xxx with leaf profile create xxx
(lsh) sasurend@sagar-ubuntu-desktop:~/workspace2$ leaf profile create my_wp7611_1
Current profile is now my_wp7611_1
Profile my_wp7611_1 created
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2$ leaf status
┌───────────────────────────────────────┐
│ Workspace: /home/sasurend/workspace2 │
╞═══════════════════════════════════════╡
│ Profile: my_wp7611_1 [current] (sync) │
└───────────────────────────────────────┘
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2$ leaf status
┌───────────────────────────────────────┐
│ Workspace: /home/sasurend/workspace2 │
╞═══════════════════════════════════════╡
│ Profile: my_wp7611_1 [current] (sync) │
└───────────────────────────────────────┘
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2$ leaf env profile --set MYVAR=1

Exported by profile my_wp7611_1

export LEAF_PROFILE=“my_wp7611_1”;
export MYVAR=“1”;
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2$ ls
leaf-data leaf-workspace.json legato legato-af-master legato-af-master.zip letp
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2$ make wp76xx
make: *** No rule to make target ‘wp76xx’. Stop.
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2$ cd legato
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ make wp76xx
Building Legato for target ‘wp76xx’
Makefile:252: *** Unable to find toolchain for target ‘wp76xx’. Stop.
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ cd …/legato
legato/ legato-af-master/
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ cd …/legato
legato/ legato-af-master/
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2/legato$ cd …/legato-af-master/
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2/legato-af-master$ make wp76xx
Building Legato for target ‘wp76xx’
Makefile:252: *** Unable to find toolchain for target ‘wp76xx’. Stop.
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2/legato-af-master$

I installed the toolchain. and went into the leaf shell, and it again failed. Attaching the full logs.

done
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/doc’
if test -e html ; then mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/share/doc/tinydtls; cp -r html/* /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/share/doc/tinydtls ; fi
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/doc’
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/platform-specific’
:
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/platform-specific’
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/sha2’
test -d /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2 || mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2
cp sha2.h /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/sha2’
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/aes’
test -d /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes || mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes
cp rijndael.h /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/aes’
make[1]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd’
[712/1067] Running external build step
make[1]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/850ab82f8119158933bcda42b41b2d9e’
make[1]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/850ab82f8119158933bcda42b41b2d9e’
[734/1067] Running external build step
make[1]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/cc8c6c29ed75ad42e16bec40acee9bc1’
make[1]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/cc8c6c29ed75ad42e16bec40acee9bc1’
[835/1067] Linking C executable
FAILED: /home/sasurend/workspace2/legato/build/wp76xx/system/app/tools/obj/uartMode/uartMode
/opt/swi/SWI9X07Y_02.37.07.00/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/SWI9X07Y_02.37.07.00/sysroots/armv7a-neon-poky-linux-gnueabi -Wl,–build-id -g -fPIE -pie -o /home/sasurend/workspace2/legato/build/wp76xx/system/app/tools/obj/uartMode/uartMode /home/sasurend/workspace2/legato/build/wp76xx/system/app/tools/obj/uartMode/_main.c.o -rdynamic -Wl,–enable-new-dtags,-rpath="$ORIGIN/…/lib" -L “-L/home/sasurend/workspace2/legato/build/wp76xx/system/component/af045b2d36e80277b5d449aac9a197ef/obj” -lComponent_uartMode -L/home/sasurend/workspace2/legato/platformAdaptor/qmi/bin/wp76xx/components/le_pa_uartMode -lComponent_le_pa_uartMode -L/home/sasurend/workspace2/legato/platformAdaptor/qmi/bin/wp76xx/components/swiQmi -lComponent_swiQmi “-L/home/sasurend/workspace2/legato/build/wp76xx/system/component/2d614d5b8490c2d6fb7fc59578dde825/obj” -lComponent_le_pa_uartMode_default “-L/home/sasurend/workspace2/legato/build/wp76xx/system/component/af045b2d36e80277b5d449aac9a197ef/obj” -lComponent_uartMode -L/home/sasurend/workspace2/legato/platformAdaptor/qmi/bin/wp76xx/components/le_pa_uartMode -lComponent_le_pa_uartMode -L/home/sasurend/workspace2/legato/platformAdaptor/qmi/bin/wp76xx/components/swiQmi -lComponent_swiQmi “-L/home/sasurend/workspace2/legato/build/wp76xx/system/component/2d614d5b8490c2d6fb7fc59578dde825/obj” -lComponent_le_pa_uartMode_default “-L$LEGATO_BUILD/framework/lib” -llegato -lpthread -lrt -ldl -lm -g && splitdebug -d /home/sasurend/workspace2/legato/build/wp76xx/debug /home/sasurend/workspace2/legato/build/wp76xx/system/app/tools/obj/uartMode/uartMode
/home/sasurend/workspace2/legato/platformAdaptor/qmi/bin/wp76xx/components/swiQmi/libComponent_swiQmi.so: undefined reference to `fcntl@GLIBC_2.28’
collect2: error: ld returned 1 exit status
[844/1067] Compiling C source
ninja: build stopped: subcommand failed.
make: *** [Makefile:560: system] Error 1
(lsh:my_wp7611_1) sasurend@sagar-ubuntu-desktop:~/workspace2/legato$

makelogs.txt (144.0 KB)

I ran it again, and got this different error.

make -C doc
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/doc’
: Doxyfile >./doxygen.out 2>&1
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/doc’
test -d /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/lib || mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/lib
test -d /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls || mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls
cp libtinydtls.a /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/lib/
cp dtls.h hmac.h dtls_debug.h dtls_config.h uthash.h numeric.h crypto.h global.h ccm.h netq.h alert.h utlist.h prng.h peer.h state.h dtls_time.h session.h tinydtls.h /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/
for dir in doc platform-specific sha2 aes; do
make -C $dir install=“cp” includedir=/home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls install;
done
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/doc’
if test -e html ; then mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/share/doc/tinydtls; cp -r html/* /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/share/doc/tinydtls ; fi
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/doc’
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/platform-specific’
:
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/platform-specific’
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/sha2’
test -d /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2 || mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2
cp sha2.h /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/sha2
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/sha2’
make[2]: Entering directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/aes’
test -d /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes || mkdir -p /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes
cp rijndael.h /home/sasurend/workspace2/legato/build/wp76xx/3rdParty/tinydtls/include/tinydtls/aes
make[2]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd/aes’
make[1]: Leaving directory ‘/home/sasurend/workspace2/legato/build/wp76xx/system/component/2ddf11a8df8158ec8b1a11296a50a2fd’
ninja: build stopped: subcommand failed.
make: *** [Makefile:560: system] Error 1
makelogs2.txt (61.7 KB)

I don’t see problem to build legato image with swi-wp76_4.7.0 (legato 20.04) on ubuntu 18 and swi-wp76_5.0.0 (legato 19.11.2) on ubuntu 14.

“legato.cwe” can be built after “make clean” and “make wp76xx”

You might give a try on that.