Re: ldd manpage - example does not work

2010-04-06 Thread Rainer Hurling

Am 05.04.2010 23:05 (UTC+1) schrieb Dominic Fandrey:

On 05/04/2010 22:09, Rainer Hurling wrote:

I want to create a list of binaries, which are linked against the old
libz.so.5 and must be upgraded ...


Install sysutils/bsdadminscripts and rung pkg_libchk. :)



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
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ldd manpage - example does not work

2010-04-06 Thread Dominic Fandrey
On 06/04/2010 08:36, Rainer Hurling wrote:
 Am 05.04.2010 23:05 (UTC+1) schrieb Dominic Fandrey:
 On 05/04/2010 22:09, Rainer Hurling wrote:
 I want to create a list of binaries, which are linked against the old
 libz.so.5 and must be upgraded ...

 Install sysutils/bsdadminscripts and rung pkg_libchk. :)

 
 I was not aware of this tool for this purpose :-)

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

-- 
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? 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ldd manpage - example does not work

2010-04-06 Thread Rainer Hurling

Am 06.04.2010 11:11 (UTC+1) schrieb Dominic Fandrey:

On 06/04/2010 08:36, Rainer Hurling wrote:

Am 05.04.2010 23:05 (UTC+1) schrieb Dominic Fandrey:

On 05/04/2010 22:09, Rainer Hurling wrote:

I want to create a list of binaries, which are linked against the old
libz.so.5 and must be upgraded ...


Install sysutils/bsdadminscripts and rung pkg_libchk. :)



I was not aware of this tool for this purpose :-)


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.


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).
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ldd manpage - example does not work

2010-04-06 Thread Dominic Fandrey
On 06/04/2010 11:53, Rainer Hurling wrote:
 Am 06.04.2010 11:46 (UTC+1) schrieb Dominic Fandrey:
 On 06/04/2010 11:32, Rainer Hurling wrote:
 Am 06.04.2010 11:11 (UTC+1) schrieb Dominic Fandrey:
 On 06/04/2010 08:36, Rainer Hurling wrote:
 [..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).

 Now, this is a real clue. The svn log states several changes to
 arithmetic expansion.

 I'm CC'ing this to the author of said changes. I suspect the
 following function. I wonder, is this a regression or a bug
 in my code?

 #
 # This function frees a semaphore.
 #
 # @param $1
 #The name of the semaphore.
 #
 semaphoreFree() {
 local lock
 lock=$sharedprefix-semaphore-$1
 lockf -k $lock sh -c 
 state=\\$((\\$(cat '$lock')\ + 1))\
 echo \\$state\  '$lock'
 
 }


 Would you please change the line:
 state=\\$((\\$(cat '$lock')\ + 1))\
 to
 state=\\$((\$(cat '$lock') + 1))\
 and test whether that fixes the issue?
 
 Seems to work this way :-)

Thanks a lot, I'll wait for Jilles reaction and decide whether
I have to push out a maintenance release.

Regards

-- 
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? 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


ldd manpage - example does not work

2010-04-05 Thread Rainer Hurling
The manpage for ldd(1) gives a nice example of finding binaries, which 
link against a given library, see


http://www.freebsd.org/cgi/man.cgi?query=lddapropos=0sektion=0manpath=FreeBSD+8.0-RELEASEformat=html


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
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ldd manpage - example does not work

2010-04-05 Thread Garrett Cooper
On Mon, Apr 5, 2010 at 11:35 AM, Rainer Hurling rhur...@gwdg.de wrote:
 The manpage for ldd(1) gives a nice example of finding binaries, which link
 against a given library, see

 http://www.freebsd.org/cgi/man.cgi?query=lddapropos=0sektion=0manpath=FreeBSD+8.0-RELEASEformat=html


 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.

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
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ldd manpage - example does not work

2010-04-05 Thread Michael Butler
-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 rhur...@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-
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ldd manpage - example does not work

2010-04-05 Thread Rainer Hurling

Thank you very much for your answers!

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




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-


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: ldd manpage - example does not work

2010-04-05 Thread Dominic Fandrey
On 05/04/2010 22:09, Rainer Hurling wrote:
 I want to create a list of binaries, which are linked against the old
 libz.so.5 and must be upgraded ...

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? 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org