Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Library version

1,263 views
Skip to first unread message

Drizzt

unread,
Apr 29, 2010, 1:57:30 AM4/29/10
to
Hi, how can I find the version of a library on Solaris? Is there a specific
command?


Thx all :-)

Chris Ridd

unread,
Apr 29, 2010, 2:14:23 AM4/29/10
to
On 2010-04-29 06:57:30 +0100, Drizzt said:

> Hi, how can I find the version of a library on Solaris? Is there a
> specific command?

The library filename sometimes has version info at the end.

You may find API version information inside the library by running
pvs(1) on the library file. For Sun-supplied libraries look for SUNW_*;
strings to find the supported versions (plural). eg:

$ cd /usr/lib
$ pvs libresolv.so.1
libsocket.so.1 (SISCD_2.3, SUNWprivate_1.1);
libnsl.so.1 (SISCD_2.3, SUNWprivate_1.1);
libc.so.1 (SUNW_0.7, SUNWprivate_1.1);
libresolv.so.1;
SUNW_1.1;
SUNW_0.7;
SUNWprivate_1.1;
$ pvs libresolv.so.2
libsocket.so.1 (SUNW_1.4, SUNWprivate_1.1);
libnsl.so.1 (SUNW_1.9.1, SUNWprivate_1.4);
libc.so.1 (SUNW_1.22, SUNWprivate_1.1);
libresolv.so.2;
SUNW_2.2.2;
SUNW_2.2.1;
SUNW_2.2;
SUNW_2.1;
SUNWprivate_2.2;
SUNWprivate_2.1;


Third-party libraries may not have this info.

--
Chris

Sven Mascheck

unread,
Apr 29, 2010, 9:18:51 AM4/29/10
to
Chris Ridd wrote:
On 2010-04-29 06:57:30 +0100, Drizzt said:

>> Hi, how can I find the version of a library on Solaris? Is there a
>> specific command?
>

> You may find API version information inside the library by running
> pvs(1) on the library file.

> $ cd /usr/lib


> $ pvs libresolv.so.1
> libsocket.so.1 (SISCD_2.3, SUNWprivate_1.1);
> libnsl.so.1 (SISCD_2.3, SUNWprivate_1.1);
> libc.so.1 (SUNW_0.7, SUNWprivate_1.1);
> libresolv.so.1;
> SUNW_1.1;
> SUNW_0.7;
> SUNWprivate_1.1;
> $ pvs libresolv.so.2
> libsocket.so.1 (SUNW_1.4, SUNWprivate_1.1);
> libnsl.so.1 (SUNW_1.9.1, SUNWprivate_1.4);
> libc.so.1 (SUNW_1.22, SUNWprivate_1.1);
> libresolv.so.2;
> SUNW_2.2.2;
> SUNW_2.2.1;
> SUNW_2.2;
> SUNW_2.1;
> SUNWprivate_2.2;
> SUNWprivate_2.1;

and you can try to find revision control entries with what(1).

$ what /usr/lib/libresolv.so.1
/usr/lib/libresolv.so.1:
SunOS 5.9 Generic May 2002
$ what /usr/lib/libresolv.so.2
/usr/lib/libresolv.so.2:
SunOS 5.9 Generic 112970-09 Sep 2005

Chris Ridd

unread,
Apr 29, 2010, 10:47:40 AM4/29/10
to

Oh that's neat. It doesn't seem quite so useful however in Solaris 10
or OpenSolaris:

$ what /usr/lib/libresolv.so.1
/usr/lib/libresolv.so.1:
SunOS 5.10 Generic 127127-11 Mar 2008
$ what /usr/lib/libresolv.so.2
/usr/lib/libresolv.so.2:
SunOS 5.10 Generic 127127-11 Mar 2008
[...]
$ what /usr/lib/libresolv.so.1
/usr/lib/libresolv.so.1:
SunOS 5.11 snv_134 February 2010
$ what /usr/lib/libresolv.so.2
/usr/lib/libresolv.so.2:
SunOS 5.11 snv_134 February 2010

That might just be due to the boxes I tried it on.
--
Chris

Drizzt

unread,
Apr 30, 2010, 12:39:06 PM4/30/10
to
"Chris Ridd" <chri...@mac.com> ha scritto nel messaggio
news:83tkgc...@mid.individual.net...

> On 2010-04-29 14:18:51 +0100, Sven Mascheck said:
[cut]

10x guys, 't was exactly what my co-worker was looking for :-)

0 new messages