On Tue, Mar 25, 2008 at 02:58:39PM +0100, Ola Skavhaug wrote: > 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);
Does it help if you just replace this line with if(strcmp(eps_type, "default") != 0) ? -- Anders > 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 > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
