FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 04-05-2008, 11:08 PM
Roger Leigh
 
Default Should -dev packages providing .pc files depend on pkg-config?

Simon Richter <sjr@debian.org> writes:

>> Consider there's a package foo which is built against libbar-dev and
>> uses pkg-config to obtain the necessary CFLAGS and LIBS for libbar.
>
>> Now is it the foo package's or the libbar-dev package's duty to provide
>> the dependency on pkg-config?
>
> Disagreeing with the others: It is the -dev package's responsibility.
>
> The foo package's build dependencies are only relevant when building the
> foo package. For someone who develops software based on libbar, it is
> not obvious that foo's build dependencies are required.

As an upstream, I include a .pc file for the convenience of people who
want to link with my libraries. However, using pkg-config or
PKG_CHECK_MODULES is entirely optional, and so really a Suggests or
Recommends is more appropriate. If the user decides to use
pkg-config, then it's really their responsibility to have pkg-config
in their Build-Depends, not that of the library packager.


Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
 
Old 04-06-2008, 02:29 AM
Romain Beauxis
 
Default Should -dev packages providing .pc files depend on pkg-config?

Le Sunday 06 April 2008 00:08:43 Roger Leigh, vous avez écrit*:
> > The foo package's build dependencies are only relevant when building the
> > foo package. For someone who develops software based on libbar, it is
> > not obvious that foo's build dependencies are required.
>
> As an upstream, I include a .pc file for the convenience of people who
> want to link with my libraries. *However, using pkg-config or
> PKG_CHECK_MODULES is entirely optional, and so really a Suggests or
> Recommends is more appropriate. *If the user decides to use
> pkg-config, then it's really their responsibility to have pkg-config
> in their Build-Depends, not that of the library packager.

Just to add my two bits to this, we recently had a FTBFS with ocaml-mad
exactly related to this: the library checked by the configure script had
changed its dependency, hence pkg-config was no more available.

Clearly, as others pointed out, it's the .pc user's responsability to
build-dep on pkg-config: we didn't notice the missing build-dep precisely
because it was pulled by the library.

Hence, not only do I advocate for the optional depency, but it is good if
pulling libfoo-dev don't pull pkg-config during an automatic build, so that
you are sure that any ./configure needing pkg-config has it as a build-dep.


Romain
--
Marcus Garvey told us
That freedom is a must.
He told us that the Black Star Liners
Are coming one day for us.
 
Old 04-06-2008, 04:48 AM
Simon Richter
 
Default Should -dev packages providing .pc files depend on pkg-config?

Hi,

> | The foo package's build dependencies are only relevant when building
> | the foo package. For someone who develops software based on libbar,
> | it is not obvious that foo's build dependencies are required.

> Whoever develops software based on libbar will have to have a call to
> pkg-config somewhere in their build process so they should depend on
> pkg-config.

The use case here are people downloading a tarball and building that.
These people are going to use a prebuilt configure script and expect the
library to be found by it if the -dev package is installed.

Simon


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-06-2008, 01:18 PM
"Martijn van Oosterhout"
 
Default Should -dev packages providing .pc files depend on pkg-config?

On Sun, Apr 6, 2008 at 6:48 AM, Simon Richter <sjr@debian.org> wrote:
> The use case here are people downloading a tarball and building that.
> These people are going to use a prebuilt configure script and expect the
> library to be found by it if the -dev package is installed.

Then the configure script should do:

Checking for pkg-config.... no
ERROR: Please install pkg-config

It's not the dev package's responsibility to ensure gcc/g++/binutils
are installed, I beleive the same applies to pkg-config.

Have a nice day,
--
Martijn van Oosterhout <kleptog@gmail.com> http://svana.org/kleptog/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-07-2008, 08:20 AM
Bas Wijnen
 
Default Should -dev packages providing .pc files depend on pkg-config?

On Sun, Apr 06, 2008 at 03:18:58PM +0200, Martijn van Oosterhout wrote:
> On Sun, Apr 6, 2008 at 6:48 AM, Simon Richter <sjr@debian.org> wrote:
> > The use case here are people downloading a tarball and building that.
> > These people are going to use a prebuilt configure script and expect the
> > library to be found by it if the -dev package is installed.
>
> Then the configure script should do:
>
> Checking for pkg-config.... no
> ERROR: Please install pkg-config
>
> It's not the dev package's responsibility to ensure gcc/g++/binutils
> are installed, I beleive the same applies to pkg-config.

It sounds like you're suggesting to add pkg-config to build-essential?
Because that's the reason that the -dev package doesn't depend on them.
It does depend on other library's -dev packages that it needs to compile
programs, for example. Installing a -dev package and its depends
(including the implicit build-essential dependency because it's about
building things) should be enough to build a program with the library.

The question is, can a -dev package be used for its main function
(building programs with the library) without pkg-config? IMO that
depends on the maintainer[1]. If the maintainer defines that pkg-config is
the only supported[2] way to use the library, then it should be a Depends.
If the .pc file is shipped as a service to the user, but building
without it is supported as well, then it should not be a Depends, but
possibly a Suggests or Recommends, depending on the exact situation.

Thanks,
Bas

[1] Here, "the maintainer" is a combination of upstream and the Debian
maintainer. In most cases, upstream's policy will be used unchanged
by the Debian maintainer, but if the Debian maintainer chooses to
diverge from it, then the new policy is what counts. That is, if
the Debian maintainer chooses to only support pkg-config, then
that's how it is, even if upstream supports building without it as
well. And if upstream doesn't support anything else, but the Debian
maintainer does (and thus becomes upstream for that part of the
package), then that's how it is. In other words, the Debian
maintainer defines the rules for the Debian package and in most
cases he/she will copy upstream's policy.

[2] And for clarity, if building without pkg-config is "supported" is a
non-technical thing. It consists of a statement from the maintainer
about the issue. The idea is that when it's supported, it will
continue to work in newer versions (at least for some time). It has
nothing to do with whether or not it will work with the current
version.

--
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://pcbcn10.phys.rug.nl/e-mail.html
 
Old 04-07-2008, 04:20 PM
"Bernhard R. Link"
 
Default Should -dev packages providing .pc files depend on pkg-config?

* Bas Wijnen <wijnen@debian.org> [080407 10:16]:
> > It's not the dev package's responsibility to ensure gcc/g++/binutils
> > are installed, I beleive the same applies to pkg-config.
>
> It sounds like you're suggesting to add pkg-config to build-essential?
> Because that's the reason that the -dev package doesn't depend on them.

Here I have to contradict. No -dev package should ever depend on a
compiler or linker, even if that tool was not already in
build-essentials.

> The question is, can a -dev package be used for its main function
> (building programs with the library) without pkg-config? IMO that
> depends on the maintainer[1]. If the maintainer defines that pkg-config is
> the only supported[2] way to use the library, then it should be a Depends.

If the maintainer decides this, it should be a Recommends, because it
would be found in all but unusual installations. If the Maintainer does
not think there is no sensible way in his eyes without some tool, it should
be at most a Suggests, if it is there at all.

> If the .pc file is shipped as a service to the user, but building
> without it is supported as well, then it should not be a Depends, but
> possibly a Suggests or Recommends, depending on the exact situation.

I think a Recommends would be far too strong here. A Recommends means
(has ment before apt and means with newer apt), that an user who does
not want it has to work actively against it getting installed.
A Recommends is by no way a lightweight "hey, you might like this, too".

Hochachtungsvoll,
Bernhard R. Link


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-07-2008, 06:14 PM
Manoj Srivastava
 
Default Should -dev packages providing .pc files depend on pkg-config?

On Mon, 7 Apr 2008 18:20:56 +0200, Bernhard R Link <brlink@debian.org> said:

> * Bas Wijnen <wijnen@debian.org> [080407 10:16]:
>> > It's not the dev package's responsibility to ensure
>> > gcc/g++/binutils are installed, I beleive the same applies to
>> > pkg-config.
>>
>> It sounds like you're suggesting to add pkg-config to
>> build-essential? Because that's the reason that the -dev package
>> doesn't depend on them.

> Here I have to contradict. No -dev package should ever depend on a
> compiler or linker, even if that tool was not already in
> build-essentials.

Can you provide some rationale for this assertion? I can see why
one might not tie the development tool very strongly with a particular
compiler or compiler version, to allow a developer to use it with an
alternative development tool, but I can see why one may want to depend
on a generic foo-lang-compiler-or-interpreter virtual package.

There is obviously a trade off here -- the need to the
development package to be useful on installation, by ensuring that the
tools required to use the package are also installed, versus the need
to allow people to use the package with alternate developer tools. Ar
there other considerations and use cases you have in mind?

I see recommends as a middle ground between a depends and a
suggestions; can you articulate why this middle ground is unaceptable,
as you assert above?

manoj
--
Ah, sweet Springtime, when a young man lightly turns his fancy over!
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-07-2008, 09:21 PM
Andreas Bombe
 
Default Should -dev packages providing .pc files depend on pkg-config?

On Mon, Apr 07, 2008 at 01:14:50PM -0500, Manoj Srivastava wrote:
> On Mon, 7 Apr 2008 18:20:56 +0200, Bernhard R Link <brlink@debian.org> said:
> > Here I have to contradict. No -dev package should ever depend on a
> > compiler or linker, even if that tool was not already in
> > build-essentials.
>
> Can you provide some rationale for this assertion? I can see why
> one might not tie the development tool very strongly with a particular
> compiler or compiler version, to allow a developer to use it with an
> alternative development tool, but I can see why one may want to depend
> on a generic foo-lang-compiler-or-interpreter virtual package.
>
> There is obviously a trade off here -- the need to the
> development package to be useful on installation, by ensuring that the
> tools required to use the package are also installed, versus the need
> to allow people to use the package with alternate developer tools. Ar
> there other considerations and use cases you have in mind?

I can't speak for Bernhard of course, but my opinion is that such
dependencies of any sort are redundant. The development packages are
not usable by themselves, they are used by programs. If it's a dev
package for a C library that is used in a C program you want to compile,
then it's your program depending on the C compiler already. If it's a
module for Python used in a Python program, then the program depends on
the Python interpreter already.

I can't think of a scenario where the dev package would depend on a
compiler or interpreter that wouldn't be depended on by the actual user
(the program) of the package. They are used in an environment where the
dependency would by necessity already be fulfilled.

--
Andreas Bombe <bombe@informatik.tu-muenchen.de> GPG key 0x04880A44


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-07-2008, 11:49 PM
Manoj Srivastava
 
Default Should -dev packages providing .pc files depend on pkg-config?

On Mon, 7 Apr 2008 23:21:51 +0200, Andreas Bombe <bombe@informatik.tu-muenchen.de> said:

> On Mon, Apr 07, 2008 at 01:14:50PM -0500, Manoj Srivastava wrote:
>> On Mon, 7 Apr 2008 18:20:56 +0200, Bernhard R Link
>> <brlink@debian.org> said:
>> > Here I have to contradict. No -dev package should ever depend on a
>> > compiler or linker, even if that tool was not already in
>> > build-essentials.
>>
>> Can you provide some rationale for this assertion? I can see why one
>> might not tie the development tool very strongly with a particular
>> compiler or compiler version, to allow a developer to use it with an
>> alternative development tool, but I can see why one may want to
>> depend on a generic foo-lang-compiler-or-interpreter virtual package.
>>
>> There is obviously a trade off here -- the need to the development
>> package to be useful on installation, by ensuring that the tools
>> required to use the package are also installed, versus the need to
>> allow people to use the package with alternate developer tools. Ar
>> there other considerations and use cases you have in mind?

> I can't speak for Bernhard of course, but my opinion is that such
> dependencies of any sort are redundant. The development packages are
> not usable by themselves, they are used by programs. If it's a dev
> package for a C library that is used in a C program you want to
> compile, then it's your program depending on the C compiler already.
> If it's a module for Python used in a Python program, then the program
> depends on the Python interpreter already.

I am not sure I find this argument convincing. For
dependencies, we have ruled that if a package depends on library A, and
that library depends on library B, the package in question should
still only mention library A only -- and let libA's dependencies pull in
libB.

In this case, again, if my dev package requires a tool not in
build depends now, I should declare it, for the same reason -- the next
upload of the dev package might have different tools, or eliminate
tools -- and putting that build dependency in all the packages that
use my dev package is hard -- especially when we consider the cases
when the scenarios where these dependencies might change over time.

manoj
--
The truth about a man lies first and foremost in what he hides. Andre
Malraux
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-08-2008, 05:12 AM
Steve Langasek
 
Default Should -dev packages providing .pc files depend on pkg-config?

On Mon, Apr 07, 2008 at 06:49:24PM -0500, Manoj Srivastava wrote:
> > I can't speak for Bernhard of course, but my opinion is that such
> > dependencies of any sort are redundant. The development packages are
> > not usable by themselves, they are used by programs. If it's a dev
> > package for a C library that is used in a C program you want to
> > compile, then it's your program depending on the C compiler already.
> > If it's a module for Python used in a Python program, then the program
> > depends on the Python interpreter already.

> I am not sure I find this argument convincing. For
> dependencies, we have ruled that if a package depends on library A, and
> that library depends on library B, the package in question should
> still only mention library A only -- and let libA's dependencies pull in
> libB.

Any package that wants to use .pc files during its build is going to invoke
pkg-config directly, and changing your -dev package to recommend a different
means of linking to the library won't cause this reference to disappear.
That's a build-dependency.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 06:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org