← Back to team overview

dolfin team mailing list archive

slepc build error

 

I'm using the latest slepc (2.3.3), a slightly older petsc (2.3.3-p8),
bleeding edge dolfin, and I get the following compile error on my amd64 ubuntu
hardy:

scons: Building targets ...
g++ -o dolfin/la/SLEPcEigenvalueSolver.os -c -Wall -pipe -ansi -DDEBUG -g
-Werror -DNDEBUG -O2 -DPACKAGE_VERSION=\"0.7.2\" -DHAS_PETSC=1 -DHAS_SLEPC=1
-DHAS_SCOTCH=1 -DHAS_GTS=1 -fPIC -I. -I/usr/include -I/usr/include
-I/usr/include/libxml2
-I/home/skavhaug/extsoft/petsc-2.3.3-p8/bmake/linux-gnu-cxx-debug
-I/home/skavhaug/extsoft/petsc-2.3.3-p8/include -I/usr/local/include
-I/usr/local/lib -Idolfin -I/home/skavhaug/extsoft/slepc-2.3.3
-I/home/skavhaug/extsoft/slepc-2.3.3/include
-I/home/skavhaug/extsoft/petsc-2.3.3-p8/bmake/linux-gnu-cxx-debug
-I/home/skavhaug/extsoft/petsc-2.3.3-p8/include -I/usr/local/include
-I/usr/local/lib -Idolfin -I/usr/local/include -I/usr/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
dolfin/la/SLEPcEigenvalueSolver.cpp
cc1plus: warnings being treated as errors
dolfin/la/SLEPcEigenvalueSolver.cpp: In member function ‘void
dolfin::SLEPcEigenvalueSolver::solve(const dolfin::PETScMatrix&, const
dolfin::PETScMatrix*, dolfin::uint)’:
dolfin/la/SLEPcEigenvalueSolver.cpp:130: warning: comparison with string
literal results in unspecified behaviour
scons: *** [dolfin/la/SLEPcEigenvalueSolver.os] Error 1
scons: building terminated because of errors.


The troublesome line is the following:

EPSType eps_type = getType(type);
if(eps_type != "default")  // THIS LINE GOES WRONG
    EPSSetType(eps, eps_type);

As EPSType is a macro for const char*, I have no clue why this fails to
compile. The error message is rather confusing as well, or at least not
verbose enough for me. Does anybody know that causes this misbehaviour?

Thanks,
Ola


Follow ups