installation on ubuntu - flex version
OpenFOAM is checking for older version of flex then installed by default in Ubuntu. Ubuntu 16.04 is using flex version 2.6.0-11
There is a solution https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-3.0.1/Ubuntu Step 10.
We should either add this step to the build guide: http://openfoam.com/code/build-guide.php or suggest users to install flex-old package with version 2.5.4
Or do the changes in the source code for successful compilation.