← Back to team overview

dolfin team mailing list archive

Re: request for assistance with Debian package

 

On Thu, Jul 07, 2005 at 09:12:28PM -0400, Faheem Mitha wrote:
> 
> Hi,
> 
> I've been working on a Debian DOLFIN 0.5.7 package, compiled against my 
> PETSc 2.2.1 Debian package.
> 
> There are a few minor points with which I would like assistance.
> 
> 1) I'm having problems with cleaning the build tree. 'make clean' does not 
> completely clean the tree. I've tried the other clean targets I see, but 
> none seem any better.
> 
> This is important when building a package, for reasons I can elaborate on 
> if necessary.
> 
> I could give more details, but I believe the following exercise will make 
> the situation clear.
> 
> Unzip the DOLFIN tarball. Put all the files under version control. Build 
> library. Make clean. Check to see how many files remain which the version 
> control system does not know about.
> 
> I see quantities of stuff that does not get removed. Among these, lots of 
> Makefiles and .a files in src.

The Makefiles are generated by configure, so these can't be removed by
make clean. It's not a good thing to have a Makefile remove itself... :-)

The .a files in src should be removed by make clean. They do for me
when I do make clean.

> Also, 'include' and 'lib' directories are created at the top level of the 
> source tree, and header and library files respectively are put in them. 
> These are not removed either.

The symbolic links in include and lib are generated by make in
src/post/Makefile, by calling src/post/libs.sh. I guess it should work
to put in an extra target clean in src/post/Makefile.am and a suitable
script that removes the symbolic links.

> Would it not be easier to put these files directly into the install 
> targets? Why is it necesary to create these directories?

Because then we can build all demo programs in src/demo as if DOLFIN
was installed on the system. This emulates an installation of DOLFIN
without having to do a make install.

> 2) Some files look like they should not have been shipped with the source.
> 
> There are some Makefiles in the demo directories, though these, like all 
> the others, look like they created by automake/autoconf, since there are 
> Makefile.am and Makefile.in's present.

In src/demo/ we have generated Makefiles in all directories not
containing code. At the bottom level, each demo program has a simple
hand-written Makefile which is not generated. The idea is that if
someone wants to write a simple program using DOLFIN, they can just
copy the code in a demo directory along with the Makefile. (Or they
can use their own build-system.)

> Also, was it necessary to ship config.guess and config.sub? These files 
> appear to be modified by the build. I'm fairly clueless what these are 
> used for, sorry.

They are generated by automake. The idea is that we ship everything
generated by automake/autoconf (thus shipping Makefile.in), but not
things generated by configure. To compile DOLFIN, one should need to
run the configure script, but one should not need to have automake or
autoconf installed.

> 3) I can try to figure out the build-depends and depends on my own but I 
> am lazy. So, can someone tell me what they should be?
> 
> Build-Depends: Required at build time.

The ones I can think of right now are libxml2-dev (Debian package) and
PETSc version 2.3.0. There are probably other stuff we depend on that
is more standard.

To work with variational forms, one needs to have the FIAT 0.2.3 and
FFC 0.1.9 from the FEniCS web site installed. These in turn have
dependencies. It's not necessary to have FFC and FIAT to use DOLFIN,
but some parts of DOLFIN require it.

Here's a list of dependencies from the README file in FFC:

 1. Python, version 2.4 (might work with 2.3)

     If you're running Debian, you need to install the
     package python2.4.

  2. FIAT, version 0.2.1

     You need to have FIAT installed. FIAT is available from
     the FEniCS web page: http://www.fenics.org/.

  3. The Python Numeric module

     If you're running Debian, you need to install the
     package python-numeric.

     This module is used both by FFC and FIAT.

  4. The Python LinearAlgebra module (extending the Numeric module)

     If you're running Debian, you need to install the
     package python-numeric-ext.

     This module is only used by FIAT.

> Depend: Required at run time.

Something for visualization (MATLAB, Octave, OpenDX, GiD, Tecplot or
Paraview/VTK). This is more post run-time.

> 3) DOLFIN only creates static libraries by default. How can one generate 
> shared libraries?

We should learn to use libtool and generate shared libraries. This is
something we have to learn how to do, and it will take more than 5
minutes.

/Anders



Follow ups

References