<div dir="ltr">No, it doesn't. It has the same problem. I just `make clean` and the `make`. Do I need to reconfigure?<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Best wishes,<div>Zongze</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 18 Apr 2023 at 21:09, Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Does this change work?<br>
<br>
diff --git a/include/petsc/private/vecimpl.h b/include/petsc/private/vecimpl.h<br>
index dd75dbbc00b..168540b546e 100644<br>
--- a/include/petsc/private/vecimpl.h<br>
+++ b/include/petsc/private/vecimpl.h<br>
@@ -110,7 +110,7 @@ struct _VecOps {<br>
PetscErrorCode (*setvaluescoo)(Vec, const PetscScalar[], InsertMode);<br>
};<br>
<br>
-#if defined(offsetof) && (defined(__cplusplus) || (PETSC_C_VERSION >= 11))<br>
+#if defined(offsetof) && (defined(__cplusplus) || (PETSC_C_VERSION >= 17))<br>
#if (PETSC_C_VERSION >= 11) && (PETSC_C_VERSION < 23)<br>
// static_assert() is a keyword since C23, before that defined as macro in assert.h<br>
#include <assert.h><br>
<br>
<br>
Satish<br>
<br>
On Tue, 18 Apr 2023, Zongze Yang wrote:<br>
<br>
> Hi, I am building petsc using gcc@9.5.0, and found the following error:<br>
> <br>
> ```<br>
> In file included from /usr/include/alloca.h:25,<br>
> from /usr/include/stdlib.h:497,<br>
> from<br>
> /home/lrtfm/opt/firedrake/complex-int32/petsc/include/petscsys.h:1395,<br>
> from<br>
> /home/lrtfm/opt/firedrake/complex-int32/petsc/include/petscsf.h:7,<br>
> from<br>
> /home/lrtfm/opt/firedrake/complex-int32/petsc/src/vec/is/sf/interface/vscat.c:1:<br>
> /home/lrtfm/opt/firedrake/complex-int32/petsc/include/petsc/private/vecimpl.h:124:15:<br>
> error: expected declaration specifiers or '...' before '__builtin_offsetof'<br>
> 124 | static_assert(offsetof(struct _VecOps, loadnative) == sizeof(void<br>
> (*)(void)) * VECOP_LOADNATIVE, "");<br>
> | ^~~~~~~~<br>
> In file included from<br>
> /home/lrtfm/opt/firedrake/complex-int32/petsc/src/vec/is/sf/interface/vscat.c:7:<br>
> /home/lrtfm/opt/firedrake/complex-int32/petsc/include/petsc/private/vecimpl.h:124:98:<br>
> error: expected declaration specifiers or '...' before string constant<br>
> 124 | static_assert(offsetof(struct _VecOps, loadnative) == sizeof(void<br>
> (*)(void)) * VECOP_LOADNATIVE, "");<br>
> |<br>
> ^~<br>
> ```<br>
> <br>
> Could someone give me some hints to fix it? The configure.log and make.log<br>
> are attached.<br>
> <br>
> <br>
> Best wishes,<br>
> Zongze<br>
> <br>
<br>
</blockquote></div>