LOL, you are definitely right about the gcc version.
I am still new to conda, and pulled out whatever comes first (through some 
quick google search).

I will update my gcc, and let you know.

-Ling

From: Barry Smith <[email protected]>
Date: Sunday, November 15, 2020 at 4:46 PM
To: Zou, Ling <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [petsc-users] Install PETSc 3.14 with Conda type environment
 Ling,

 Configure  is failing here.

TESTING: checkCPreprocessor from 
config.setCompilers(config/BuildSystem/config/setCompilers.py:699)
  Locate a functional C preprocessor
Checking for program /Users/lzou/miniconda3/bin/gcc...found
              Defined make macro "CPP" to "gcc -E"
Preprocessing source:
#include "confdefs.h"
#include "conffix.h"
#include <stdlib.h>
Executing: gcc -E  
-I/var/folders/fd/yx1jblsj2rzb981kx8ksm03ssqvm65/T/petsc-2jvhontx/config.setCompilers
  
/var/folders/fd/yx1jblsj2rzb981kx8ksm03ssqvm65/T/petsc-2jvhontx/config.setCompilers/conftest.c
Possible ERROR while running preprocessor: exit code 1
stdout:
# 1 
"/var/folders/fd/yx1jblsj2rzb981kx8ksm03ssqvm65/T/petsc-2jvhontx/config.setCompilers/conftest.c"

So for some reason the gcc -E seems to work correctly but produces an non-zero 
exit code?

I notice something very concerning in your Conda environment. It seems to have 
a gcc (GCC) 4.8.5 which is more ancient than my son who is in college. I cannot 
imagine you would want to use such an old compiler. Perhaps if you upgrade the 
Conda environment to use a recent gcc then the other problem will go away.

Please give that a try and let us know how it goes, send configure.log again if 
configure still fails.

  Good luck,

  Barry


  Locate a functional C compiler
Checking for program /Users/lzou/miniconda3/bin/gcc...found
Executing: gcc --version
stdout:
gcc (GCC) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



On Nov 15, 2020, at 4:27 PM, Zou, Ling via petsc-users 
<[email protected]<mailto:[email protected]>> wrote:

Hi,

I have installed PETSc many times before, so not so new to it.
Recently, I have switched to conda system to manage my working environment, and 
would like to reinstall PETSc, and had some issue during the ‘config’ stage:

*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for 
details):
-------------------------------------------------------------------------------
Cannot find a C preprocessor
*******************************************************************************

Config file is also attached.
Appreciate your help.

-Ling
<configure.log>

Reply via email to