Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #195279 > unrolled thread
| Started by | Alexander Traud <pabstraud@compuserve.com> |
|---|---|
| First post | 2018-05-04 15:50 +0200 |
| Last post | 2018-06-11 13:40 +0200 |
| Articles | 8 — 4 participants |
Back to article view | Back to linux.debian.user
pkg-config: required as dep so often - How and where to report? Alexander Traud <pabstraud@compuserve.com> - 2018-05-04 15:50 +0200
Re: pkg-config: required as dep so often - How and where to report? Greg Wooledge <wooledg@eeg.ccf.org> - 2018-05-04 16:00 +0200
Re: pkg-config: required as dep so often - How and where to report? Sven Joachim <svenjoac@gmx.de> - 2018-05-04 17:30 +0200
Re: pkg-config: required as dep so often - How and where to report? Greg Wooledge <wooledg@eeg.ccf.org> - 2018-05-04 17:40 +0200
Re: pkg-config: required as dep so often - How and where to report? Sven Joachim <svenjoac@gmx.de> - 2018-05-04 17:50 +0200
Re: pkg-config: required as dep so often - How and where to report? Alexander Traud <pabstraud@compuserve.com> - 2018-05-05 12:40 +0200
Re: pkg-config: required as dep so often - How and where to report? deloptes <deloptes@gmail.com> - 2018-05-05 20:50 +0200
Re: pkg-config: required as dep so often - How and where to report? Alexander Traud <pabstraud@compuserve.com> - 2018-06-11 13:40 +0200
| From | Alexander Traud <pabstraud@compuserve.com> |
|---|---|
| Date | 2018-05-04 15:50 +0200 |
| Subject | pkg-config: required as dep so often - How and where to report? |
| Message-ID | <vLJfX-8mH-7@gated-at.bofh.it> |
To compile a (quite large) project, I had to install several packages (dependencies). The project required the tool pkg-config. However, that was not mentioned anywhere. Still the project compiled/built, because one of the other dependencies (libsrtp2-dev) installed pkg-config as side effect. So, I had pure luck that it succeeded. When a package declares another package as "Depends" or "Recommends" in the file "control.in", it gets installed as side effect (Debian Policy). However, libsrtp2-dev needs pkg-config only when I compile it myself. Consequently, pkg-config should be declared just as Build-Depends. This is a minor bug, I am going to report with that package. However then, I investigated a bit more and found seven (optional) dependencies of that project which would have installed pkg-config as a side effect too. OK, this is a bigger issue. Then I investigated further: $ apt-cache rdepends --no-suggests pkg-config On Ubuntu 18.04 LTS, this gives me 250 development packages (-dev) which install pkg-config as a side effect. $ apt-cache rdepends --no-recommends --no-suggests pkg-config Still 186 packages. Those packages come with a .pc file. However, the tool pkg-config should be "suggested" and not "required". Yes, this is a minor issue. However, this looks like a broad issue. How and where do I report something broad like this? Is there somebody which takes over or do I have to report this 250 times? Perhaps this qualifies even for an update of the Debian Policy like adding an example: pkg-config should be maximum of "Suggests" when .pc file exists, even when "Build-Depends" included pkg-config. Or am I on the complete wrong track and this is not even a minor bug?
[toc] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2018-05-04 16:00 +0200 |
| Message-ID | <vLJpD-8rq-1@gated-at.bofh.it> |
| In reply to | #195279 |
On Fri, May 04, 2018 at 03:48:26PM +0200, Alexander Traud wrote: > To compile a (quite large) project, I had to install several packages > (dependencies). The project required the tool pkg-config. However, that > was not mentioned anywhere. Still the project compiled/built, because > one of the other dependencies (libsrtp2-dev) installed pkg-config as > side effect. So, I had pure luck that it succeeded. libc6-dev depends on pkg-config, and build-essential depends on libc6-dev. So I don't think it's necessary. You're allowed to assume build-essential is installed, I believe.
[toc] | [prev] | [next] | [standalone]
| From | Sven Joachim <svenjoac@gmx.de> |
|---|---|
| Date | 2018-05-04 17:30 +0200 |
| Message-ID | <vLKOJ-10T-7@gated-at.bofh.it> |
| In reply to | #195280 |
On 2018-05-04 09:58 -0400, Greg Wooledge wrote:
> On Fri, May 04, 2018 at 03:48:26PM +0200, Alexander Traud wrote:
>> To compile a (quite large) project, I had to install several packages
>> (dependencies). The project required the tool pkg-config. However, that
>> was not mentioned anywhere. Still the project compiled/built, because
>> one of the other dependencies (libsrtp2-dev) installed pkg-config as
>> side effect. So, I had pure luck that it succeeded.
>
> libc6-dev depends on pkg-config,
Huh? No it doesn't:
$ apt-cache show libc6-dev | grep Depends
Depends: libc6 (= 2.27-3), libc-dev-bin (= 2.27-3), linux-libc-dev
Cheers,
Sven
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2018-05-04 17:40 +0200 |
| Message-ID | <vLKYp-14i-15@gated-at.bofh.it> |
| In reply to | #195282 |
On Fri, May 04, 2018 at 05:26:22PM +0200, Sven Joachim wrote:
> On 2018-05-04 09:58 -0400, Greg Wooledge wrote:
>
> > On Fri, May 04, 2018 at 03:48:26PM +0200, Alexander Traud wrote:
> >> To compile a (quite large) project, I had to install several packages
> >> (dependencies). The project required the tool pkg-config. However, that
> >> was not mentioned anywhere. Still the project compiled/built, because
> >> one of the other dependencies (libsrtp2-dev) installed pkg-config as
> >> side effect. So, I had pure luck that it succeeded.
> >
> > libc6-dev depends on pkg-config,
>
> Huh? No it doesn't:
>
> $ apt-cache show libc6-dev | grep Depends
> Depends: libc6 (= 2.27-3), libc-dev-bin (= 2.27-3), linux-libc-dev
Oh, sorry. I used apt-cache show libc6-dev and saw the super long list
of packages and versions that includes pkg-config, and missed the fact
that it was a Breaks: line instead of a Depends: line.
wooledg:~$ apt-cache depends libc6-dev
libc6-dev
Depends: libc6
Depends: libc-dev-bin
libc-dev-bin:i386
Depends: linux-libc-dev
Conflicts: <libc0.1-dev>
Conflicts: <libc0.3-dev>
Conflicts: <libc6.1-dev>
Breaks: binutils
Breaks: <binutils-gold>
Breaks: cmake
Breaks: <gcc-4.4>
Breaks: <gcc-4.5>
Breaks: <gcc-4.6>
Breaks: libhwloc-dev
Breaks: libjna-java
Breaks: liblouis-dev
Breaks: liblouisxml-dev
Breaks: make
Breaks: pkg-config
Suggests: glibc-doc
Suggests: manpages-dev
[toc] | [prev] | [next] | [standalone]
| From | Sven Joachim <svenjoac@gmx.de> |
|---|---|
| Date | 2018-05-04 17:50 +0200 |
| Message-ID | <vLL86-17R-15@gated-at.bofh.it> |
| In reply to | #195279 |
On 2018-05-04 15:48 +0200, Alexander Traud wrote:
> To compile a (quite large) project, I had to install several packages
> (dependencies). The project required the tool pkg-config. However, that
> was not mentioned anywhere. Still the project compiled/built, because
> one of the other dependencies (libsrtp2-dev) installed pkg-config as
> side effect. So, I had pure luck that it succeeded.
>
> When a package declares another package as "Depends" or "Recommends" in
> the file "control.in", it gets installed as side effect (Debian Policy).
In debian/control, not control.in. And Recommends may or not be
installed, depending on the admin's decision.
> However, libsrtp2-dev needs pkg-config only when I compile it myself.
I'm not sure I can parse that. The libsrtp2-dev package surely both
depends and build-depends on pkg-config.
> Consequently, pkg-config should be declared just as Build-Depends. This
> is a minor bug, I am going to report with that package. However then, I
> investigated a bit more and found seven (optional) dependencies of that
> project which would have installed pkg-config as a side effect too. OK,
> this is a bigger issue. Then I investigated further:
>
> $ apt-cache rdepends --no-suggests pkg-config
>
> On Ubuntu 18.04 LTS, this gives me 250 development packages (-dev)
> which install pkg-config as a side effect.
>
> $ apt-cache rdepends --no-recommends --no-suggests pkg-config
>
> Still 186 packages.
>
> Those packages come with a .pc file. However, the tool pkg-config should
> be "suggested" and not "required".
This very much depends on the package. If you cannot just link against
libfoo with -lfoo but need special linker flags, then IMHO libfoo-dev is
well advised to add pkg-config to Depends, for instance.
,----
| $ pkg-config --libs gtk+-3.0
| -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lfribidi -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
`----
You cannot really expect anyone to get this right without pkg-config,
and so libgtk-3-dev depends on pkg-config.
Cheers,
Sven
[toc] | [prev] | [next] | [standalone]
| From | Alexander Traud <pabstraud@compuserve.com> |
|---|---|
| Date | 2018-05-05 12:40 +0200 |
| Message-ID | <vM2LD-4b7-3@gated-at.bofh.it> |
| In reply to | #195284 |
>> libsrtp2-dev needs pkg-config only when I compile it myself. > The libsrtp2-dev package surely both depends and build-depends on > pkg-config. Yes, the package description (debian/control) does. The created files do not. I can compile, link, and run with libsrtp2.so without pkg-config. Actually for this package, the result of pkg-config is wrong (--cflags is empty, --libs lists -lpcap unnecessarily). However, that is another issue (although it might be the cause why it was declared as Depends). > [For libgtk-3-dev y]ou cannot really expect anyone to get this right > without pkg-config, and so libgtk-3-dev depends on pkg-config. Yes, my assumption might not be right for every package in that list. Therefore, I would love to see someone more experienced taking over this issue. Your argument is a strong argument for at least Suggests. However, even in this example, pkg-config is not required. In such a case, one can argue for Recommends instead of Suggests. Nevertheless, I would not go for Depends. That is what I am about. Perhaps someone sees a pattern and comes up with a general rule. For example: "Every package with a pkgconfig/*.pc file has to Suggest pkg-config†. If the shared library does not declare its dependencies itself, and additional libraries are required to run the shared library, pkg-config has to be Recommends. pkg-config should never be Depends because the developer might have other means to build." Again, the last sentence could be wrong if there is a dedicated config tool in the package itself, which actually relies on pkg-config. Another example: libxml2-dev » libicu-dev » libicu-le-hb-dev » libharfbuzz-dev » libglib2.0-dev » pkg-config Only because of the dependency graph, pkg-config must be installed. Again, pkg-config is not required to compile/link against libxml2. Actually, the package itself declares pkg-config just as Suggests. Perhaps this is a bad example as well, because there is a bug in the dependency graph. Anyway from that 250 packages, I have just looked in-depth into libxml2 and libsrtp2, yet. † That part of "my" rule would affect another several hundred packages.
[toc] | [prev] | [next] | [standalone]
| From | deloptes <deloptes@gmail.com> |
|---|---|
| Date | 2018-05-05 20:50 +0200 |
| Message-ID | <vMapQ-z9-5@gated-at.bofh.it> |
| In reply to | #195279 |
Alexander Traud wrote: > Or am I on the complete wrong track and this is not even a minor bug? IMO it is not really a bug, because I do not need pkg-config, to build some peace of code. pkg-config is needed in case you use the build scripts that require pkg-config, but the developer could not know which way you will go, so I think it is OK to not have it anywhere. Installing a *dev package suggest that you will use the header file. It does not suggest that you will use build scripts that require pkg-config. For example cmake projects offer macros that obsolete pkg-config and the developer do not know what exactly you will use to build your project. I see some developers put it in as suggested, depends or alike, but what is exactly the problem with not having it somewhere. The fun with Linux is that it is an adventure that never ends. You can of course request putting it in as suggested for example. regards
[toc] | [prev] | [next] | [standalone]
| From | Alexander Traud <pabstraud@compuserve.com> |
|---|---|
| Date | 2018-06-11 13:40 +0200 |
| Message-ID | <vZtl0-2xe-7@gated-at.bofh.it> |
| In reply to | #195279 |
On 04th of May 2018, Alexander Traud wrote:
<http://lists.debian.org/debian-user/2018/05/msg00048.html>
<http://issues.asterisk.org/jira/browse/ASTERISK-27555#comment-242108>
Do you have an idea, where I report this?
Do I report this just with those packages which affect me:
- libsrtp2-dev
- libglib2.0-dev
and they take over? Or do I report with somebody else, like another
mailing list?
By the way, how do I report correctly bugs in packages:
I am on Ubuntu and the originating package is libxml2-dev.
A) 4 reports: report on Ubuntu plus Debian and link those?
report with libxml2 plus libglib2.0 and link those? Or
B) 1 report: report just with the cause (Debian libglib2.0-dev)? Or
C) 2 reports: report just with Ubuntu and they report upstream.
Debian wrote:
> <http://www.debian.org/doc/manuals/maint-guide/dreq.html#control>
> <http://www.debian.org/doc/debian-policy/#document-ch-relationships>
I understand those documents in this way:
Not Depends but Recommends or Suggests.
deloptes wrote:
> You can of course request putting [pkg-config] in as suggested for
> example.
That is what I am about: Suggests. Especially because there are (at
least) three different pkg-config in the repository. I might want to
use another one.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web