[petsc-users] Xcode 15.0 breaks PETSc configure?

Paul Tackley ptackley at gmail.com
Thu Sep 28 05:29:28 CDT 2023


Hello,

PETSc was working fine on my M1 Mac until I upgraded to Xcode 15.0 - now I can’t even configure it. There seems to be a problem related to C and C++ in Xcode 15.0. “Cxx libraries cannot directly be used with C as linker”. Stdout message pasted below and configure.log file attached.

Thanks for any advice.
Paul

% gcc --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0

% g++ --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0


*********************************************************************************************
           UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
---------------------------------------------------------------------------------------------
  Cxx libraries cannot directly be used with C as linker.
  If you don't need the C++ compiler to build external packages or for you application you
  can run
  ./configure with --with-cxx=0. Otherwise you need a different combination of C and C++
  compilers
*********************************************************************************************
  File "/Users/pjt/Software/PETSc/petsc-3.19.5/config/configure.py", line 462, in petsc_configure
    framework.configure(out = sys.stdout)
  File "/Users/pjt/Software/PETSc/petsc-3.19.5/config/BuildSystem/config/framework.py", line 1438, in configure
    self.processChildren()
  File "/Users/pjt/Software/PETSc/petsc-3.19.5/config/BuildSystem/config/framework.py", line 1426, in processChildren
    self.serialEvaluation(self.childGraph)
  File "/Users/pjt/Software/PETSc/petsc-3.19.5/config/BuildSystem/config/framework.py", line 1401, in serialEvaluation
    child.configure()
  File "/Users/pjt/Software/PETSc/petsc-3.19.5/config/BuildSystem/config/compilers.py", line 1463, in configure
    self.executeTest(self.checkCxxLibraries)
  File "/Users/pjt/Software/PETSc/petsc-3.19.5/config/BuildSystem/config/base.py", line 138, in executeTest
    ret = test(*args,**kargs)
          ^^^^^^^^^^^^^^^^^^^
  File "/Users/pjt/Software/PETSc/petsc-3.19.5/config/BuildSystem/config/compilers.py", line 695, in checkCxxLibraries
    raise RuntimeError("Cxx libraries cannot directly be used with C as linker.\n\


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230928/693e01cc/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: application/octet-stream
Size: 1431946 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230928/693e01cc/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230928/693e01cc/attachment-0003.html>


More information about the petsc-users mailing list