[petsc-dev] So CFLAGS no longer works!!!! Major crisis

Satish Balay balay at mcs.anl.gov
Wed Apr 26 16:45:26 CDT 2023


Also note:

I think we previously handled this by always having this in each makefile [without a configure default]

CFLAGS = 

But that format was removed..

Satish

On Wed, 26 Apr 2023, Satish Balay via petsc-dev wrote:

> Well we wanted to always have  CFLAGS initialized by configure [to ignore stuff from env].
> 
> So now - if we are setting in makefile - it has to be set after this default is set - i.e after the line:
> 
> include ${PETSC_DIR}/lib/petsc/conf/variables
> 
> Or do:
> 
> make CFLAGS=garbase ex1
> 
> There might be a different bug lurking here..
> 
> -PETSC_CCOMPILE_SINGLE   = ${CC} -o $*.o -c ${CC_FLAGS} ${FLAGS} ${CPPFLAGS}
> +PETSC_CCOMPILE_SINGLE   = ${CC} -o $*.o -c ${CC_FLAGS} ${CFLAGS} ${CPPFLAGS}
> 
> Satish
> 
> On Wed, 26 Apr 2023, Barry Smith wrote:
> 
> > 
> > $ make ex1
> > mpicc -Wl,-bind_at_load -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind  -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -Wno-stringop-overflow -fvisibility=hidden -g3 -O0  -I/Users/barrysmith/Src/petsc/include -I/Users/barrysmith/Src/petsc/arch-release/include -I/opt/X11/include      ex1.c  -Wl,-rpath,/Users/barrysmith/Src/petsc/arch-release/lib -L/Users/barrysmith/Src/petsc/arch-release/lib -Wl,-rpath,/opt/X11/lib -L/opt/X11/lib -Wl,-rpath,/Users/barrysmith/soft/mpich-clang-gfortran-opt/lib -L/Users/barrysmith/soft/mpich-clang-gfortran-opt/lib -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12 -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12 -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.
 0/
>  lib/gcc/
>  current -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current -lpetsc -llapack -lblas -lX11 -lmpifort -lmpi -lpmpi -lgfortran -lemutls_w -lquadmath -lstdc++ -lquadmath -o ex1
> > ~/Src/petsc/src/snes/tutorials (release *=) arch-release
> > $ more makefile
> > -include ../../../petscdir.mk
> > 
> > MANSEC           = SNES
> > EXAMPLESMATLAB   = ex5m.m ex29view.m
> > DIRS             = ex10d network
> > CLEANFILES       = ex5f90t
> > CFLAGS = garbage
> > 
> > 
> > The new stuff in variables PETSC_COMPILE_SINGLE    = ${PCC} -o $*.o -c ${PCC_FLAGS} ${${CLANGUAGE}FLAGS} ${CCPPFLAGS}  with the recursive use of $ doesn't work? This is on my Mac but Get also has the problem on Polaris
> 



More information about the petsc-dev mailing list