[petsc-users] Xcode 15.0 breaks PETSc configure?

Paul Tackley ptackley at gmail.com
Fri Sep 29 06:44:15 CDT 2023


It works. The current git main branch configures and compiles with Xcode-15 on my M1 Mac. 

Thank you,
Paul

> On 28 Sep 2023, at 15:56, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> petsc git repo main branch has fixes for xcode-15. Can you give it a try?
> 
> Satish
> 
> On Thu, 28 Sep 2023, Paul Tackley wrote:
> 
>> 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\
>> 
>> 



More information about the petsc-users mailing list