[petsc-dev] Petsc can't find gcc , on CentOS

Jed Brown jedbrown at mcs.anl.gov
Thu Jun 6 07:31:57 CDT 2013


Chen Shapira <chen2600 at gmail.com> writes:

> Hi,
>
> I'm building petsc-dev under CentOS 6 ,
> I keep getting the error :
> "C compiler you provided with -with-cc=gcc does not work"
>
> The problem is I do have gcc , g++ and gfortran installed.

Your LIBS option is wrong.  Either provide the path to the archive or
use '-L/home/VNC/zlib -lz'.

Configure Options: --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich=yes --download-hdf5=yes
--download-f-blas-lapack=yes --download-metis=yes --download-parmetis=yes --LIBS="-L/home/VNC/zlib/libz.a -lz"


Executing: gcc  -o /tmp/petsc-QOWz6u/config.setCompilers/conftest    /tmp/petsc-QOWz6u/config.setCompilers/conftest.o -L/home/VNC/zlib/libz.a -lz
sh: 
Possible ERROR while running linker: /usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
 output: ret = 256




More information about the petsc-dev mailing list