← Back to team overview

dolfin team mailing list archive

Error building latest pydolfin (swig and global includes)

 

Making all in pydolfin
make[2]: Entering directory `/home/martinal/simula/fenics/dolfin/src/pydolfin'
/usr/bin/swig -c++ -python -ignoremissing -nodefaultctor
-nodefaultdtor -dirprot -Werror `pkg-config --cflags ufc-1`
-I../../src/kernel/common -I../../src/kernel/elements
-I../../src/kernel/fem -I../../src/kernel/function
-I../../src/kernel/graph -I../../src/kernel/io -I../../src/kernel/la
-I../../src/kernel/main -I../../src/kernel/math
-I../../src/kernel/mesh -I../../src/kernel/mf -I../../src/kernel/nls
-I../../src/kernel/ode -I../../src/kernel/pde
-I../../src/kernel/quadrature -I../../src/kernel/parameter
-I../../src/kernel/log -I../../src/kernel/plot  -DNDEBUG -o
dolfin_wrap.cpp dolfin.i
dolfin.i:50: Warning(201): Unable to find 'ufc.h'
make[2]: *** [dolfin_wrap.cpp] Error 1
make[2]: Leaving directory `/home/martinal/simula/fenics/dolfin/src/pydolfin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/martinal/simula/fenics/dolfin/src'
make: *** [all-recursive] Error 1


martinal@martinal-laptop:~/simula/fenics/dolfin$ pkg-config --cflags ufc-1

martinal@martinal-laptop:~/simula/fenics/dolfin$


This doesn't work since ufc is installed in a system-wide include
directory. The reason is that pkg-config removes the "-I/usr/include"
that should be output with "--cflags ufc-1". Since swig doesn't use
the global include directories, it can't find ufc.h.

We had the same problem in pycc, but it seems to be fixed now (by
Åsmund I believe): when adding "ufc-1" to SwigDependencies in a
scons.cfg file in pycc, swig gets -I/usr/include added to the command
line.

Martin


Follow ups