<div dir="ltr">Thanks for your reply, Jed.<div><br></div><div><br></div><div>Barry, do you have any comment?</div><div><br></div><div>Fande,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 20, 2020 at 9:19 AM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Barry, this is a side-effect of your Swift experiment. Does that need to be in a header (even if it's a private header)?<br>
<br>
The issue may be that you test with a C compiler and it gets included in C++ source.<br>
<br>
Fande Kong <<a href="mailto:fdkong.jd@gmail.com" target="_blank">fdkong.jd@gmail.com</a>> writes:<br>
<br>
> Hi All,<br>
><br>
> We (moose team) hit an error message when compiling PETSc, recently. The<br>
> error is related to "PETSC_HAVE_CLOSURE." Everything runs well if I am<br>
> going to turn this flag off by making the following changes:<br>
><br>
><br>
> git diff<br>
> diff --git a/config/BuildSystem/config/utilities/closure.py<br>
> b/config/BuildSystem/config/utilities/closure.py<br>
> index 6341ddf271..930e5b3b1b 100644<br>
> --- a/config/BuildSystem/config/utilities/closure.py<br>
> +++ b/config/BuildSystem/config/utilities/closure.py<br>
> @@ -19,8 +19,8 @@ class Configure(config.base.Configure):<br>
> includes = '#include <stdio.h>\n'<br>
> body = 'int (^closure)(int);'<br>
> self.pushLanguage('C')<br>
> - if self.checkLink(includes, body):<br>
> - self.addDefine('HAVE_CLOSURE','1')<br>
> +# if self.checkLink(includes, body):<br>
> +# self.addDefine('HAVE_CLOSURE','1')<br>
> def configure(self):<br>
> self.executeTest(self.configureClosure)<br>
><br>
><br>
> I was wondering if there exists a configuration option to disable "Closure"<br>
> C syntax? I did not find one by running "configuration --help"<br>
><br>
> Please let me know if you need more information.<br>
><br>
><br>
> Thanks,<br>
><br>
> Fande,<br>
><br>
><br>
> In file included from<br>
> /Users/milljm/projects/moose/scripts/../libmesh/src/solvers/petscdmlibmesh.C:25:<br>
> /Users/milljm/projects/moose/petsc/include/petsc/private/petscimpl.h:15:29:<br>
> warning: 'PetscVFPrintfSetClosure' initialized and declared 'extern'<br>
> 15 | PETSC_EXTERN PetscErrorCode PetscVFPrintfSetClosure(int (^)(const<br>
> char*));<br>
> | ^~~~~~~~~~~~~~~~~~~~~~~<br>
> /Users/milljm/projects/moose/petsc/include/petsc/private/petscimpl.h:15:53:<br>
> error: expected primary-expression before 'int'<br>
> 15 | PETSC_EXTERN PetscErrorCode PetscVFPrintfSetClosure(int (^)(const<br>
> char*));<br>
> | ^~~<br>
> CXX src/systems/libmesh_opt_la-equation_systems_io.lo<br>
> In file included from<br>
> /Users/milljm/projects/moose/petsc/include/petsc/private/dmimpl.h:7,<br>
> from<br>
> /Users/milljm/projects/moose/scripts/../libmesh/src/solvers/petscdmlibmeshimpl.C:26:<br>
> /Users/milljm/projects/moose/petsc/include/petsc/private/petscimpl.h:15:29:<br>
> warning: 'PetscVFPrintfSetClosure' initialized and declared 'extern'<br>
> 15 | PETSC_EXTERN PetscErrorCode PetscVFPrintfSetClosure(int (^)(const<br>
> char*));<br>
> | ^~~~~~~~~~~~~~~~~~~~~~~<br>
> /Users/milljm/projects/moose/petsc/include/petsc/private/petscimpl.h:15:53:<br>
> error: expected primary-expression before 'int'<br>
> 15 | PETSC_EXTERN PetscErrorCode PetscVFPrintfSetClosure(int (^)(const<br>
> char*));<br>
</blockquote></div>