Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   Should -dev packages providing .pc files depend on pkg-config? (http://www.linux-archive.org/debian-development/64399-should-dev-packages-providing-pc-files-depend-pkg-config.html)

Simon Richter 04-04-2008 10:38 PM

Should -dev packages providing .pc files depend on pkg-config?
 
Hi,

> 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.

Simon


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

Roberto C. Sánchez 04-04-2008 11:28 PM

Should -dev packages providing .pc files depend on pkg-config?
 
On Sat, Apr 05, 2008 at 12:38:34AM +0200, Simon Richter wrote:
> Hi,
>
> > 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.
>
Except that a -dev package can be perfectly functional without
pkg-config. So, in that case it should not be a dependency, but a
recommends.

Regards,

-Roberto

--
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

Simon Richter 04-05-2008 12:09 AM

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.

> Except that a -dev package can be perfectly functional without
> pkg-config. So, in that case it should not be a dependency, but a
> recommends.

With a recommends, foo will still need to declare a build dependency.

Simon


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

Stephen Gran 04-05-2008 02:00 AM

Should -dev packages providing .pc files depend on pkg-config?
 
This one time, at band camp, Simon Richter said:
> 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.
>
> > Except that a -dev package can be perfectly functional without
> > pkg-config. So, in that case it should not be a dependency, but a
> > recommends.
>
> With a recommends, foo will still need to declare a build dependency.

Since foo expects to run pkg-config from it's ./configure, that
seems entirely reasonable.
--
-----------------------------------------------------------------
| ,'`. Stephen Gran |
| : :' : sgran@debian.org |
| `. `' Debian user, admin, and developer |
| `- http://www.debian.org |
-----------------------------------------------------------------

Tollef Fog Heen 04-05-2008 07:17 AM

Should -dev packages providing .pc files depend on pkg-config?
 
* Simon Richter

| Hi,
|
| > 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.

Unless I'm misunderstanding you here; I think you are confused.

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 only edge case I can think of is if libbar provides
some Autoconf macros that wrap pkg-config, libbar-dev should suggest
or recommend pkg-config, but Autoconf macros don't really map to
build-depends/depends, they are more like a development-depends.

--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


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

Hendrik Sattler 04-05-2008 09:31 AM

Should -dev packages providing .pc files depend on pkg-config?
 
Am Samstag 05 April 2008 schrieb Tollef Fog Heen:
> 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.

_If_ they do. Please consider the possibility that an application developer
links to libbar without using pkg-config. pkg-config is _not_ part of an API,
it is only a tool that _can_ be used, not must.
Putting pkg-config on Recommends of Suggests of every -dev packages that has
a .pc file, you could as well put it into built-essential dependency.

HS


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

Tollef Fog Heen 04-05-2008 02:52 PM

Should -dev packages providing .pc files depend on pkg-config?
 
* Hendrik Sattler

| Am Samstag 05 April 2008 schrieb Tollef Fog Heen:
| > 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.
|
| _If_ they do. Please consider the possibility that an application
| developer links to libbar without using pkg-config. pkg-config is
| _not_ part of an API, it is only a tool that _can_ be used, not
| must.

That depends on the library you are linking against. I, as an library
author is free to say «the only supported way to use my gargleblaster
library is through the I_CAN_HAS_GARGELBLASTER autoconf macro» (which
then proceeds to set GARGLEBLASTER_CFLAGS and GARGLEBLASTER_LIBS by
using pkg-config). If I do that, pkg-config is effectively part of
the API.

| Putting pkg-config on Recommends of Suggests of every -dev packages
| that has a .pc file, you could as well put it into built-essential
| dependency.

Build-essential is for something else, and I hope you did not
interpret what I said (and which you removed from my quote above) as
disagreeing with that.

--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

"brian m. carlson" 04-05-2008 03:30 PM

Should -dev packages providing .pc files depend on pkg-config?
 
On Sat, Apr 05, 2008 at 04:52:29PM +0200, Tollef Fog Heen wrote:

That depends on the library you are linking against. I, as an library
author is free to say «the only supported way to use my gargleblaster
library is through the I_CAN_HAS_GARGELBLASTER autoconf macro» (which
then proceeds to set GARGLEBLASTER_CFLAGS and GARGLEBLASTER_LIBS by
using pkg-config). If I do that, pkg-config is effectively part of
the API.


If the only supported way to link against your library is to use the
autotools, you should be shot, especially if libtool is anywhere in the
equation. Not everybody uses the autotools, and their only benefit is
portability.


Secondly, Debian is not necessarily in the business of doing everything
upstream authors want. I remember Mozilla was quite upset when we
started shipping shared libraries of their components (XUL, NSS, etc.),
because their way was to statically link a stub and then dlopen the
modules. Debian decided that was not the way that best served our
users, and proceeded to ignore their recommendation[0].


I think it is safe to say that Debian supports passing the appropriate
command line arguments without using pkg-config, even if upstream does
not. At least that seems to be my experience.


[0] Google for "Mozilla Debian shared library"

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

"Bernhard R. Link" 04-05-2008 04:05 PM

Should -dev packages providing .pc files depend on pkg-config?
 
* Tollef Fog Heen <tfheen@err.no> [080405 16:53]:
> That depends on the library you are linking against. I, as an library
> author is free to say «the only supported way to use my gargleblaster
> library is through the I_CAN_HAS_GARGELBLASTER autoconf macro» (which
> then proceeds to set GARGLEBLASTER_CFLAGS and GARGLEBLASTER_LIBS by
> using pkg-config). If I do that, pkg-config is effectively part of
> the API.

This might be a reason to make it a Recommend instead of a Suggests,
but a Depends would still be too much in my eyes.

(And I hope it would set GARGLEBLASTER_CPPFLAGS intead of
GARBLEBLASTER_CFLAGS to avoid pusing the misnaming withing pkg-config
even further).

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

William Pitcock 04-05-2008 05:12 PM

Should -dev packages providing .pc files depend on pkg-config?
 
Hi,

On Sat, 2008-04-05 at 15:30 +0000, brian m. carlson wrote:
> I think it is safe to say that Debian supports passing the
> appropriate
> command line arguments without using pkg-config, even if upstream
> does
> not. At least that seems to be my experience.

Yes, but people depending on this point will find that their code does
not work correctly on non-Debian platforms, which is most likely a
disservice to our users in reality.

William


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

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.