I’m having problems generating an image file for an FX30s after the Python3 was updated.
First it was an error to the Python3 path, then the print command required parentheses. I corrected both of these, but now getting the following error, which I can’t figure out the problem:
(lsh:SWI-FX30-CATM) eddie@Q87CRM:~/Workspace$ systoimg wp77xx AdvantorCell.wp77xx.update
Warning: output directory is not provided. Using ‘/home/eddie/Workspace’ as output directory.
Removing old content of /home/eddie/Workspace/_staging_AdvantorCell.wp77xx.update
Unpacking AdvantorCell.wp77xx.update …
Traceback (most recent call last):
File “/home/eddie/Workspace/leaf-data/SWI-FX30-CATM/fx30-catm-legato/bin/update-util”, line 346, in
ProcessHeaders(args)
File “/home/eddie/Workspace/leaf-data/SWI-FX30-CATM/fx30-catm-legato/bin/update-util”, line 317, in ProcessHeaders
oldChunkList = ReadUpdateFile(OldUpdateFile)
File “/home/eddie/Workspace/leaf-data/SWI-FX30-CATM/fx30-catm-legato/bin/update-util”, line 185, in ReadUpdateFile
chunk = ReadChunk(bufferedStream)
File “/home/eddie/Workspace/leaf-data/SWI-FX30-CATM/fx30-catm-legato/bin/update-util”, line 172, in ReadChunk
jsonObj = json.loads(inStr)
File “/usr/lib/python3.10/json/init.py”, line 346, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.10/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.10/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
***ERROR: Failed to unpack AdvantorCell.wp77xx.update
Try ‘systoimg --help’ for usage instructions.
(lsh:SWI-FX30-CATM) eddie@Q87CRM:~/Workspace$
I changed the folder as suggested and ran the “make wp77xx” command. It compiled but returned 2 errors.
(lsh:FX30S-15-1) eddie@Q87CRM:~/Workspace/leaf-data/current/fx30-catm-legato$ make wp77xx
Building Legato for target ‘wp77xx’
modules/WiFi/moduleDefs:12: Legato WiFi version is undefined…
KSET build/wp77xx/.config - TARGET_WP77XX
KCONFIG build/wp77xx/.config
GEN build/wp77xx/.config.mk
Building Legato for target ‘wp77xx’
modules/WiFi/moduleDefs:12: Legato WiFi version is undefined…
GEN version
GEN build/wp77xx/framework/include/le_config.h
MAKE tools
make[1]: Entering directory ‘/home/eddie/.leaf/fx30-catm-legato_21.05.0’
Using ninja installed at: /usr/bin/ninja
GEN /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/build.ninja
Tools arch: x86_64
MAKE mkPatch
make[2]: Entering directory ‘/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkPatch’
make[2]: ‘/home/eddie/.leaf/fx30-catm-legato_21.05.0/bin/mkPatch’ is up to date.
make[2]: Leaving directory ‘/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkPatch’
NINJA /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/build.ninja
[77/87] Compiling tool source
FAILED: /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/obj/mkTools/codeGenerator/exeMainGenerator.cpp.o
g++ -std=c++0x -MMD -MF /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/obj/mkTools/codeGenerator/exeMainGenerator.cpp.o.d -g -Wall -Werror -Wno-unused-command-line-argument -Wno-deprecated -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/precompiled/ -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/defTools -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/liblegato -c /home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/codeGenerator/exeMainGenerator.cpp -o /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/obj/mkTools/codeGenerator/exeMainGenerator.cpp.o
/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/codeGenerator/exeMainGenerator.cpp: In function ‘void code::GenerateCLangExeMain(const model::Exe_t*, const mk::BuildParams_t&)’:
/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/codeGenerator/exeMainGenerator.cpp:171:25: error: loop variable ‘fileSystemObjectPtr’ creates a copy from type ‘const std::shared_ptrmodel::FileSystemObject_t’ [-Werror=range-loop-construct]
171 | for (const auto fileSystemObjectPtr : componentPtr->bundledFiles)
| ^~~~~~~~~~~~~~~~~~~
/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/codeGenerator/exeMainGenerator.cpp:171:25: note: use reference type to prevent copying
171 | for (const auto fileSystemObjectPtr : componentPtr->bundledFiles)
| ^~~~~~~~~~~~~~~~~~~
| &
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
[86/87] Compiling tool source
FAILED: /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/obj/mkTools/configGenerator/configGenerator.cpp.o
g++ -std=c++0x -MMD -MF /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/obj/mkTools/configGenerator/configGenerator.cpp.o.d -g -Wall -Werror -Wno-unused-command-line-argument -Wno-deprecated -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/precompiled/ -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/defTools -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools -I/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/liblegato -c /home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/configGenerator/configGenerator.cpp -o /home/eddie/.leaf/fx30-catm-legato_21.05.0/build/tools/obj/mkTools/configGenerator/configGenerator.cpp.o
/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/configGenerator/configGenerator.cpp: In function ‘void config::GenerateBindingsConfig(std::ofstream&, model::App_t*, const mk::BuildParams_t&)’:
/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/configGenerator/configGenerator.cpp:783:21: error: loop variable ‘mapItem’ creates a copy from type ‘const std::pair<const std::__cxx11::basic_string, model::Exe_t*>’ [-Werror=range-loop-construct]
783 | for (const auto mapItem : appPtr->executables)
| ^~~~~~~
/home/eddie/.leaf/fx30-catm-legato_21.05.0/framework/tools/mkTools/configGenerator/configGenerator.cpp:783:21: note: use reference type to prevent copying
783 | for (const auto mapItem : appPtr->executables)
| ^~~~~~~
| &
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile.hostTools:42: tools] Error 1
make[1]: Leaving directory ‘/home/eddie/.leaf/fx30-catm-legato_21.05.0’
make: *** [Makefile:459: tools] Error 2
(lsh:FX30S-15-1) eddie@Q87CRM:~/Workspace/leaf-data/current/fx30-catm-legato$((l(lsh(lsh:FX(lsh:FX30S-1(lsh:FX30S-15-(lsh:FX30S-15-1) e(lsh:FX30S-15(lsh:FX30S-(lsh:FX30S-(lsh:FX30(ls((l(ls(ls(lsh:F(lsh:(lsh:(ls(lsh:FX30(ls(ls(l(lsh:(l((lsh:(ls(l(lsh(lsh:F(lsh((lsh(l(lsh:F(lsh:F(l((ls(ls(l((ls(lsh:FX30S-(l(lsh:(lsh:(lsh(lsh(l(l(l(ls(l(lsh:(ls(l(ls(l(ls(l(l(lsh:(((l((ls((ls(ls((ls(l(l(lsh(l(ls((((((((lsh:FX30S-15-1) eddie@Q87CRM:~/Workspace/leaf-data/current/fx30-catm-legato$
I just tried to compile the legato image of swi-wp76_6.0.0 which is using legato 21.05, no problem is found for “make wp76xx”.
I wonder if the GCC version of your enviroment makes the problem.
It should be fine to make the legato image in Ubuntu 16 or Ubuntu 18.
(lsh:WP76_stable) owner@CNHKG-EX-001367:~/LEAF/WP76/leaf-data/WP76_stable/wp76-legato$ ls -l ./build/wp76xx/legato.cwe
lrwxrwxrwx 1 owner owner 23 Oct 11 22:45 ./build/wp76xx/legato.cwe -> legato-squashfs.ubi.cwe
(lsh:WP76_stable) owner@CNHKG-EX-001367:~/LEAF/WP76/leaf-data/WP76_stable/wp76-legato$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(lsh:WP76_stable) owner@CNHKG-EX-001367:~/LEAF/WP76/leaf-data/WP76_stable/wp76-legato$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial