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

Re: Should -dev packages providing .pc files depend on pkg-config?

On Thu, 17 Apr 2008 12:17:34 +0200, Bas Wijnen <wijnen@debian.org> said: 

> On Thu, Apr 17, 2008 at 01:44:55AM -0500, Manoj Srivastava wrote:
>> >> > What if the library says "You must call /usr/bin/foo during
>> >> > build"?
>> >> 
>> >> How does the library say that? Why can't I just have gcc -o baz
>> >> baz.c -lfoo
>> >> 
>> >> How can the library make that not work?
>> > By not shipping the libraries in /usr/lib:
>> >> pkg-config --libs valgrind
>> > -L/usr/lib/valgrind/amd64-linux -lcoregrind -lvex -lgcc
>> And how exactly does this prevent me from doing: baz: baz.c gcc -o
>> baz baz.c -L/usr/lib/foo/amd64-linux -lfoo

> By changing the paths and library names often.  If upstream says
> pkg-config is the only supported thing, and all other methods, in
> particular direct linking, should be expected to break every time a
> new version comes out, then pkg-config is indeed how things must be
> done.  If you don't, you get an FTBFS in a binNMU, which would not
> have been there if you would have used upstream's build system.

        I would say they are making it very inconvenient, but still not
 forcing you. Push comes to shove, you can still build depend on a
 specific version, and use an explicit -L.

        Yes, it means you have to track where upstream puts stuff, and
 manually upgrade. Yes, it is more prone to error. Yes, using pkg-config
 is _convenient_. Yews, it is probably advisable to use pkg-config. But
 not mandatory.

        But the same argument can be used for using bison and flex, to
 avoid writing your own parsers -- the tools make life easier.

        I still think if your ./debian/rules calls a program, and that
 is not in Build-essential; it is your responsibility to arrange for it
 to be available using a build dependency.

Delta: The kids will love our inflatable slides.  -- David Letterman
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

Reply to: