The new version Ubuntu 18.04 LTS is released recently, and includes many recent versions that causes compilation errors in the "toolchain", here is the solution that worked at home.
You will find the patch files to add in your sources of LibreELEC : MEGA
Then, it is necessary to put GCC 6 by default, here is the procedure :
Code
sudo apt update
sudo apt install gcc-6 g++-6
sudo update-alternatives --install "/usr/bin/gcc" "gcc" "/usr/bin/gcc-6" 60 --slave "/usr/bin/g++" "g++" "/usr/bin/g++-6"
sudo update-alternatives --config gcc
gcc --version
g++ --version
If you follow these few patches, you can compile your project under Ubuntu 18.04 LTS !