Hi, I am trying to build legato that comes with the above package i.e. SDK for FX30-3G (Release R17.0.1.007 + Legato 18.06.5)
I downloaded it with leaf, I am in a leaf shell, and make clean does not make a difference
I get the truncation error e.g.
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 );
| ~~~~~~~~~~~~~
gcc -version → gcc (Ubuntu 9.5.0-1ubuntu1~22.04) 9.5.0
make --version → GNU Make 4.3
Have I got something wrong. Why does it not build…
I am able to build swi-fx30-catm.xxx and swi-fx30-cat1.xxx fine in this environment.
Based on this it seems an issue in legato that was adapted in later versions… for gcc >= 8.xx. I’ve adapted the makefile for the 3g’s legato 18.xxx to include this adjustment for the warnings…
I can now build mkPatch without any other changes…
Ok… but there are more issues… I am not inclinded to change the source file if at all possible… The problem is because of different versions of gcc/g++… so the easiest solution here is to just compile in the original version of gcc/g++ which is 7.
So install gcc7 and g++7 add to update-alternatives… then select v7 as the current version