GNU bug report logs -
#20437
ls links too many dynamic libraries
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Mon, 27 Apr 2015 05:31:02 UTC
Severity: normal
Tags: notabug
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20437 in the body.
You can then email your comments to 20437 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#20437
; Package
coreutils
.
(Mon, 27 Apr 2015 05:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 27 Apr 2015 05:31:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Currently GNU 'ls' dynamically links a whole bunch of libraries, libraries like
libpcre and liblzma. Can we figure out some way to remove the runtime
dependencies on these libraries? It's better if a core utility like 'ls' avoids
libthis and libthat unless the libraries are vital to its function, which these
shouldn't be.
I installed the attached patches to get rid of one unnecessary library, libacl,
on GNU/Linux. Can we do better and get rid of more dependencies? Perhaps using
techniques similar to what was used to get rid of libacl?
[0001-build-update-gnulib-submodule-to-latest.patch (text/x-patch, attachment)]
[0002-ls-on-GNU-Linux-remove-dependency-on-libacl.patch (text/x-patch, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#20437
; Package
coreutils
.
(Mon, 27 Apr 2015 06:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 20437 <at> debbugs.gnu.org (full text, mbox):
On 04/27/2015 07:30 AM, Paul Eggert wrote:
> --- a/bootstrap.conf
> +++ b/bootstrap.conf
...
> @@ -318,9 +319,9 @@ gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
> buildreq="\
> autoconf 2.64
> automake 1.11.2
> -autopoint -
> +autopoint 0.19.4
> bison -
> -gettext 0.18.1
> +gettext 0.19.4
> git 1.4.4
> gperf -
> gzip -
This gnulib update seems to bump the prerequisites for building
coreutils quite high - at least on a current openSUSE-13.2 system
building now fails:
./bootstrap
./bootstrap: Error: 'autopoint' version == 0.19.2 is too old
./bootstrap: 'autopoint' version >= 0.19.4 is required
./bootstrap: Error: 'gettext' version == 0.19.2 is too old
./bootstrap: 'gettext' version >= 0.19.4 is required
I know that we tend to use the newest gear, but IIRC from last time
we agreed on supporting at least the latest stable version of the
bigger distros to ease providing patches for regular (advanced) users.
What especially does gnulib need from 0.19.4? Could we work around
it?
Thanks & have a nice day,
Berny
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#20437
; Package
coreutils
.
(Mon, 27 Apr 2015 07:28:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 20437 <at> debbugs.gnu.org (full text, mbox):
Bernhard Voelker wrote:
> Could we work around
> it?
Sure, how about if we shrink it down to 0.19? Would that work for you?
I picked 0.19.4 only because the old value was too low for gnulib and I was at
0.19.4. I think it needs to be at least 0.19, because of the recent gnulib changes.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#20437
; Package
coreutils
.
(Mon, 27 Apr 2015 09:56:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 20437 <at> debbugs.gnu.org (full text, mbox):
On 04/27/2015 09:27 AM, Paul Eggert wrote:
> Bernhard Voelker wrote:
>> Could we work around
>> it?
>
> Sure, how about if we shrink it down to 0.19? Would that work for you?
yes, "0.19" is okay for me - openSUSE-13.2 has 0.19.2.
Thanks & have a nice day,
Berny
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#20437
; Package
coreutils
.
(Mon, 27 Apr 2015 13:13:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 20437 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tag 20437 notabug
close 20437
stop
On 27/04/15 06:30, Paul Eggert wrote:
> Currently GNU 'ls' dynamically links a whole bunch of libraries, libraries like
> libpcre and liblzma. Can we figure out some way to remove the runtime
> dependencies on these libraries? It's better if a core utility like 'ls' avoids
> libthis and libthat unless the libraries are vital to its function, which these
> shouldn't be.
>
> I installed the attached patches to get rid of one unnecessary library, libacl,
> on GNU/Linux. Can we do better and get rid of more dependencies? Perhaps using
> techniques similar to what was used to get rid of libacl?
As was discussed recently¹ with removing the libmount dependency for df,
these dependencies are coming from libselinux, and one of the primary
authors of libselinux was made aware of that issue, so I'm closing
this here.
coreutils linking with libselinux are:
chcon cp dir install id ls mkdir mkfifo mknod mv runcon stat vdir
BTW I noticed ldd -v doesn't give complete info,
and that `readelf -d $(which ls) | grep NEEDED` is better.
This is wrapped in the lddot² visualizer, and I've attached
the output from `lddot git/coreutils/src/ls | graph-easy --as png`
cheers,
Pádraig.
¹ http://lists.gnu.org/archive/html/coreutils/2015-04/msg00011.html
² http://jwilk.net/software/lddot
[ls-shared-libs.png (image/png, attachment)]
Added tag(s) notabug.
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Mon, 27 Apr 2015 13:13:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
20437 <at> debbugs.gnu.org and Paul Eggert <eggert <at> cs.ucla.edu>
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Mon, 27 Apr 2015 13:13:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#20437
; Package
coreutils
.
(Mon, 27 Apr 2015 14:03:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 20437 <at> debbugs.gnu.org (full text, mbox):
On 27/04/15 14:12, Pádraig Brady wrote:
> tag 20437 notabug
> close 20437
> stop
>
> On 27/04/15 06:30, Paul Eggert wrote:
>> Currently GNU 'ls' dynamically links a whole bunch of libraries, libraries like
>> libpcre and liblzma. Can we figure out some way to remove the runtime
>> dependencies on these libraries? It's better if a core utility like 'ls' avoids
>> libthis and libthat unless the libraries are vital to its function, which these
>> shouldn't be.
>>
>> I installed the attached patches to get rid of one unnecessary library, libacl,
>> on GNU/Linux. Can we do better and get rid of more dependencies? Perhaps using
>> techniques similar to what was used to get rid of libacl?
>
> As was discussed recently¹ with removing the libmount dependency for df,
> these dependencies are coming from libselinux, and one of the primary
> authors of libselinux was made aware of that issue, so I'm closing
> this here.
>
> coreutils linking with libselinux are:
>
> chcon cp dir install id ls mkdir mkfifo mknod mv runcon stat vdir
>
> BTW I noticed ldd -v doesn't give complete info,
> and that `readelf -d $(which ls) | grep NEEDED` is better.
> This is wrapped in the lddot² visualizer, and I've attached
> the output from `lddot git/coreutils/src/ls | graph-easy --as png`
>
> cheers,
> Pádraig.
>
> ¹ http://lists.gnu.org/archive/html/coreutils/2015-04/msg00011.html
> ² http://jwilk.net/software/lddot
BTW I had a look at whether we could duplicate some getfilecon() logic
internally, but it doesn't seem practical due to mcstransd which
is a daemon that's used to translate the MCS / MLS internal policy
levels into user friendly labels.
I.E. we could duplicate the logic, and remove the lzma and pcre dependencies,
but it seems like too much to be duplicating. Further reductions in deps
might be possible by splitting up libselinux, allowing apps like ls
that just read contexts, to link with the appropriate lib.
cheers,
Pádraig.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#20437
; Package
coreutils
.
(Mon, 27 Apr 2015 15:22:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 20437 <at> debbugs.gnu.org (full text, mbox):
Pádraig Brady wrote:
> Further reductions in deps
> might be possible by splitting up libselinux, allowing apps like ls
> that just read contexts, to link with the appropriate lib.
I tried to see how to send a copy of this bug <http://bugs.gnu.org/20437> to the
libselinux developers, but the libselinux source distribution doesn't mention
any way to file bug reports (!). (So now I guess I have *two* bug reports to
send them. :-) Who maintains libselinux and how does one file and track a bug
report about libselinux?
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 26 May 2015 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.