<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 13 Nov 2025, at 6:59 AM, Jed Brown <jed@jedbrown.org> wrote:</div><br class="Apple-interchange-newline"><div><div>I'm assuming that you configured and built PETSc with gcc, and now are building a package that depends on PETSc using AOCC? Is it possible to configure PETSc with the same compiler, or to use -std=gnu++17 (any dialect that supports GNU extensions)?<br></div></div></blockquote><div><br></div><div>Do what Jed suggests.</div><div>But to give you a thorough answer, this FreeFEM post got me to fix some missing code in PETSc <a href="https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/7868__;!!G_uCfscf7eWS!ZCDn8GMjZjjHKboEmYNh_DysRggGBuwNc5uVk819bJyjAPCkifplTawg0JU1vik-GoaLgcKII1fsCidj5CrSqw$">https://gitlab.com/petsc/petsc/-/merge_requests/7868</a>.</div><div>So now, the more “elegant” solution of defining PETSC_SKIP_REAL___FLOAT128 (which was not working back then) should work given that you are using a recent enough PETSc (it seems you are using version 3.21.0, we are at 3.24.1, and the fix is there since 3.21.6).</div><div>But again, try what Jed suggests first and foremost.</div><div><br></div><div>Thanks,</div><div>Pierre</div><br><blockquote type="cite"><div><div>Benjamin Chapman via petsc-users <petsc-users@mcs.anl.gov> writes:<br><br><blockquote type="cite">Hello,<br><br>We are using PETSc as part of a larger project and are switching from compiling with gcc to using AOCC (clang). However, I am getting an error from my include statements stating that the data type __complex128 is an "unknown type name". The full error log is attached.<br><br>I found this solution online (FreeFem - PETSc compilation error - libblas.a/liblapack.a cannot be used - FreeFEM installation - FreeFEM<https://urldefense.us/v3/__https://community.freefem.org/t/freefem-petsc-compilation-error-libblas-a-liblapack-a-cannot-be-used/2771/8__;!!G_uCfscf7eWS!fqL9KO-Su4o3uzl3iGDcskkh1utILAAeNaaZ25v6yAZ2CEn2axOiqwOCYwJHMlq_jQwt9Oc4FXRaM9tMvfMBVx5mCetoylgskpID89ee$ >), which says to comment out a line in the petscconf.h header file. Is this a safe fix or is there a more elegant way to go about this?<br><br>Best,<br>Ben<br>[ 64%] Building CXX object src/CMakeFiles/rebel_lib.dir/common/coordinate_system.cpp.o<br>[ 65%] Building CXX object src/CMakeFiles/rebel_lib.dir/common/FFTW_interface.cpp.o<br>[ 65%] Building CXX object src/CMakeFiles/rebel_lib.dir/common/fileIO.cpp.o<br>[ 66%] Building CXX object src/CMakeFiles/rebel_lib.dir/common/lapacke_interface.cpp.o<br>[ 66%] Building CXX object src/CMakeFiles/rebel_lib.dir/common/petsc_extensions.cpp.o<br>In file included from /mnt/scratch/bchapman/rebel/src/common/petsc_extensions.cpp:7:<br>In file included from /mnt/scratch/bchapman/rebel/src/common/petsc_extensions.h:14:<br>In file included from /mnt/scratch/bchapman/rebel/build/external/builds/petsc-3.21.0/include/petscksp.h:6:<br>In file included from /mnt/scratch/bchapman/rebel/build/external/builds/petsc-3.21.0/include/petscpc.h:6:<br>In file included from /mnt/scratch/bchapman/rebel/build/external/builds/petsc-3.21.0/include/petscmat.h:6:<br>In file included from /mnt/scratch/bchapman/rebel/build/external/builds/petsc-3.21.0/include/petscvec.h:8:<br>In file included from /mnt/scratch/bchapman/rebel/build/external/builds/petsc-3.21.0/include/petscsys.h:193:<br>/mnt/scratch/bchapman/rebel/build/external/builds/petsc-3.21.0/include/petscmath.h:429:45: error: unknown type name '__complex128'<br> 429 | PETSC_EXTERN MPI_Datatype MPIU___COMPLEX128 MPIU___COMPLEX128_ATTR_TAG;<br> | ^<br>/mnt/scratch/bchapman/rebel/build/external/builds/petsc-3.21.0/include/petscmath.h:424:71: note: expanded from macro 'MPIU___COMPLEX128_ATTR_TAG'<br> 424 | #define MPIU___COMPLEX128_ATTR_TAG PETSC_ATTRIBUTE_MPI_TYPE_TAG(__complex128)<br> | ^<br>/mnt/scratch/bchapman/rebel/src/common/petsc_extensions.cpp:2570:13: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]<br> 2570 | const auto [min, max] = std::minmax_element(std::begin(s), std::end(s));<br> | ^~~~~~~~~~<br>1 warning and 1 error generated.<br>make[2]: *** [src/CMakeFiles/rebel_lib.dir/build.make:132: src/CMakeFiles/rebel_lib.dir/common/petsc_extensions.cpp.o] Error 1<br>make[1]: *** [CMakeFiles/Makefile2:772: src/CMakeFiles/rebel_lib.dir/all] Error 2<br>make: *** [Makefile:136: all] Error 2<br></blockquote></div></div></blockquote></div><br></body></html>