The example looks as follows:
find . -type f | xargs -n1 file -F | grep ELF | cut -f1 -d' ' | xargs
ldd -f '%A %o\n' | grep libc.so.6
Unfortunately this example does not work for me. Is seems that the part
with xargs does not output anything and so is the showstopper (?)
It would be nice if someone could give me some advice what is wrong here.
Thanks in advance,
Rainer Hurling
On 04/05/10 14:40, Garrett Cooper wrote:
> On Mon, Apr 5, 2010 at 11:35 AM, Rainer Hurling <rhu...@gwdg.de> wrote:
>> The example looks as follows:
>>
>> find . -type f | xargs -n1 file -F | grep ELF | cut -f1 -d' ' | xargs ldd -f
>> '%A %o\n' | grep libc.so.6
[ .. snip .. ]
> 1. The file(1) usage looks incorrect (I get a lot of messages like the
> following):
>
> Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator]
> [-m magicfiles] file...
> file -C -m magicfiles
> Try `file --help' for more information.
>
> 2. It's no longer libc.so.6 for many versions of FreeBSD; it can
> potentially be libc.so.7...
Try ..
find . -type f | xargs -n1 file -F ' ' | grep ELF | cut -f1 -d' ' \
| xargs ldd -f '%A %o\n' | grep libc.so.[67]
;-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
iEYEARECAAYFAku6MVIACgkQQv9rrgRC1JLrXgCZAauZv2h8SrqkKdJNL5Xpv9KN
ml8An20zgpbjrJVZ2XdLc6/HVch69f3w
=sBOs
-----END PGP SIGNATURE-----
1. The file(1) usage looks incorrect (I get a lot of messages like the
following):
Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator]
[-m magicfiles] file...
file -C -m magicfiles
Try `file --help' for more information.
2. It's no longer libc.so.6 for many versions of FreeBSD; it can
potentially be libc.so.7...
HTH,
-Garrett
On 05.04.2010 20:52 (UTC+1), Michael Butler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 04/05/10 14:40, Garrett Cooper wrote:
>> On Mon, Apr 5, 2010 at 11:35 AM, Rainer Hurling<rhu...@gwdg.de> wrote:
>
>>> The example looks as follows:
>>>
>>> find . -type f | xargs -n1 file -F | grep ELF | cut -f1 -d' ' | xargs ldd -f
>>> '%A %o\n' | grep libc.so.6
>
> [ .. snip .. ]
>
>> 1. The file(1) usage looks incorrect (I get a lot of messages like the
>> following):
>>
>> Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator]
>> [-m magicfiles] file...
>> file -C -m magicfiles
>> Try `file --help' for more information.
>>
>> 2. It's no longer libc.so.6 for many versions of FreeBSD; it can
>> potentially be libc.so.7...
I want to create a list of binaries, which are linked against the old
libz.so.5 and must be upgraded ...
find /usr/local/ -type f | xargs -n1 file -F ' ' | grep ELF | cut -f1
-d' ' | xargs ldd -f '%A %o\n' | grep libz.so.5 > ~/libz.so.5.txt
Install sysutils/bsdadminscripts and rung pkg_libchk. :)
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Thanks Dominic,
I was not aware of this tool for this purpose :-)
With textproc/opensp installed the script hangs after some time with the
following message:
[..snip..]
ImageMagick-6.5.8.10_1: /usr/local/lib/libMagickWand.so.2 misses libz.so.5
arith: syntax error: ""0" + 1"-1.5.2_1
This behaviour (the last line) is on at least three machines. Do you
have any idea what is going on?
Rainer Hurling
I originally wrote it for the update from 6.x to 7.x, so that I could
find all packages being linked against the compat-ports and avoid
unnecessary builds.
> With textproc/opensp installed the script hangs after some time with the
> following message:
I doubt there is a connection. OpenSP is installed on my system
and it works fine.
> [..snip..]
> ImageMagick-6.5.8.10_1: /usr/local/lib/libMagickWand.so.2 misses libz.so.5
> arith: syntax error: ""0" + 1"-1.5.2_1
The arithmetics happen mostly during locking. I suppose the -1.5.2_1
is a remainder of a status message and not connected to the error.
Does this always occur in the same place? Maybe run the command with
-j1 to gain more predictable output.
Regards
I think you are right ;-)
>> [..snip..]
>> ImageMagick-6.5.8.10_1: /usr/local/lib/libMagickWand.so.2 misses libz.so.5
>> arith: syntax error: ""0" + 1"-1.5.2_1
>
> The arithmetics happen mostly during locking. I suppose the -1.5.2_1
> is a remainder of a status message and not connected to the error.
>
> Does this always occur in the same place? Maybe run the command with
> -j1 to gain more predictable output.
The next try with -j1:
#pkg_libchk -j1
arith: syntax error: ""0" + 1"-2.14.17
No other output for the last 30 minutes. The only package installed with
this version number is ORBit2.
My systems are running under recent 9.0-CURRENT (amd64).
Thanks a lot, I'll wait for Jilles reaction and decide whether
I have to push out a maintenance release.