Compile lg2 free of warnings on linux