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

Re: header sanity check?

On Thu, Jul 06, 2006 at 09:05:28PM -0700, Tyler MacDonald wrote:
> So it's really easy to package a -dev package with a header file, that
> #include's a header file in a package that it doesn't depend on.
Yes it is, it's a compile time problem of someones program.

> to catch this or if there are any requirements. pbuilder won't even catch it
> if the Build-Depends for the source package contains all the -dev packages
> needed.
If that particular header file is not used in the compiling then it
cannot be caught, as it doesn't result in an error.

It is not as easy as it sounds.  We have enough trouble with libraries
(it's a similiar sort of issue). Consider if you include stdio.h
You need to depend on libc6-dev right?
Until libc7 comes along, then you're in trouble.

Also a lot of headers have things like #ifdef HAVE_FOO_H and only
include foo.h if you have it. Lot's of portable autoconf'ed stuff does
it like that.

Or perhaps parts of the headers only "activate" under certain circumstances.
A program that could use mysql or postgresql databases, for example, may
need some of their headers if you use that feature.

It would be nice to trap all sorts of problems, but I believe this would 
create more than it would solve.

 - Craig

Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
csmall at : enc.com.au                      ieee.org           debian.org

Reply to: