diff --git a/internal/integrationtest/compile_3/compile_test.go b/internal/integrationtest/compile_3/compile_test.go
index 8e6aa34296e..2df3d59f40d 100644
--- a/internal/integrationtest/compile_3/compile_test.go
+++ b/internal/integrationtest/compile_3/compile_test.go
@@ -107,15 +107,32 @@ func TestCompilerErrOutput(t *testing.T) {
 	_, _, err := cli.Run("core", "install", "arduino:avr@1.8.5")
 	require.NoError(t, err)
 
-	// prepare sketch
-	sketch, err := paths.New("testdata", "blink_with_wrong_cpp").Abs()
-	require.NoError(t, err)
+	{
+		// prepare sketch
+		sketch, err := paths.New("testdata", "blink_with_wrong_cpp").Abs()
+		require.NoError(t, err)
+
+		// Run compile and catch err stream
+		out, _, err := cli.Run("compile", "-b", "arduino:avr:uno", "--format", "json", sketch.String())
+		require.Error(t, err)
+		compilerErr := requirejson.Parse(t, out).Query(".compiler_err")
+		compilerErr.MustContain(`"error"`)
+	}
 
-	// Run compile and catch err stream
-	out, _, err := cli.Run("compile", "-b", "arduino:avr:uno", "--format", "json", sketch.String())
-	require.Error(t, err)
-	compilerErr := requirejson.Parse(t, out).Query(".compiler_err")
-	compilerErr.MustContain(`"error"`)
+	// Check that library discover do not generate false errors
+	// https://github.com/arduino/arduino-cli/issues/2263
+	{
+		// prepare sketch
+		sketch, err := paths.New("testdata", "using_Wire").Abs()
+		require.NoError(t, err)
+
+		// Run compile and catch err stream
+		out, _, err := cli.Run("compile", "-b", "arduino:avr:uno", "-v", "--format", "json", sketch.String())
+		require.NoError(t, err)
+		jsonOut := requirejson.Parse(t, out)
+		jsonOut.Query(".compiler_out").MustNotContain(`"fatal error"`)
+		jsonOut.Query(".compiler_err").MustNotContain(`"fatal error"`)
+	}
 }
 
 func TestCompileRelativeLibraryPath(t *testing.T) {
diff --git a/internal/integrationtest/compile_3/testdata/using_Wire/using_Wire.ino b/internal/integrationtest/compile_3/testdata/using_Wire/using_Wire.ino
new file mode 100644
index 00000000000..2ce144c2f7b
--- /dev/null
+++ b/internal/integrationtest/compile_3/testdata/using_Wire/using_Wire.ino
@@ -0,0 +1,4 @@
+#include <Wire.h>
+
+void setup() {}
+void loop() {}
diff --git a/legacy/builder/container_find_includes.go b/legacy/builder/container_find_includes.go
index 74cc562dde7..69bf06dc9ac 100644
--- a/legacy/builder/container_find_includes.go
+++ b/legacy/builder/container_find_includes.go
@@ -374,7 +374,6 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
 			preprocStdout, preprocStderr, preprocErr = preprocessor.GCC(sourcePath, targetFilePath, includeFolders, ctx.BuildProperties)
 			if ctx.Verbose {
 				ctx.WriteStdout(preprocStdout)
-				ctx.WriteStdout(preprocStderr)
 			}
 			// Unwrap error and see if it is an ExitError.
 			_, isExitErr := errors.Cause(preprocErr).(*exec.ExitError)