Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Tollef Fog Heen

Martijn van Oosterhout skrev:


Which is all crap. Yes, this is the list you need for static, but
pkg-config is recursing through modules even for dynamic linking which
is wrong. Now either pkg-config of the gtk+2 pc file needs to be
fixed, then you can start recompiling all the affected programs...


The gtk+2 .pc file needs to be changed to mark a bunch of those Requires 
as Requires.private, pkg-config provides all the necessary 
infrastructure now.  (If not, please do file bugs.)


- tfheen


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Martijn van Oosterhout

On 9/28/06, Tollef Fog Heen [EMAIL PROTECTED] wrote:

Martijn van Oosterhout skrev:

 Which is all crap. Yes, this is the list you need for static, but
 pkg-config is recursing through modules even for dynamic linking which
 is wrong. Now either pkg-config of the gtk+2 pc file needs to be
 fixed, then you can start recompiling all the affected programs...

The gtk+2 .pc file needs to be changed to mark a bunch of those Requires
as Requires.private, pkg-config provides all the necessary
infrastructure now.  (If not, please do file bugs.)


Ok, the reduces the libs list, but it also reduces the cflags list. So
much so that you can't actually compile anything gtk-related.

It'd be nice if there was a way to specify package that should be
included for the purposes cflags, but excluded for the libs.

Have a nice day,
--
Martijn van Oosterhout [EMAIL PROTECTED] http://svana.org/kleptog/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Kurt Roeckx
On Thu, Sep 28, 2006 at 04:17:39PM +0200, Martijn van Oosterhout wrote:
 
 The gtk+2 .pc file needs to be changed to mark a bunch of those Requires
 as Requires.private, pkg-config provides all the necessary
 infrastructure now.  (If not, please do file bugs.)
 
 Ok, the reduces the libs list, but it also reduces the cflags list. So
 much so that you can't actually compile anything gtk-related.

Note that Requires.private is used for cflags since the last version
of pkg-config.  Please see http://bugs.debian.org/340904


Kurt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Loïc Minier
On Thu, Sep 28, 2006, Tollef Fog Heen wrote:
 Which is all crap. Yes, this is the list you need for static, but
 pkg-config is recursing through modules even for dynamic linking which
 is wrong. Now either pkg-config of the gtk+2 pc file needs to be
 fixed, then you can start recompiling all the affected programs...
 The gtk+2 .pc file needs to be changed to mark a bunch of those Requires 
 as Requires.private, pkg-config provides all the necessary 
 infrastructure now.  (If not, please do file bugs.)

 Patching of gtk+-2.0.pc and friends is on the TODO, but will be
 implemented in the 2.10.x series, not in 2.8.  pango*.pc would have
 been my guinea pigs, but I'm not sure it's worth the risk so close to
 release now.

 Thanks for the reminder!

-- 
Loïc Minier [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Martijn van Oosterhout

On 9/28/06, Kurt Roeckx [EMAIL PROTECTED] wrote:

Note that Requires.private is used for cflags since the last version
of pkg-config.  Please see http://bugs.debian.org/340904


Well, then something wierd is going on. I have 0.21-1 installed and I
get this. This first time is with Requires, the second is with
Requires.private. My understanding is that the results should be the
same?

vali:/usr/lib/pkgconfig# dpkg -l pkg-config
snip
ii  pkg-config 0.21-1 manage
compile and link flags for libraries
vali:/usr/lib/pkgconfig# pkg-config --cflags gtk+-2.0
-DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/freetype2
-I/usr/include/libpng12
vali:/usr/lib/pkgconfig# joe gtk+-2.0.pc

editted Requires to Requires.private

File gtk+-2.0.pc saved.
vali:/usr/lib/pkgconfig# pkg-config --cflags gtk+-2.0
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo

--
Martijn van Oosterhout [EMAIL PROTECTED] http://svana.org/kleptog/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Mike Hommey
On Thu, Sep 28, 2006 at 10:20:18PM +0200, Martijn van Oosterhout [EMAIL 
PROTECTED] wrote:
 On 9/28/06, Kurt Roeckx [EMAIL PROTECTED] wrote:
 Note that Requires.private is used for cflags since the last version
 of pkg-config.  Please see http://bugs.debian.org/340904
 
 Well, then something wierd is going on. I have 0.21-1 installed and I
 get this. This first time is with Requires, the second is with
 Requires.private. My understanding is that the results should be the
 same?
 
 vali:/usr/lib/pkgconfig# dpkg -l pkg-config
 snip
 ii  pkg-config 0.21-1 manage
 compile and link flags for libraries
 vali:/usr/lib/pkgconfig# pkg-config --cflags gtk+-2.0
 -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
 -I/usr/X11R6/include -I/usr/include/glib-2.0
 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2
 -I/usr/include/libpng12
 vali:/usr/lib/pkgconfig# joe gtk+-2.0.pc
 
 editted Requires to Requires.private
 
 File gtk+-2.0.pc saved.
 vali:/usr/lib/pkgconfig# pkg-config --cflags gtk+-2.0
 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
 -I/usr/include/atk-1.0 -I/usr/include/cairo

I don't know what pkg-config is supposed to do, but surely you don't
need the freetype2 nor the pango, nor the X11 includes files to build
gtk applications.

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Martijn van Oosterhout

On 9/28/06, Mike Hommey [EMAIL PROTECTED] wrote:

 vali:/usr/lib/pkgconfig# pkg-config --cflags gtk+-2.0
 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
 -I/usr/include/atk-1.0 -I/usr/include/cairo

I don't know what pkg-config is supposed to do, but surely you don't
need the freetype2 nor the pango, nor the X11 includes files to build
gtk applications.


Have you tried?

Try a simple #include gtk/gtk.h and you get errors like this:

In file included from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
from /usr/include/gtk-2.0/gdk/gdk.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from gtktest.c:10:
/usr/include/gtk-2.0/gdk/gdktypes.h:33:25: error: pango/pango.h: No
such file or directory
In file included from /usr/include/gtk-2.0/gdk/gdk.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from gtktest.c:10:
/usr/include/gtk-2.0/gdk/gdkcairo.h:25:30: error: pango/pangocairo.h:
No such file or directory

If you add /usr/include/pango-1.0 it works.

Perhaps Requires.private is not recursive? It's not mentioned in the
manpage, but I would've expected the there to be no difference between
Requires and Requires.private when looking at cflags. At least, that's
my interpretation of this thread.

Have a nice day,
--
Martijn van Oosterhout [EMAIL PROTECTED] http://svana.org/kleptog/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Kurt Roeckx
On Thu, Sep 28, 2006 at 10:20:18PM +0200, Martijn van Oosterhout wrote:
 On 9/28/06, Kurt Roeckx [EMAIL PROTECTED] wrote:
 Note that Requires.private is used for cflags since the last version
 of pkg-config.  Please see http://bugs.debian.org/340904
 
 Well, then something wierd is going on. I have 0.21-1 installed and I
 get this. This first time is with Requires, the second is with
 Requires.private. My understanding is that the results should be the
 same?

Afaik, they should, so I suggest you file a bug.


Kurt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Mike Hommey
On Thu, Sep 28, 2006 at 10:40:43PM +0200, Martijn van Oosterhout [EMAIL 
PROTECTED] wrote:
 On 9/28/06, Mike Hommey [EMAIL PROTECTED] wrote:
  vali:/usr/lib/pkgconfig# pkg-config --cflags gtk+-2.0
  -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
  -I/usr/include/atk-1.0 -I/usr/include/cairo
 
 I don't know what pkg-config is supposed to do, but surely you don't
 need the freetype2 nor the pango, nor the X11 includes files to build
 gtk applications.
 
 Have you tried?
 
 Try a simple #include gtk/gtk.h and you get errors like this:
 
 In file included from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
 from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
 from /usr/include/gtk-2.0/gdk/gdk.h:30,
 from /usr/include/gtk-2.0/gtk/gtk.h:31,
 from gtktest.c:10:
 /usr/include/gtk-2.0/gdk/gdktypes.h:33:25: error: pango/pango.h: No
 such file or directory
 In file included from /usr/include/gtk-2.0/gdk/gdk.h:30,
 from /usr/include/gtk-2.0/gtk/gtk.h:31,
 from gtktest.c:10:
 /usr/include/gtk-2.0/gdk/gdkcairo.h:25:30: error: pango/pangocairo.h:
 No such file or directory
 
 If you add /usr/include/pango-1.0 it works.

Oh my...

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-28 Thread Hendrik Sattler
Am Donnerstag 28 September 2006 21:14 schrieb Kurt Roeckx:
 Note that Requires.private is used for cflags since the last version
 of pkg-config.

Interesting but maybe documenting Requires.private would be a good idea?
Hint: the manpage only mentions Libs.private, see #341977 #346602.
And 9 months is quite some time :-/

How shall I convince upstream to do it right if pkg-config upstream does not 
document it? Fixing it only in Debian does not quite convince upstream...

HS


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Kevin B. McCarty
Christian Aichinger wrote:

 As a start, I've written a script that searches for unnecessary
 dependencies and reports them. Results are available here:
 http://rerun.lefant.net/checklib
 
 More detailed information about the meaning of the results are
 available on the web page, the two most important points are
 problems and errors.
 
 A problem means that the package has useless dependencies on
 library packages. This causes the kind of trouble outlined above and
 should be fixed. A HOWTO is here:
 http://rerun.lefant.net/checklib/howto-fix-problems.html

In case it's of interest to anyone, I went through the checklib logs
available on the web page for problems and found the libraries that
are most often listed as bogus dependencies.  Here are the top twenty
offenders, listed with the number of packages that (according to
checklib) have each as an unnecessary dependency:

1663: libxext6
1275: libxi6
1196: zlib1g
1174: libx11-6
949: libice6
948: libsm6
940: libfontconfig1
923: libxrender1
918: libxinerama1
918: libxcursor1
905: libxrandr2
697: libatk1.0-0
688: libcairo2
636: libgcc1
610: libxfixes3
536: libpango1.0-0
480: libpng12-0
424: libfreetype6
394: libart-2.0-2
386: libxml2

Most of these are X-related, suggesting that quite a lot of .la and .pc
files are pretty indiscriminate about which X libs they link in.

I used the attached (fairly trivial) script to scan through the log
files.  It is pretty dependent on the exact file format of the logs, though.

regards,

-- 
Kevin B. McCarty [EMAIL PROTECTED]   Physics Department
WWW: http://www.princeton.edu/~kmccarty/Princeton University
GPG: public key ID 4F83C751 Princeton, NJ 08544
#!/bin/sh

if [ $1 = download ] ; then
wget -r --level=1 'http://rerun.lefant.net/checklib/status.PROBLEM.html'
fi

rm -f reverse-deps.txt
touch reverse-deps.txt

for file in rerun.lefant.net/checklib/log.*.html ; do
for lib in `grep -B 1 '^RESULT: PROBLEMS' $file | head -n 1 | tr -d ,` ; do
line=`grep '[:] '$lib'$' reverse-deps.txt`
if [ -n $line ] ; then
n=`echo $line | awk '{print $1}' | tr -d ':'`
n2=$(( $n + 1 ))
sed -i 's/^'$n'\(: '$lib'\)$/'$n2'\1'/ reverse-deps.txt
else
echo '1: '$lib  reverse-deps.txt
fi
done
done

sort -n  reverse-deps.txt  tmp
mv -f tmp reverse-deps.txt


Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Mikhail Gusarov

You ([EMAIL PROTECTED]) wrote:

 KBM Most of these are X-related, suggesting that quite a lot of .la
 KBM and .pc files are pretty indiscriminate about which X libs they
 KBM link in.

Will this problem disappear if end programs will pass --as-needed flag
to the ld command line?

-- 
JID: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Bastian Venthur
Mikhail Gusarov wrote:
 You ([EMAIL PROTECTED]) wrote:
 
  KBM Most of these are X-related, suggesting that quite a lot of .la
  KBM and .pc files are pretty indiscriminate about which X libs they
  KBM link in.
 
 Will this problem disappear if end programs will pass --as-needed flag
 to the ld command line?

I asked myself the very same question a few weeks ago, but someone said
that too much black magic is involved with this parameter -- whatever
this means.

The main problem seems to be, that relibtoolizing seems to be too
complicated and error prone so many developers just skip this part.

So I think we need an easy (automatic) solution in order to get rid of
this problem once and for all.


Cheers,

Bastian

-- 
Bastian Venthur
http://venthur.de


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Kevin B. McCarty
Mikhail Gusarov wrote:
 You ([EMAIL PROTECTED]) wrote:
 
  KBM Most of these are X-related, suggesting that quite a lot of .la
  KBM and .pc files are pretty indiscriminate about which X libs they
  KBM link in.
 
 Will this problem disappear if end programs will pass --as-needed flag
 to the ld command line?

In many cases, yes, but there may be some breakage.  I'm by no means a
binutils expert, but following are the caveats I'm aware of.

A little before the release of Sarge, there was a discussion about
whether to do this by default:
http://lists.debian.org/debian-devel/2005/04/msg2.html

There is some concern that ld may strip away libraries that provide
constructors and destructors using this option.  See Gabor's emails in
the old thread:
http://lists.debian.org/debian-devel/2005/04/msg2.html
and in this thread:
http://lists.debian.org/debian-devel/2006/09/msg00908.html

There is also concern that some libraries do *not* link against other
libraries they need, leaving it up to the end program to link them in.
Suppose libA.so uses symbols from libB.so, but doesn't link it.  (This
is arguably broken, but it happens.  But IMO a bug should be filed on
such libraries.)  Someone then writes program C, which uses symbols only
from libA.so, not from libB.so.  Nevertheless, linking program C
requires -lA -lB.  I think --as-needed will break in those cases.

Further, --as-needed doesn't work when creating shared libraries (at
least it didn't at the time I experimented with it; instead it stripped
out *all* NEEDED entries from the .so file!) so it won't help with those
cases of unnecessary dependencies.

Finally, if you use --as-needed in a Debian package, you'll want to have
a versioned Build-Depends on binutils (= 2.16.1cvs20050902-1) to ensure
you avoid http://bugs.debian.org/320697 .

regards,

-- 
Kevin B. McCarty [EMAIL PROTECTED]   Physics Department
WWW: http://www.princeton.edu/~kmccarty/Princeton University
GPG: public key ID 4F83C751 Princeton, NJ 08544


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Kurt Roeckx
On Tue, Sep 26, 2006 at 11:41:33PM +0700, Mikhail Gusarov wrote:
 
 You ([EMAIL PROTECTED]) wrote:
 
  KBM Most of these are X-related, suggesting that quite a lot of .la
  KBM and .pc files are pretty indiscriminate about which X libs they
  KBM link in.
 
 Will this problem disappear if end programs will pass --as-needed flag
 to the ld command line?

--as-needed basicly does the same as checklib.  They both might say that
some library isn't needed while it actually is.  It might work in most
cases, but it might break in others.

The best solution is to avoid telling the linker it should be linking to
that library, but that might be hard in some cases.


Kurt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Kurt Roeckx
On Tue, Sep 26, 2006 at 09:36:08AM -0700, Kevin B. McCarty wrote:
 
 In case it's of interest to anyone, I went through the checklib logs
 available on the web page for problems and found the libraries that
 are most often listed as bogus dependencies.  Here are the top twenty
 offenders, listed with the number of packages that (according to
 checklib) have each as an unnecessary dependency:
 
 1663: libxext6
out of 2061 packages that have a Depends on it on 
unstable/amd64, so that's about 80%

 1275: libxi6
out of 1393: 91%

 1196: zlib1g
out of 1796: 66%

 1174: libx11-6
out of 2502: 47%

 949: libice6
out of 983: 96%

 948: libsm6
out of 976: 97%

 940: libfontconfig1
out of 1136: 82%

 923: libxrender1
out of 1071: 86%

 918: libxinerama1
out of 1093: 84%

 918: libxcursor1
out of 1053: 87%

 905: libxrandr2
out of 1049: 86%

 697: libatk1.0-0
out of 850: 82%

 688: libcairo2
out of 865: 79%

 636: libgcc1
out of 2277: 28%

 610: libxfixes3
out of 653: 93%

 536: libpango1.0-0
out of 881: 71%

 480: libpng12-0
out of 753: 64%

 424: libfreetype6
out of 596: 71%

 394: libart-2.0-2
out of 444: 89%

 386: libxml2
out of 790: 49%



Kurt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Christian Aichinger
On Tue, Sep 26, 2006 at 09:36:08AM -0700, Kevin B. McCarty wrote:
 In case it's of interest to anyone, I went through the checklib logs
 available on the web page for problems and found the libraries that
 are most often listed as bogus dependencies.

This seriously rocks. Thanks.

Actually that should be terribly easy to get this out of the DB
checklib uses, but it isn't, mostly due to lazyness on my side.

Might I include your script in checklib (under GPLv2+, if possible),
and put the results on a seperate page on rerun.lefant.net/checklib?

Cheers,
Christian Aichinger


signature.asc
Description: Digital signature


Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Christian Aichinger
On Tue, Sep 26, 2006 at 11:41:33PM +0700, Mikhail Gusarov wrote:
 Will this problem disappear if end programs will pass --as-needed flag
 to the ld command line?

As described in the other mails, --as-needed is a hack, and can
cause trouble.

I've also thought of a debhelper script stipping out useless NEEDED
entries, but that suffers from the same problems as --as-needed
(mostly related to init/fini functions).

On IRC the idea came up to include such checks in piuparts, however
I haven't yet investigated how this would fit with its architecture
(conceptionally it should be the right place, though).

It's really quite sad that we can't easily automate such checks
during package build, as that would be the easiest way to get rid of
all the dependencies.

Cheers,
Christian Aichinger


signature.asc
Description: Digital signature


Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Kevin B. McCarty
Christian Aichinger wrote:

 On Tue, Sep 26, 2006 at 09:36:08AM -0700, Kevin B. McCarty wrote:
 In case it's of interest to anyone, I went through the checklib
 logs available on the web page for problems and found the
 libraries that are most often listed as bogus dependencies.
 
 This seriously rocks. Thanks.
 
 Actually that should be terribly easy to get this out of the DB 
 checklib uses, but it isn't, mostly due to lazyness on my side.
 
 Might I include your script in checklib (under GPLv2+, if possible), 
 and put the results on a seperate page on rerun.lefant.net/checklib?

Yes, sure!  You'll probably want to make serious improvements to it
since it was just something I whipped out very quickly.  I hereby
license the script under the MIT license, to wit:

 Copyright (c) 2006 Kevin B. McCarty
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 Software), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:
 
 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.

(This is of course GPL-compatible :-)

Is there any chance you could also have it output the percentage of
dependencies on each library which are unnecessary (as Kurt did in
http://lists.debian.org/debian-devel/2006/09/msg00940.html )?

best regards,

-- 
Kevin B. McCarty [EMAIL PROTECTED]   Physics Department
WWW: http://www.princeton.edu/~kmccarty/Princeton University
GPG: public key ID 4F83C751 Princeton, NJ 08544



signature.asc
Description: OpenPGP digital signature


Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Martijn van Oosterhout

On 9/26/06, Mikhail Gusarov [EMAIL PROTECTED] wrote:


You ([EMAIL PROTECTED]) wrote:

 KBM Most of these are X-related, suggesting that quite a lot of .la
 KBM and .pc files are pretty indiscriminate about which X libs they
 KBM link in.

Will this problem disappear if end programs will pass --as-needed flag
to the ld command line?


Some of it is also pkg-config's fault. For example, anyone using
pkg-config with gtk+2 gets the following:

# pkg-config --libs gtk+-2.0
-L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lXrandr -lXi -lXinerama
-lXext -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig
-lXcursor -lpango-1.0 -lcairo -lXrender -lX11 -lgobject-2.0
-lgmodule-2.0 -ldl -lglib-2.0

Which is all crap. Yes, this is the list you need for static, but
pkg-config is recursing through modules even for dynamic linking which
is wrong. Now either pkg-config of the gtk+2 pc file needs to be
fixed, then you can start recompiling all the affected programs...

Some of the discussion in bug #340904 is relevent here.

Have a nice day,
--
Martijn van Oosterhout [EMAIL PROTECTED] http://svana.org/kleptog/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Bernhard R. Link
* Kevin B. McCarty [EMAIL PROTECTED] [060926 18:37]:
 Most of these are X-related, suggesting that quite a lot of .la and .pc
 files are pretty indiscriminate about which X libs they link in.

There is also AC_PATH_XTRA, which just adds all X stuff when only few
may be needed.

Also note that Xt libs (Xt, Xaw, Xaw3d) sometimes have funny effects as the
order they are linked against can make a difference sometimes.

Hochachtungsvoll,
  Bernhard R. Link

-- 
Sendmail is like emacs: A nice operating system, but missing
an editor and a MTA.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Josselin Mouette
Le mardi 26 septembre 2006 à 09:36 -0700, Kevin B. McCarty a écrit :
 In case it's of interest to anyone, I went through the checklib logs
 available on the web page for problems and found the libraries that
 are most often listed as bogus dependencies.  Here are the top twenty
 offenders, listed with the number of packages that (according to
 checklib) have each as an unnecessary dependency:
[lots of X libraries]

For those interested in reducing such dependencies, the GNOME team is
using Mike Hommey's hack to strip indirect dependencies from .la files:

for file in $(wildcard debian/$(cdbs_curpkg)/usr/lib/*.la); do \
sed -i /dependency_libs/ s/'.*'/''/ $$file ; \
done

Currently this is mostly done for experimental GNOME 2.16 packages, but
it has dramatically cut off some dependencies. It also helps building a
path towards complete removal of .la files, which we hope to achieve for
GNOME packages in etch+1.
-- 
 .''`.   Josselin Mouette/\./\
: :' :   [EMAIL PROTECTED]
`. `'[EMAIL PROTECTED]
  `-  Debian GNU/Linux -- The power of freedom


signature.asc
Description: Ceci est une partie de message	numériquement signée


Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Hamish Moffatt
On Tue, Sep 26, 2006 at 09:23:23PM +0200, Martijn van Oosterhout wrote:
 Will this problem disappear if end programs will pass --as-needed flag
 to the ld command line?
 
 Some of it is also pkg-config's fault. For example, anyone using
 pkg-config with gtk+2 gets the following:
 
 # pkg-config --libs gtk+-2.0
 -L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lXrandr -lXi -lXinerama
 -lXext -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig
 -lXcursor -lpango-1.0 -lcairo -lXrender -lX11 -lgobject-2.0
 -lgmodule-2.0 -ldl -lglib-2.0
 
 Which is all crap. Yes, this is the list you need for static, but

gtk1.2 also seems to be noisy; at least two of my packages (libstroke,
mtrack) pick up a ton of apparently unneeded deps from gtk-config;

[8:48am] [EMAIL PROTECTED]:ham/mtrack/mtrack-0.3 pkg-config gtk --libs
-rdynamic -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXi 
-lXext -lX11 -lm

The pkg-config results are the same:

[8:48am] [EMAIL PROTECTED]:ham/mtrack/mtrack-0.3 gtk-config --libs
-L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi 
-lXext -lX11 -lm

checklib reports that libdl, libXi, libXext and libX11 all become
unnecessary dependencies of the mtrack package as a result.

Hamish
-- 
Hamish Moffatt VK3SB [EMAIL PROTECTED] [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

2006-09-26 Thread Loïc Minier
On Tue, Sep 26, 2006, Josselin Mouette wrote:
 for file in $(wildcard debian/$(cdbs_curpkg)/usr/lib/*.la); do \
 sed -i /dependency_libs/ s/'.*'/''/ $$file ; \
 done

 To use this feature, if you use CDBS, simply:
include /usr/share/gnome-pkg-tools/1/rules/clean-la.mk
 and build-dep on gnome-pkg-tools = 0.7.

 I'm using it as follow in my non-CDBS packages:
sed -i /dependency_libs/ s/'.*'/''/ debian/$(DEV_PKG)/usr/lib/*.la

-- 
Loïc Minier [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]