diff --git a/legacy/builder/print_used_and_not_used_libraries.go b/legacy/builder/print_used_and_not_used_libraries.go index 81ab07ee095..d4922355b43 100644 --- a/legacy/builder/print_used_and_not_used_libraries.go +++ b/legacy/builder/print_used_and_not_used_libraries.go @@ -58,6 +58,9 @@ func (s *PrintUsedAndNotUsedLibraries) Run(ctx *types.Context) error { libraryResolutionResults := ctx.LibrariesResolutionResults for header, libResResult := range libraryResolutionResults { + if len(libResResult.NotUsedLibraries) == 0 { + continue + } logger.Fprintln(os.Stdout, logLevel, constants.MSG_LIBRARIES_MULTIPLE_LIBS_FOUND_FOR, header) logger.Fprintln(os.Stdout, logLevel, constants.MSG_LIBRARIES_USED, libResResult.Library.InstallDir) for _, notUsedLibrary := range libResResult.NotUsedLibraries {