The compiler library detection code is a bit messy. Its there to help with interlanguage linking.
One workarround [to such failures] is to tell configure not to guess, and specify the relavent info. For eg: balay@ipro^~/petsc(master) $ ./configure --download-mpich --download-hypre CC=clang CXX=clang++ FC=gfortran --with-clib-autodetect=0 --with-fortranlib-autodetect=0 --with-cxxlib-autodetect=0 LIBS='-L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin17.0.0/7.2.0/../../.. -lgfortran -lc++' Satish On Mon, 30 Oct 2017, Kong, Fande wrote: > We had exactly the same issue when upgraded compilers. I guess this is > somehow related to gfortran. A simple way to work around for us is to > change* if with_rpath*: to * if False *at line 54 of > config/BuildSystem/config/libraries.py. > > Not sure if it works for you. > > Fande, > > > > > On Mon, Oct 30, 2017 at 10:14 AM, Manav Bhatia <bhatiama...@gmail.com> > wrote: > > > Hi, > > > > I am trying to install pets 3.8 on a new MacBook machine with OS 10.13. > > I have installed openmpi from macports and I am getting this error on > > configuration. Attached is also the configure.log file. > > > > I am not sure how to proceed with this. Any advice will be greatly > > appreciated! > > > > Regards, > > Manav > > > > ============================================================ > > =================== > > Configuring PETSc to compile on your system > > > > ============================================================ > > =================== > > =============================================================================== > > > > > > ***** WARNING: Using default optimization C flags -g -O3 > > > > > > You might consider manually setting optimal optimization flags for your > > system with > > > > COPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for > > examples > > > > > > =============================================================================== > > > > > > =============================================================================== > > > > > > ***** WARNING: Using default C++ optimization flags -g -O3 > > > > > > You might consider manually setting optimal optimization flags for your > > system with > > > > CXXOPTFLAGS="optimization flags" see config/examples/arch-*-opt.py > > for examples > > > > > > =============================================================================== > > > > > > =============================================================================== > > > > > > ***** WARNING: Using default FORTRAN optimization flags -g -O > > > > > > You might consider manually setting optimal optimization flags for your > > system with > > > > FOPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for > > examples > > > > > > =============================================================================== > > > > > > =============================================================================== > > > > > > WARNING! Compiling PETSc with no debugging, this should > > > > > > only be done for timing and production runs. All > > development should > > > > be done when configured using > > --with-debugging=1 > > > > ============================== > > ================================================= > > > > TESTING: checkCLibraries > > from config.compilers(config/BuildSystem/config/compilers.py:171) > > > > > > ************************************************************ > > ******************* > > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > > details): > > ------------------------------------------------------------ > > ------------------- > > C libraries cannot directly be used from Fortran > > ************************************************************ > > ******************* > > > > > > > > > > > > >