← Back to team overview

fenics team mailing list archive

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

 

Hi,

I think the only problem remaining now is why is the pkg-config cflags are
wrong. The include directory points to the build directory not the install
directory.


bt@~:$ 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/home/bt/debian/sources/dolfin/dolfin-0.9.0/debian/tmp/include
-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

/home/bt/debian/source/dolfin is the directory in which I unpack the debian
source package and build it resulting in
"-I/home/bt/debian/sources/dolfin/dolfin-0.9.0/debian/tmp/include"


As regards to "swig_cmd" in setup.py I am not sure what you mean by this.
The only setup.py in the source directory is

bt@dolfin-0.9.0:$ find ./ -name setup.py
./scons/simula-scons/setup.py

I don't see and swig_cmd in setup.py

bt@dolfin-0.9.0:$ more `find ./ -name setup.py`
# -*- coding: utf-8 -*-
from distutils.core import setup
from distutils import sysconfig
import sys, os, glob

setup(name='simula-scons',
    version='0.1',
    description='Addons for building software with SCons',
    author='Ãsmund ÃdegÃ¥rd, Arve N. Knudsen, Ola Skavhaug, Johannes Ring',
    author_email='aasmund@xxxxxxxxx',
    license="MIT",
    url='http://www.simula.no',
    packages=['simula_scons', 'simula_scons.pkgconfiggenerators'],
    package_dir={'simula_scons': 'simula_scons',
'simula_scons.pkgconfiggenerators': 'simula_scons/pkgconfiggenerators'},
    )

I suspect that since the debian package is being built and installed in a
debian/tmp directory the erroneous include (in pkg-config files) is being
generated for this reason.

In debian rules the build is done by

install-%:
build

        # Add here commands to install the package into
debian/tmp

        PYTHON=python$* $(SCONS) install prefix=$(CURDIR)/debian/tmp


        # Generate pkg-config file for DOLFIN based on pkg-config
files

        # in
scons/pkgconfig:

        python$* debian/gen_pkgconf.py debian/tmp/dolfin.pc



so "prefix" is relative to the unpacked source directory "CURDIR" and is in
debian/tmp which is where the
/home/bt/debian/sources/dolfin/dolfin-0.9.0/debian/tmp is being generated

However the package config files are generated by debian/gen_pkgconf.py
using debian/tmp/dolfin.pc. Perhaps this script needs to rewrite the include
lines to point to the correct install directory i.e. /usr/include. Not sure
how this is to be done ? Shall I just use sed or is there a more elegant way
?

regards
bt

References