IBM Support

How to determine the installed XL C/C++ for AIX compiler version

Question & Answer


Question

How do you determine the XL C/C++ for AIX compiler version installed on your machine?

Cause

When using lslpp -l and grep commands to search for the installed compiler file sets, a common mistake is to misinterpret the xlC.aix61.rte or the xlC.aix50.rte flieset as the XL C/C++ for AIX compiler file set.

Answer

As shown in the following examples, the most common way to determine the XL C/C++ compiler version on your machine is by using the -qversion option.

Example:

$ /usr/vacpp/bin/xlC -qversion
IBM XL C/C++ for AIX, V11.1 (5724-X13)
Version: 11.01.0000.0015
or
$ /usr/vac/bin/xlc -qversion
IBM XL C/C++ for AIX, V11.1 (5724-X13)
Version: 11.01.0000.0015
$

As shown in the following example, another method is to use the lslpp -l and grep commands to search for the installed compiler file sets.

Example:

$ lslpp -l | grep "vac.C"; lslpp -l | grep "vacpp.cmp.core"; lslpp -l | grep "xlC.aix*"
  vac.C                    11.1.0.15  COMMITTED  IBM XL C Compiler
  vac.C                    11.1.0.15  COMMITTED  IBM XL C Compiler
  vacpp.cmp.core           11.1.0.15  COMMITTED  IBM XL C/C++ Compiler
  vacpp.cmp.core           11.1.0.15  COMMITTED  IBM XL C/C++ Compiler
  xlC.aix61.rte             12.1.0.2  COMMITTED  IBM XL C++ Runtime for AIX 6.1
$


Note: Use caution with the lslpp method. Do not misinterpret the xlC.aix61.rte or the xlC.aix50.rte flieset as the XL C/C++ for AIX compiler file set. Here is the correct mapping between the file sets and the products:

File setProduct
vac.CXL C for AIX
vacpp.cmp.coreXL C/C++ for AIX
xlC.aix61.rte (on AIX6.1)
xlC.aix50.rte (on AIX5.*)
XL C++ Runtime for AIX


You have the following versions:
V11.1.0.15 for the XL C for AIX compiler
V11.1.0.15 for the XL C/C++ for AIX compiler and
V12.1.0.2 for the XL C++ Runtime for AIX

Note: The version of the C++ Runtime can be higher than the Compiler because the C++ Runtime is backwards compatible.

[{"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Documentation","Platform":[{"code":"PF002","label":"AIX"}],"Version":"10.1;11.1;12.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
06 December 2018

UID

swg21652272