[petsc-users] ``--with-clanguage=c++" turns on "PETSC_HAVE_COMPLEX"?

Fande Kong fdkong.jd at gmail.com
Fri May 3 20:00:36 CDT 2019


Hi All,

Comping PETSc with ``--with-clanguage=c"  works fine. But I could not
compile PETSc with "--with-clanguage=c++" since the flag
"PETSC_HAVE_COMPLEX" was wrongly set on by this option.

*/Users/kongf/projects/petsc/src/sys/objects/pinit.c:913:21: error:
expected parameter declarator*
*    PetscComplex ic(0.0,1.0);*
*                    ^*
*/Users/kongf/projects/petsc/src/sys/objects/pinit.c:913:21: error:
expected ')'*
*/Users/kongf/projects/petsc/src/sys/objects/pinit.c:913:20: note: to match
this '('*
*    PetscComplex ic(0.0,1.0);*
*                   ^*
*/Users/kongf/projects/petsc/src/sys/objects/pinit.c:914:13: error:
assigning to 'PetscComplex' (aka '_Complex double') from incompatible type
'PetscComplex ()' (aka '_Complex double ()')*
*    PETSC_i = ic;*
*            ^ ~~*
*3 errors generated.*
*make[2]: *** [arch-linux2-c-opt-memory/obj/sys/objects/pinit.o] Error 1*
*make[2]: *** Waiting for unfinished jobs....*
*make[2]: Leaving directory `/Users/kongf/projects/petsc'*
*make[1]: *** [gnumake] Error 2*
*make[1]: Leaving directory `/Users/kongf/projects/petsc'*
***************************ERROR**************************************
*  Error during compile, check
arch-linux2-c-opt-memory/lib/petsc/conf/make.log*
*  Send it and arch-linux2-c-opt-memory/lib/petsc/conf/configure.log to
petsc-maint at mcs.anl.gov <petsc-maint at mcs.anl.gov>*
**********************************************************************

The make and configure logs are attached.

Fande,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190503/c22d44aa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log.zip
Type: application/zip
Size: 4668 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190503/c22d44aa/attachment-0002.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log.zip
Type: application/zip
Size: 161471 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190503/c22d44aa/attachment-0003.zip>


More information about the petsc-users mailing list