On Mon, 23 Sept 2024 at 19:54, David Malcolm <dmalc...@redhat.com> wrote:
>
> On Mon, 2024-09-23 at 15:18 +0200, Christophe Lyon wrote:
> > Hi David,
> >
> > On Sun, 22 Sept 2024 at 00:39, David Malcolm <dmalc...@redhat.com>
> > wrote:
> > >
> > > On Sat, 2024-09-21 at 04:30 +0000, ci_not...@linaro.org wrote:
> > > > Dear contributor, our automatic CI has detected problems related
> > > > to
> > > > your patch(es).  Please find some details below.  If you have any
> > > > questions, please follow up on
> > > > linaro-toolchain@lists.linaro.org mailing list, Libera's #linaro-
> > > > tcwg
> > > > channel, or ping your favourite Linaro toolchain developer on the
> > > > usual project channel.
> > > >
> > > > We understand that it might be difficult to find the necessary
> > > > logs
> > > > or reproduce the issue locally. If you can't get what you need
> > > > from
> > > > our CI within minutes, let us know and we will be happy to help.
> > > >
> > > > In gcc_build master-aarch64 after:
> > > >
> > > >   | gcc patch https://patchwork.sourceware.org/patch/97787
> > > >   | Author: David Malcolm <dmalc...@redhat.com>
> > > >   | Date:   Fri Sep 20 19:05:46 2024 -0400
> > > >   |
> > > >   |     diagnostics: convert text hooks to use
> > > > diagnostic_text_output_format [PR116613]
> > > >   |
> > > >   |     The diagnostic_starter and diagnostic_finalizer callbacks
> > > > and
> > > > most of
> > > >   |     their support subroutines are only used by the "text"
> > > > output
> > > > format.
> > > >   |
> > > >   |     Emphasize this and reduce the binding with
> > > > diagnostic_context
> > > >   |     by renaming the callbacks to add "_text" in their names,
> > > > and
> > > > converting
> > > >   | ... 264 lines of the commit log omitted.
> > > >   | ... applied on top of baseline commit:
> > > >   | 2484ba167e1c libstdc++: fix C header include guards
> > > >
> > > > Results changed to
> > > > # reset_artifacts:
> > > > -10
> > > > # true:
> > > > 0
> > > > # build_abe gcc:
> > > > # FAILED
> > > > # First few build errors in logs:
> > > > # 00:06:02 /home/tcwg-
> > > > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/diagn
> > > > osti
> > > > c-format-sarif.cc:3130:8: error: ‘void
> > > > sarif_output_format::after_diagnostic(const diagnostic_info&)’
> > > > cannot
> > > > be overloaded with ‘void
> > > > sarif_output_format::after_diagnostic(const
> > > > diagnostic_info&)’
> > > > # 00:06:03 make[2]: *** [Makefile:1195: diagnostic-format-
> > > > sarif.o]
> > > > Error 1
> > > > # 00:06:03 make[1]: *** [Makefile:4701: all-gcc] Error 2
> > > > # 00:06:03 make: *** [Makefile:1062: all] Error 2
> > >
> > > This works for me, and I've been staring at the code and can't see
> > > the
> > > issue.  Any ideas what the problem is?
> > >
> >
> > From the logs, I could extract slightly better error messages:
> > g++  -fno-PIE -c   -g -O2     -DIN_GCC    -fno-exceptions -fno-rtti
> > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
> > -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported
> > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
> > -Wno-overlength-strings  -DHAVE_CONFIG_H -fno-PIE -I. -I.
> > -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc
> > -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/.
> > -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/../includ
> > e
> >  -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/../libcpp
> > /include
> > -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/../libcod
> > y
> > -I/home/tcwg-build/workspace/tcwg_gnu_4/abe/builds/destdir/aarch64-
> > unknown-linux-gnu/include
> > -I/home/tcwg-build/workspace/tcwg_gnu_4/abe/builds/destdir/aarch64-
> > unknown-linux-gnu/include
> > -I/home/tcwg-build/workspace/tcwg_gnu_4/abe/builds/destdir/aarch64-
> > unknown-linux-gnu/include
> >  -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/../libdec
> > number
> > -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/../libdec
> > number/bid
> > -I../libdecnumber
> > -I/home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/../libbac
> > ktrace
> >   -o diagnostic-format-sarif.o -MT diagnostic-format-sarif.o -MMD -MP
> > -MF ./.deps/diagnostic-format-sarif.TPo
> > /home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/diagnosti
> > c-format-sarif.cc
> > /home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/diagnosti
> > c-format-sarif.cc:3130:8:
> > error: ‘void sarif_output_format::after_diagnostic(const
> > diagnostic_info&)’ cannot be overloaded with ‘void
> > sarif_output_format::after_diagnostic(const diagnostic_info&)’
> > 3130 |   void after_diagnostic (const diagnostic_info &) final
> > override
> >          |        ^~~~~~~~~~~~~~~~
> > /home/tcwg-
> > build/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/gcc/diagnosti
> > c-format-sarif.cc:3126:8:
> > note: previous declaration ‘void
> > sarif_output_format::after_diagnostic(const diagnostic_info&)’
> > 3126 |   void after_diagnostic (const diagnostic_info &) final
> > override
> >          |        ^~~~~~~~~~~~~~~~
> > make[2]: *** [Makefile:1195: diagnostic-format-sarif.o] Error 1
>
> Thanks for the info.
>
>
> Looking at the above, it appears that *both* lines 3126 and 3130 of
> diagnostic-format-sarif.cc read:
>
>   void after_diagnostic (const diagnostic_info &) final override
>
> which suggests that somehow there's a duplicate copy of that function.
>
> But looking at git, I see just one copy:
>
> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/diagnostic-format-sarif.cc;h=6cd18cef6c8906cc302f86694b4b4ad097f836a3;hb=HEAD#l3126
>
> which is at line 3126, and looking at the history of the file in git I
> don't see any duplication.
>
> Is there a chance that the CI machinery has somehow managed to apply
> the patch twice, or by some other means somehow get a duplicate copy of
> that function?
>
> I see the patch in patchwork:
>
> https://patchwork.sourceware.org/project/gcc/patch/20240920230546.1850339-1-dmalc...@redhat.com/
>
> based on what I posted to the mailing list has this hunk:
>
> diff --git a/gcc/diagnostic-format-sarif.cc b/gcc/diagnostic-format-sarif.cc
> index 33d60a680beb..eda67a6f6583 100644
> --- a/gcc/diagnostic-format-sarif.cc
> +++ b/gcc/diagnostic-format-sarif.cc
> @@ -3139,6 +3139,10 @@  public:
>    {
>      m_builder.emit_diagram (m_context, diagram);
>    }
> +  void after_diagnostic (const diagnostic_info &) final override
> +  {
> +    /* No-op.  */
> +  }
>
>    sarif_builder &get_builder () { return m_builder; }
>
> so is there a chance that that addition got applied to the patched copy
> in git, leading to two copies???
>
> Sorry if I'm missing something here.
>

Indeed there seems to be a problem when applying the patch :-(

The log says:
Applying: diagnostics: convert text hooks to use
diagnostic_text_output_format [PR116613]
Using index info to reconstruct a base tree...
M gcc/c-family/c-opts.cc
M gcc/coretypes.h
M gcc/cp/cp-tree.h
M gcc/cp/error.cc
M gcc/diagnostic-format-json.cc
M gcc/diagnostic-format-sarif.cc
M gcc/diagnostic-format-text.cc
M gcc/diagnostic-format-text.h
M gcc/diagnostic-format.h
M gcc/diagnostic-macro-unwinding.cc
M gcc/diagnostic-macro-unwinding.h
M gcc/diagnostic-path.cc
M gcc/diagnostic.cc
M gcc/diagnostic.h
M gcc/fortran/error.cc
M gcc/jit/dummy-frontend.cc
M gcc/langhooks-def.h
M gcc/langhooks.cc
M gcc/langhooks.h
M gcc/rust/resolve/rust-ast-resolve-expr.cc
M gcc/testsuite/g++.dg/plugin/show_template_tree_color_plugin.c
M gcc/testsuite/gcc.dg/plugin/diagnostic_group_plugin.c
M gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
M gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.c
M gcc/tree-diagnostic.cc
M libcc1/context.cc
Falling back to patching base and 3-way merge...
Auto-merging gcc/diagnostic.h
Auto-merging gcc/diagnostic-format-sarif.cc
Auto-merging gcc/cp/cp-tree.h
Auto-merging gcc/c-family/c-opts.cc

This was on top of 34366176046351250e1beb578664d926fbdd50c9, however
looking at the resulting tree,
the commit has the right commit message, but the only change is:
diff --git a/gcc/diagnostic-format-sarif.cc b/gcc/diagnostic-format-sarif.cc
index 6cd18cef6c8..4477932c61e 100644
--- a/gcc/diagnostic-format-sarif.cc
+++ b/gcc/diagnostic-format-sarif.cc
@@ -3127,6 +3127,10 @@ public:
   {
     /* No-op.  */
   }
+  void after_diagnostic (const diagnostic_info &) final override
+  {
+    /* No-op.  */
+  }

   sarif_builder &get_builder () { return m_builder; }

which does explain the build error.

Now.... we need to investigate why there's a problem when applying your patch!

Thanks and sorry for the noise

Christophe

> Thanks
> Dave
>
_______________________________________________
linaro-toolchain mailing list -- linaro-toolchain@lists.linaro.org
To unsubscribe send an email to linaro-toolchain-le...@lists.linaro.org

Reply via email to