LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 04-06-2009, 02:20 AM   #1
atulspma
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Unhappy How to find the version information of installed libraries say for example libdec2.a


Hi Friend,
Please help me to find out the version information of installed libraries say *.a (for example libdec2.a) on AIX. Is there has any ways to do it ??
 
Old 04-07-2009, 02:46 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,500

Rep: Reputation: 100Reputation: 100
Hmm, not sure about AIX, but for most Linux libraries you usually have a "config" script for each library you can call to get the library version.

For example, on my machine, I can do this

Code:
[rylan@development ~]$ sdl-config --version
1.2.10
[rylan@development ~]$
in a terminal. This tells me that I have the 1.2.10 version of the SDL library on my system.

I. e. try doing

Code:
# dec2-config --version
or

Code:
# libdec2-config --version
or

Code:
# dec-config --version
in a terminal on your AIX system and see if you get any joy.

Last edited by rylan76; 04-07-2009 at 02:47 AM.
 
Old 04-07-2009, 11:45 PM   #3
atulspma
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Question Thanx a ton rylan76...for your reply

I tried the solution provided by you but I am not able to do find the version information.Actually my product uses third party component for example Verity and Decomposer and I want to find out the version information of these third party component. I check my system but I was not able to find "config" script and that why I m getting "command not found" error when I tried any of the solution provided by you.So Is there has any other way to find out the same ??
 
Old 04-08-2009, 01:41 PM   #4
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
You can view the filesets with lslpp -l and files within a fileset with lslpp -f <fileset>.
 
Old 03-28-2017, 10:55 AM   #5
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,240

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
You can list the content of the file:
Code:
ar -X32_64 tv /path/libdec2.a
Also you can check if this file belongs to some package:
Code:
lslpp -w /path/libdec2.a
rpm -qf /path/libdec2.a
 
Old 04-08-2017, 04:13 PM   #6
MadeInGermany
Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 428

Rep: Reputation: 187Reputation: 187
The following shows all .a files along with their fileset/level
Code:
lslpp -f | awk '$1~/^[^\/]+$/ && $2~/^[0-9.]+$/ {fs=$1;ver=$2} $NF~/\.a$/ {print $NF, " --> "fs,ver}'
 
1 members found this post helpful.
Old 05-31-2017, 07:32 PM   #7
Michael AM
Member
 
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 118

Rep: Reputation: 32
Hi MadeInGermany,

Interesting "one-liner". However, the fileset numbering is not always the libary version. e.g., several "standard libaries" are part of rpm.rte - and that is not the "version" number I would be expecting.

e.g.:

Code:
aixtools@x071.home.local:[/usr/lib]$NF~/\.a$/ {print $NF, " --> "fs,ver}' | grep intl                        <
/opt/lib/libintl.a  --> aixtools.gnu.gettext.rte 0.19.8.1
/usr/opt/freeware/lib/libintl.a  --> rpm.rte 3.0.5.52
and

Code:
aixtools@x071.home.local:[/usr/lib]{print $NF, " --> "fs,ver}' | grep libz                                   <
/usr/java5/jre/bin/libzip.a  --> Java5.sdk 5.0.0.430
/usr/java5_64/jre/bin/libzip.a  --> Java5_64.sdk 5.0.0.430
/opt/lib/libz.a  --> aixtools.zlib.rte 1.2.11.1
/usr/opt/freeware/lib/libz.a  --> rpm.rte 3.0.5.52
Inside the archives - it can be quite difficult. The legacy name of the "shared-library" member in AIX archives is "shr.o", e.g.,

Code:
aixtools@x071.home.local:[/usr/lib]ar tv /usr/ccs/lib/libdecNumber.a
r--r--r--     2/2     107533 Dec 10 03:28 2015 shr.o
So, when I have been packaging (and, luckily, the default naming in most autotool generated Makefiles) the members look like:

Code:
aixtools@x071.home.local:[/usr/lib]ar tv /opt/lib/libz.a
rwxr-xr-x     0/0     164632 Jan 31 12:55 2017 libz.so.1
rwxr-xr-x     0/1954  164632 Feb 02 18:43 2017 libz.so.1.2.11
rwxr-xr-x     0/1954  164594 Feb 02 18:53 2017 libz.so.1.2.10
r-xr-xr-x     0/1954  156861 Feb 02 18:53 2017 libz.so.1.2.8
rw-r--r--     0/0       5249 Jan 31 12:55 2017 adler32.o
rw-r--r--     0/0      13880 Jan 31 12:55 2017 crc32.o
rw-r--r--     0/0      32490 Jan 31 12:55 2017 deflate.o
rw-r--r--     0/0      10335 Jan 31 12:55 2017 infback.o
rw-r--r--     0/0       3803 Jan 31 12:55 2017 inffast.o
rw-r--r--     0/0      26222 Jan 31 12:55 2017 inflate.o
rw-r--r--     0/0       4141 Jan 31 12:55 2017 inftrees.o
rw-r--r--     0/0      16789 Jan 31 12:55 2017 trees.o
rw-r--r--     0/0       2320 Jan 31 12:55 2017 zutil.o
rw-r--r--     0/0       1908 Jan 31 12:55 2017 compress.o
rw-r--r--     0/0       2082 Jan 31 12:55 2017 uncompr.o
rw-r--r--     0/0       1149 Jan 31 12:55 2017 gzclose.o
rw-r--r--     0/0       8459 Jan 31 12:55 2017 gzlib.o
rw-r--r--     0/0      11463 Jan 31 12:55 2017 gzread.o
rw-r--r--     0/0      10385 Jan 31 12:55 2017 gzwrite.o
Compare that with:
Code:
aixtools@x071.home.local:[/usr/lib]ar tv /opt/freeware/lib/libz.a
rwxr-xr-x   203/1     120624 Jan 03 16:59 2008 libz.so.1
rwxr-xr-x   203/1       6015 Jan 03 16:59 2008 shr.o
For the later - when I wrote programs to determine what version of libz was provided I got, initially version 1.2.4 and later 1.2.8. FYI I am providing all the different versions so that programs linked to older versions of 1.2.X will still find there old version. In the case of libz (aka zlib) it is better practice to specify libz.so.1

For the curious: the .o members are static routines that can be linked into a program rather than use the RTLD (Run-Time LoaDer).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no version information available, replaced libraries Peterius Debian 3 11-12-2008 01:47 AM
How to find out indone information and datablocks information in a file system chaitanya1982 Linux - Newbie 1 09-24-2008 01:58 AM
Bash command to list installed libraries and version numbers newtovanilla Linux - Newbie 4 07-18-2008 04:49 PM
Can't find gnome but have libraries installed silentwhispers SUSE / openSUSE 1 11-15-2004 11:48 PM
How do I find out version of RH installed? skv1234 Red Hat 2 09-15-2003 08:04 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 11:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration