Hiya,
Just a quick heads up if you’re trying to build legato 16.10.1.m3 for the FX30.
I had a number of build errors appear when trying to build … along the lines of:
/home/developer/legato-16.10.1/framework/tools/mkTools/parser/apiParser.h:27:10: error: ‘std::function’ has not been declared
std::function<void (std::string&&)> handlerFunc ///< Function to call with dependencies.
^~~~~~~~
while trying to build the build tools.
After a lot of bad words, I realised that sometime since I had previously built 16.10.1 I had updated the host gcc to version 7.3.0 from version 5.4.0 (which appears to be the default in Ubuntu 16.04 LTS).
So … there is a fix to get 16.10.1.m3 to build with the later version of gcc:
-
change to the directory where you unpacked the 16.10.1.m3 source (I’ll refer to it here as
~/legato-16.10.1.m3
-
open
~/legato-16.10.1.m3/framework/tools/mkTools/ninja-generator
in your favourite text editor -
Go to line 35 and change the compiler flags from
COMPILER="g++ -std=c++0x"
to
COMPILER="g++ -std=c++11"
-
Save and close
ninja-generator
-
open
~/legato-16.10.1.m3/framework/tools/mkTools/mkTools.h
in your favourite text editor -
go to line 29 and insert the line:
#include <functional>
-
save and close
mkTools.h
-
change to the top of the legato build directory (
cd ~/legato-16.10.1.m3
) -
run
make wp85
The legato framework should now build correctly.
Seems to work for me … hopefully it works for others too.
ciao, Dave