[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to cope with bad package



On Sun, 2005-06-12 at 10:30 +0200, Pierre Habouzit wrote:
> Le Dim 12 Juin 2005 08:51, John Skaller a écrit :
> > How should a package build script cope with a fault
> > in a package used in a build?
> >
> > The situation: there is a fatal bug in the 'ocaml' binary
> > package for the amd64 architecture. This package would
> > contain the native code ocaml compiler for amd64, which
> > has a bug. Native code compilers for x86 works.
> >
> > The debian/rules can detect amd64, and there is a way
> > to force the upstream source to not use the native code
> > compiler.
> >
> > However, the problem will probably be fixed, but I cannot
> > predict in which release of Ocaml.
> >
> > I propose to 'hack' debian/rules to cope. Would that
> > be the proper way?
> 
> could you bemore specific on the bugs you encounter ? because your 
> explanation lost me a bit.

1. The program 'flxg' is an Ocaml program in the Felix system,
and is the primary executable of the Felix package. The ITP
registration is here:

Bug#312734: Acknowledgement (ITP:  felix -- a high performance
statically typed scripting language)

2. When the source code for 'flxg' is compiled by the Ocaml native code
compiler 'ocamlopt' on the amd64 the resulting executable segfaults.

3. When the bytecode compiler 'ocamlc' is used to build 'flxg'
the resulting program executes. When the native code
compiler is used on the x86, 'flxg' works.

4. The choice between 'ocamlopt' and 'ocamlc' is made by
by the upstream build system.

5. There is an override in the configuration script
to force the use of the bytecode compiler.

6. I propose to check for 'amd64' in the debian/rules
makefile, and call configure like this:

	./configure --set-int-NATIVE_CODE_COMPILER=0

if architecture 'amd64' is detected: this will stop
the build process using the faulty native code compiler
even if it is detected.

Unfortunately the condition is not correct: it will
exclude all versions of the Ocaml native code compiler
for the amd64, even versions in which the bug is 
fixed (which I'm sure it will be). However

(a) I don't know in which version it will be fixed

(b) I don't know how to specify a condition on
a particular range of versions of a package, particularly
when the upper limit of the range is unknown at this time.

(c) I cannot simplify the conditions under which the 
fault occurs, and so can't provide an 'autoconf' style
executable test for it: at best I could 'try' the default
build and rebuild the whole binary package from scratch
using the bytecode compiler if build failed using the
native code compiler .. this solution is quite general
but extremely ugly .. this is my first attempt to make
a Debian package and I suspect people would frown on
this technique .. :)

-- 
John Skaller, skaller at users.sf.net
PO Box 401 Glebe, NSW 2037, Australia Ph:61-2-96600850 
Download Felix here: http://felix.sf.net



Reply to: