[petsc-users] make error from the ex1.c
Satish Balay
balay at mcs.anl.gov
Sat Mar 20 09:44:19 CDT 2010
Can't flood petsc-users mailing list with huge configure.log. petsc-maint is
more apporpriate for such issues.
>>>>>>>>
asterix:/home/balay/download-pine>cat makefile.test
ALL: ex1
CFLAGS = ${PETSC_CC_INCLUDES}
FFLAGS = ${PETSC_FC_INCLUDES}
include ${PETSC_DIR}/conf/variables
ex1: ex1.o
${CLINKER} -o ex1 ex1.o ${PETSC_LIB}
<<<<<<<<
This makefile is incorrect for petsc-dev. Hence you get errors..
>>>>>>>
11:00 AM utabak at dutw689 ~/thesis/C++/PetscSlepcTests/linSystems $ make -f makefile.test
/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/bin/mpicc -I/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/include -I/home/utabak/progsAndLibs/petsc-dev/include -I/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/include -c -o ex1.o ex1.c
In file included from /home/utabak/progsAndLibs/petsc-dev/include/petscis.h:7,
from /home/utabak/progsAndLibs/petsc-dev/include/petscvec.h:9,
from /home/utabak/progsAndLibs/petsc-dev/include/petscmat.h:6,
from /home/utabak/progsAndLibs/petsc-dev/include/petscpc.h:6,
from /home/utabak/progsAndLibs/petsc-dev/include/petscksp.h:6,
from ex1.c:21:
/home/utabak/progsAndLibs/petsc-dev/include/petscsys.h:22:2: error: #error "PETSc configured with --with-clanguage=c++ and NOT --with-c-support - it can be used only with a C++ compiler"
<<<<<<<<<
Try using the attached makefile. [check src/ksp/ksp/examples/tutorials/makefile]
Satish
On Sat, 20 Mar 2010, Umut Tabak wrote:
> Dear all,
>
> I changed my system to Debian lately and installed Petsc-dev. However I am
> running into some problems on the very test for 'ex1.c'.
>
> The make file is attached along with configure log and the error messages that
> I got in the .dat file.
>
> Apart from this typing
>
> 10:58 AM utabak at dutw689 ~/progsAndLibs/petsc-dev $ make getlinklibs
> getincludedirs getpetscflags
>
> -Wl,-rpath,/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/lib
> -Wl,-rpath,/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/lib
> -L/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/lib -lpetsc
> -Wl,-rpath,/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/lib
> -L/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/lib -lcmumps -ldmumps
> -lsmumps -lzmumps -lmumps_common -lpord -lparmetis -lmetis -lsuperlu_4.0
> -lscalapack -lblacs -lspooles -lumfpack -lamd -lflapack -lfblas -lnsl -lrt
> -L/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/lib
> -L/usr/lib/gcc/x86_64-linux-gnu/4.3.2 -ldl -lmpich -lpthread -lrt -lgcc_s
> -lmpichf90 -lgfortran -lm -L/usr/lib/gcc/x86_64-linux-gnu -lm -lmpichcxx
> -lstdc++ -lmpichcxx -lstdc++ -ldl -lmpich -lpthread -lrt -lgcc_s -ldl
> -I/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/include
> -I/home/utabak/progsAndLibs/petsc-dev/include
> -I/home/utabak/progsAndLibs/petsc-dev/linux-gnu-c-debug/include
>
> Are there some changes in the link structure, petsc libraries are linked with
> one flag only, before they were linked separately I suppose.
>
> Could someone help me on this?
>
> Best,
> Umut
>
>
>
-------------- next part --------------
CFLAGS =
FFLAGS =
CPPFLAGS =
FPPFLAGS =
CLEANFILES =
include ${PETSC_DIR}/conf/variables
include ${PETSC_DIR}/conf/rules
ex1: ex1.o chkopts
-${CLINKER} -o ex1 ex1.o ${PETSC_LIB}
${RM} ex1.o
More information about the petsc-users
mailing list