Only a minor point, and I think I can wiggle my way around it, but as it might break scripts for others, I thought I should report it. The following is abstracted from a script by Detlef Steuer (Bcc'ed so that he doesn't get every followup...) to compute a list of required packages for a binary. Doesn't quite work on AMD64 as you will see: pd@linux:~/> ldd /usr/lib/R/modules/R_X11.so | grep jpeg libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x0000002a95ace000) pd@linux:~/> rpm -q --whatprovides libjpeg.so.62 libjpeg-32bit-9.1-200404070910 I.e. 32 bit compatibility packages are found and not the correct 64 bit ones. One workaround seems to be based on pd@linux:~/> rpm -q --whatprovides 'libjpeg.so.62()(64bit)' libjpeg-6.2.0-320 which is a bit of a pain because the script is really like rpm -q --whatprovides `ldd ... | gawk '{print $1}' |....` and you have to deal with the fact that some elements come out with explicit paths, and RPM doesn't cope; only the latter of the following two will work: rpm -q --whatprovides '/lib64/ld-linux-x86-64.so.2()(64bit)' rpm -q --whatprovides 'ld-linux-x86-64.so.2()(64bit)' Another, simpler, workaround is to use the RHS of the "=>" in the ldd output (gawk '{print $3}'). However, this is sometimes "not found" since the application jiggles the library path. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
Peter Dalgaard
Only a minor point, and I think I can wiggle my way around it, but as it might break scripts for others, I thought I should report it.
The following is abstracted from a script by Detlef Steuer (Bcc'ed so that he doesn't get every followup...) to compute a list of required packages for a binary. Doesn't quite work on AMD64 as you will see:
pd@linux:~/> ldd /usr/lib/R/modules/R_X11.so | grep jpeg libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x0000002a95ace000) pd@linux:~/> rpm -q --whatprovides libjpeg.so.62 libjpeg-32bit-9.1-200404070910
I would just call: rpm -qf /usr/lib64/libjpeg.so.62 Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Andreas Jaeger
pd@linux:~/> ldd /usr/lib/R/modules/R_X11.so | grep jpeg libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x0000002a95ace000) pd@linux:~/> rpm -q --whatprovides libjpeg.so.62 libjpeg-32bit-9.1-200404070910
I would just call: rpm -qf /usr/lib64/libjpeg.so.62
By hand, yes. But in a script you need a consistent way of finding the argument. Using the filename was basically my workaround #2. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
participants (2)
-
Andreas Jaeger
-
Peter Dalgaard