Fix compilation and error reporting on Linux platform