← Back to team overview

fenics team mailing list archive

Fwd: [Deb-dev] Build time bugs in syfi and segfaults in dolfin -- Partially Fixed

 

On Thu, Feb 12, 2009 at 6:35 AM, Johannes Ring <johannr@xxxxxxxxx> wrote:
>
> > I don't think that is the reason for it to fail because it should have
> > been replaced by /usr/include which is included anyway, and because there
> > is a similar line in dolfin.pc in the Ubuntu package
> > (-I/tmp/buildd/dolfin-0.9.0/debian/tmp/include) and this works without any
> > problems. However, we should still try to fix this. I think we need to add
> > some sort of DESTDIR support in the build system.

Looks like you are correct here. I just manually edited
/usr/lib/pkgconfig/dolfin.pc and set "prefix" to "/usr". This did not
solve the problem with python scripts and dolfin.i can not be found
still .  dolfin.i is installed as can be seen by

ls -l /usr/include/dolfin/swig/dolfin.i
-rw-r--r-- 1 root root 1705 2009-01-05 10:15 /usr/include/dolfin/swig/dolfin.i

> I was referring to the setup.py file from the temporary Instant directory
> which you posted earlier.

Here are the contents of setup.py in the temporary instant directory
-------------------------------------------------------------------------------------------------

bt@dolfin-0.9.0:$ more
/tmp/tmpCMJ4kh2009-2-12-11-48_instant/dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b/setup.py

import os
from distutils.core import setup, Extension
name = 'dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b'
swig_cmd ='swig -python  -c++
dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b.i'
os.system(swig_cmd)
sources = ['dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b_wrap.cxx']
setup(name = 'dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b',
     ext_modules = [Extension('_' +
'dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b',
                    sources,

include_dirs=['/usr/lib/python2.5/site-packages/numpy/core/include',
'/usr/include/suitesparse', '/usr/include/python2.5', '/usr/lib/pets
c/bmake/linux-gnu-c-opt', '/usr/lib/petsc/include',
'/usr/lib/openmpi/include', '/usr/lib/openmpi/lib', '.',
'/usr/include/scotch', '/usr/include/libxml2', '/
usr/include/glib-2.0', '/usr/lib/glib-2.0/include',
'/usr/lib/python2.5/site-packages/numpy/core/include'],
                    library_dirs=['/usr/lib/atlas',
'/usr/lib/petsc/lib/linux-gnu-c-opt'],
                    libraries=['dolfin', 'umfpack', 'petscts',
'petscsnes', 'petscksp', 'petscdm', 'petscmat', 'petscvec', 'petsc',
'lapack', 'blas', 'cholmo
d', 'amd', 'colamd', 'scotch', 'scotcherr', 'gts', 'm', 'xml2',
'gthread-2.0', 'rt', 'gmodule-2.0', 'dl', 'glib-2.0']  )])

and once again the contents of the directory are
---------------------------------------------------------------------

bt@dolfin-0.9.0:$ tree /tmp/tmpCMJ4kh2009-2-12-11-48_instant/
/tmp/tmpCMJ4kh2009-2-12-11-48_instant/
`-- dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b
   |-- __init__.py
   |-- build
   |   `-- temp.linux-i686-2.5
   |-- compile.log
   |-- dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b.i
   `-- setup.py

the contents of the compile.log is
-------------------------------------------------

bt@dolfin-0.9.0:$ more
/tmp/tmpCMJ4kh2009-2-12-11-48_instant/dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b/compile.log
dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b.i:97: Error:
Unable to find 'dolfin.i'
running build_ext
building '_dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b' extension
creating build
creating build/temp.linux-i686-2.5
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC
-I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include
/suitesparse -I/usr/include/python2.5
-I/usr/lib/petsc/bmake/linux-gnu-c-opt -I/usr/lib/petsc/include
-I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I. -I
/usr/include/scotch -I/usr/include/libxml2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include
-I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/in
clude/python2.5 -c
dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b_wrap.cxx -o
build/temp.linux-i686-2.5/dolfin_compile_function_df46e19d3b7dfd0a28ed
8c435a22313b_wrap.o
gcc: dolfin_compile_function_df46e19d3b7dfd0a28ed8c435a22313b_wrap.cxx:
No such file or directory
gcc: no input files
error: command 'gcc' failed with exit status 1

the contents of /usr/lib/pkgconfig/dolfin.pc (with the manually
corrected "prefix" variable) is
---------------------------------------------------------------------------------------------------------------------------------

bt@dolfin-0.9.0:$ more /usr/lib/pkgconfig/dolfin.pc
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
compiler=mpic++

Name: DOLFIN
Description: Dynamic Object-oriented Library for FINite element computation
Version: 0.9.0
Requires: ufc-1 gts libxml-2.0
Conflicts:
Libs:   -L${libdir} -ldolfin -L/usr/lib/atlas -lblas -lumfpack -lamd
 -L/usr/lib/petsc/lib/linux-gnu-c-opt -lpetscts -lpetscsnes
-lpetscksp -lpetscdm -lpet
scmat -lpetscvec -lpetsc   -L/usr/lib/atlas -llapack -lblas -lcholmod
-lamd -lcolamd   -lscotch -lscotcherr
Cflags:  -Wall -pipe -ansi -DDEBUG -g -DNDEBUG -O2 -DHAS_MPI=1
-DMPICH_IGNORE_CXX_SEEK -DPACKAGE_VERSION=\"0.9.0\" -DHAS_PETSC=1
-DHAS_SCOTCH=1 -DHAS_UMFPACK=
1 -DHAS_GTS=1 -DHAS_CHOLMOD=1 -fno-strict-aliasing -I${includedir}
-I/usr/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/suitesparse   -I/u
sr/include/python2.5   -I/usr/lib/petsc/bmake/linux-gnu-c-opt
-I/usr/lib/petsc/include -I/usr/lib/openmpi/include
-I/usr/lib/openmpi/lib -I.   -I/usr/include/
suitesparse   -I/usr/include/scotch


pkg-config --cflags dolfin now yields
---------------------------------------------------

bt@dolfin-0.9.0:$ pkg-config --cflags dolfin
-Wall -pipe -ansi -DDEBUG -g -DNDEBUG -O2 -DHAS_MPI=1
-DMPICH_IGNORE_CXX_SEEK -DPACKAGE_VERSION="0.9.0" -DHAS_PETSC=1
-DHAS_SCOTCH=1 -DHAS_UMFPACK=1 -DHAS_GTS=1 -DHAS_CHOLMOD=1
-fno-strict-aliasing -pthread
-I/usr/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/suitesparse -I/usr/include/python2.5
-I/usr/lib/petsc/bmake/linux-gnu-c-opt -I/usr/lib/petsc/include
-I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I.
-I/usr/include/scotch -I/usr/include/libxml2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include

the contents of /usr/include/dolfin is
---------------------------------------------------

bt@dolfin-0.9.0:$ ls /usr/include/dolfin
ale  common  elements  fem  function  graph  io  la  log  main  math
mesh  mf  nls  ode  parameter  plot  quadrature  swig

and finally /usr/include/dolfin/swig is
-----------------------------------------------------

bt@dolfin-0.9.0:$ ls /usr/include/dolfin/swig/
directors.i           dolfin_exceptions.i     dolfin_headers.i
dolfin_la_pre.i     dolfin_mesh_pre.i            ignores.i
typemaps.i
dolfin_common_post.i  dolfin_function_post.i  dolfin.i
dolfin_log_post.i   dolfin_pde_pre.i             numpy_typemaps.i
dolfin_docstrings.i   dolfin_function_pre.i   dolfin_la_post.i
dolfin_mesh_post.i  dolfin_shared_ptr_classes.i  renames.i


Hope this helps. Let me know if anything else.

regards
bt


Follow ups

References