IBM Support

XL C++ Runtime Environment and C++ Utilities

Question & Answer


Question

This document describes the purpose of the XL C++ Runtime Environment and C++ Utilities for AIX, and how to download, install, upgrade, and downgrade the software.

Answer

Introduction

The IBM XL C++ Runtime Environment (C++ RTE) is a set of filesets that are required for software applications developed with an IBM XL C++ for AIX compiler. These filesets are included with the compiler.  They are also included as part of the standard AIX installation and cannot be removed. The IBM XL C++ Utilities (C++ Utilities) are a companion set of filesets that might be required by some C++ applications.  They need not be installed unless specifically requested by an application provider. This document addresses how to upgrade the C++ RTE and C++ Utilities to a newer version, or how to install the C++ Utilities. It also describes how to downgrade both packages to an older version.

What is the C++ RTE?

The C++ RTE is a set of shared libraries that are dynamically linked with a C++ program when the program is executed. These libraries are used and required by applications that were compiled with an IBM C++ compiler. The libraries are packaged as a set of AIX filesets, and are included and installed with the AIX Operating System. All AIX systems should have an installed version of the C++ RTE. However each C++ program or application requires a minimum version of C++ RTE, so it might be necessary on occasion to perform an upgrade of the C++ RTE in order to satisfy the minimum required version.

The primary C++ RTE file is libC.a, a shared library file that is dynamically linked at runtime by all C++ programs and applications. The number of files and the fileset names might vary between different versions, but in general, the C++ RTE consists of the following filesets:

xlC.rte
xlC.aix50.rte
xlC.aix61.rte
xlC.msg.language
xlC.adt.include

(language is the specific language version; for example en_US for U.S. English)

Notes
  • Only one of the xlC.aixNN.rte filesets will be installed, depending on the version of AIX. The 50 fileset is installed on AIX 5.3 systems and the 6.1 fileset is installed on AIX 6.1 and 7.1 systems. You might encounter errors stating that one of these filesets failed to install. This error can be ignored.
  • xlC.adt.include is only installed on a system that also has an IBM XL C/C++ compiler
  • The filesets below are not part of the C++ RTE, even though they have the same xlC package name. These filesets are for the C preprocessor. The C preprocessor is used primarily by the C compiler but is included in the base installation of AIX.
    xlC.cpp
    xlC.msg.en_US.cpp

What are the C++ Utilities?

The C++ Utilities are files that might be required by some programs and applications that were compiled with an IBM XL C/C++ compiler. There is no need to install these utilities unless an application provider requests that they be installed. The number of files and the fileset names might vary between different versions, but in general, the C++ Utilities consists of the following filesets:

vac.aix50.lib
vac.aix61.lib
vacpp.cmp.rte
vacpp.cmp.tools

Note: Only one of the vac.aixNN.lib filesets will be installed, depending on the version of AIX. The 50 fileset is installed on AIX 5.3 systems and the 6.1 fileset is installed on AIX 6.1 and 7.1 systems. You might encounter errors stating that one of these filesets failed to install. This error can be ignored.

The primary C++ Utilities file is libxlopt.a, which is a shared library file that can be dynamically linked by some C++ programs and applications.

How to Find the Installed Version of the C++ RTE and Utilities

The primary filesets for the C++ RTE are xlC.rte and xlC.aixNN.rte. To determine which version is installed on a system, run the following commands:
 
lslpp -L xlC.rte
lslpp -L xlC.aixNN.rte
(NN is replaced by the operating system version; for example xlC.aix50.rte or xlC.aix61.rte)

Sometimes the fix level (last digit in the version number) will be higher for one of these filesets. The version of the runtime is the highest of these two filesets. For example, the version of xlC.rte might be 11.0.0.0 and the version of xlC.aix61.rte 11.0.0.8, so the version of the runtime would be 11.0.0.8.

The primary fileset for the Utilities is vac.aixNN.lib.. To determine which version is installed on a system, run the following command:
lslpp -L vac.aixNN.lib
(NN is replaced by the operating system version; for example vac.aix61.lib)

Note: The operating system version digits, embedded within some of the fileset names, are not always identical to the version of the operating system in the second digit. For example, xlC.aix50.rte is used for AIX 5.1, AIX 5.2, and AIX 5.3, and vac.aix50.lib is used for AIX 5.1, AIX 5.2, and some versions of AIX 5.3. If you are not sure what the fileset name is on one of these types of filesets, you can run commands like the following:
 
lslpp -L "xlC.aix*.rte" 
or
lslpp -L "vac.aix*.lib"


How to Determine Which Version of the C++ RTE and C++ Utilities to Install

A general rule is to use a level that is the same as, or higher, than the minimum level required by an application. For example, if an application requires the C++ RTE version 10.0.0.4, you can use 10.0.0.4, or a higher version such as 11.0.0.0, or 12.0.0.0. If you have more than one C++ application on your system, you will need to install a C++ RTE version that satisfies the requirements of the application with the highest minimum C++ RTE requirement.

The required version of the C++ Utilities should also be specified by the application provider. However be aware that each version of the C++ Utilities requires a minimum version of the C++ RTE.

The C++ RTE has operating system prerequisites that are defined on the web page where the runtime package is downloaded. So it is possible that you will first need to update certain operating system filesets, or update to a higher technology level, before installing a newer version of the C++ Runtime.

Some AIX Technology Level updates might update the C++ RTE on your system. This is not a problem however, because the version of the runtime will always be higher, and applications will still continue to run with a higher version of the C++ RTE.

When downgrading the C++ RTE or the C++ Utilities, it is recommended that you not go below the version that was supplied with the particular operating system level or technology level that your system is currently at. For example, if AIX 5.3 Technology Level 8 ships with C++ RTE version 9.0.0.1, then you should not attempt to install a version of the runtime that is below 9.0.0.1 on a 5300-08 system. If you do not know the version that was originally supplied at your current operating system level, contact IBM AIX Support for assistance.

For additional information about supported versions of the C++ RTE on different versions of AIX, see this technote.

How to Install the C++ RTE and Utilities

The C++ RTE and Utilities can be installed using the System Management and Installation Tool (SMIT). You must be logged in as root, or have root authority. Although it is recommended that you reboot the system after installing the C++ RTE, it is usually possible to install the runtime and utilities without rebooting.

Use the following steps to install the C++ RTE and/or C++ Utilities. If you are installing both packages, you must install the C++ RTE package first. Do not try to install both packages at the same time.
  1. Download the desired package.
  2. Uncompress and untar the package into an empty directory. Put only one package in a directory. If you are installing both the C++ RTE and C++ Utilities, put each package in a separate directory, and install the runtime package first.
  3. Run these commands:
    cd theDirectoryContainingThePackage
    smit install_latest
  4. In SMIT, specify the input device or directory for the installation software as a period ".", which indicates the current directory.
  5. Locate the license agreement field and press the tab key to change to yes.
  6. Leave the default values in the other fields, or modify them according to your preferences, and then press the enter key to begin installation.

Notes
  • It is recommended that you keep the default setting _all_latest in the Software to Install menu in SMIT. This will ensure that all necessary filesets are installed. Otherwise you will have to specify each fileset individually.
  • You can preview the installation process without actually installing the software by selecting yes next to the PREVIEWonly field.
  • After the installation has completed, the installation log will be stored in $HOME/smit.log.
  • If you selected all_latest, SMIT will attempt to install all filesets in the package. As a result, you might see failed installation errors for some of the message catalog filesets due to missing prerequisites for national language filesets. These errors can be ignored if you do not need those national language filesets.

How to Downgrade the C++ RTE and Utilities

It is possible to revert back to an older version of the runtime and utilities. Keep in mind however, that reverting back to a very old version is not recommended. The general rule is that you should not install a version of the C++ RTE or C++ Utilities that is below the level that was originally supplied with a particular version of AIX. If you are planning on downgrading the C++ RTE to a much older version than the one currently installed on your system, contact AIX Support for assistance.

Use the following steps to downgrade the C++ RTE and/or C++ Utilities:
  1. If you are downgrading both the C++ RTE and the C++ Utilities, first remove the C++ Utilities filesets:
    installp -u vacpp.cmp.tools vacpp.cmp.rte vac.aixNN.lib
    (NN is the operating system version; for example vac.aix61.lib)
  2. Download the desired package(s).
  3. Uncompress and untar the package into an empty directory. Put only one package in a directory. If you are downgrading both the runtime and utilities, put each package in a separate directory, and install the runtime package first.
  4. Run these commands:
    cd theDirectoryContainingThePackage
    smit install
  5. On the first menu page in SMIT, choose the menu Install and Update Software. On the next menu page, choose the menu Install and Update from ALL Available Software.
  6. Specify the input device or directory for the installation software as a period ".", which indicates the current directory.
  7. Press the F4 key to get a list of all filesets in the installation directory.
  8. Manually select all base level filesets, meaning all filesets with a 0 as the last digit in the fileset version. Use the up/down arrows to scroll to the desired fileset, then press F7 to select the fileset.
  9. Press the enter key.
  10. On the installation options page, it is recommended that you first preview the installation. To do this, locate the PREVIEW only field and press the tab key to change the value to yes.
  11. On the installation options page, locate the AUTOMATICALLY install requisite software field and press the tab key to change the value to no. Then locate the OVERWRITE same or newer versions field and press the tab key to change the value to yes.
  12. On the installation options page, locate the ACCEPT new license agreements field and press the tab key to change the value to yes.
  13. Leave the default values in the other fields, or modify them according to your preferences, and then press the enter key to begin installation.
  14. If you removed the C++ Utilities in step 1 above, follow the instructions in the How to Install the C++ RTE and Utilities section to install the older version of the C++ Utilities.

Notes
  • You can preview the installation process without actually installing the software by selecting yes next to the PREVIEW only field.
  • After the installation has completed, the installation log will be stored in $HOME/smit.log.
  • If you selected all_latest, SMIT will attempt to install all filesets in the package. As a result, you might see failed installation errors for some of the message catalog filesets due to missing prerequisites for national language filesets. These errors may be ignored if you do not need those national language filesets.

Is a Reboot Required after the Installation?

It is possible to install the C++ RTE and C++ Utilities without rebooting. However if any C++ programs are running while the software is being installed, these programs will continue to use the older version of the software that was loaded into memory from disk at the time the program was started. To use the newer versions, these programs will have to be stopped, and then restarted after the old libraries are purged from memory. You can use the following procedure to find the C++ programs that are running on your system and purge the older versions of the shared libraries from memory. If you discover you have a large number of C++ programs running on the system, you might decide it would be easier to reboot.
  1. Find all processes that are using the C++ Runtime library file libC.a or the C++ utilities file libxlopt.a.
    genld -l | grep -p "libC|libxlopt"
    See Example below.
  2. Kill all processes reported in the genld command in step 1. Use the recommended shutdown procedure for applications to prevent data loss.
  3. Remove all unused shared libraries from memory.
    slibclean
  4. Restart the C++ applications and they will now link with the newer versions of the shared libraries.
Example
genld -l | grep -p "libC|libxlopt"
Proc_pid:   335996      Proc_name: hostmibd
                            10000000     27394 hostmibd
                            d0087100     1403a /usr/lib/libiconv.a/shr4.o
                            d007c100      a44e /usr/lib/libi18n.a/shr.o
                            d0076000      2d71 /usr/lib/nls/loc/en_US
                            d09dd100      a00c /usr/lib/libdpi20.a/shr.o
                            d080e100     11885 /usr/lib/libsrc.a/shr.o
                            d00b0100      d41b /usr/lib/libcfg.a/shr.o
                            d00f0100     32759 /usr/lib/liblvm.a/shr.o
                            d009c100     13153 /usr/lib/libodm.a/shr.o
                            d0a213e0     1f983 /usr/lib/libC.a/shrcore.o
                            d0a088a0     1866b /usr/lib/libC.a/ansicore_32.o
                            d09e8100     1fe90 /usr/lib/libC.a/shr.o
                            d00750f8       86e /usr/lib/libcrypt.a/shr.o
                            d01d9640    200596 /usr/lib/libc.a/shr.o

Proc_pid:   450596      Proc_name: i4lmd
                            10000000    28838b i4lmd
                            d0087100     1403a /usr/lib/libiconv.a/shr4.o
                            d007c100      a44e /usr/lib/libi18n.a/shr.o
                            d0076000      2d71 /usr/lib/nls/loc/en_US
                            d00b0100      d41b /usr/lib/libcfg.a/shr.o
                            d009c100     13153 /usr/lib/libodm.a/shr.o
                            d0045000      38b1 /usr/lib/libpthreads.a/shr_comm.o
                            d0049000     2b5b5 /usr/lib/libpthreads.a/shr_xpg5.o
                            d01524c0      81a3 /usr/lib/libbsd.a/shr.o
                            d38d366c       def /usr/vacpp/lib/libC.a/shr2.o
                            d3617400     21003 /usr/lib/libC.a/shrcore.o
                            d35fdf40     1841f /usr/lib/libC.a/ansicore_32.o
...
...

The output from genld -l lists every process running on the system along with all of the shared libraries the process uses. The output includes the PID and the process name.

Where to Download the C++ RTE and C++ Utilities

Download packages for the C++ Runtime and C++ Utilities are available on the IBM XL C/C++ Compiler web site at the Support Downloads link. You can also go to the Latest Updates web page to get the very latest updates for supported versions of the C++ RTE and C++ Utilities.

It is also possible to use IBM Fix Central to obtain packages for the C++ RTE, but not the C++ Utilities. Select Rational as the Product Group and XL C++ Runtime as the Product. After choosing which package you want in Fix Central, you are directed to the appropriate page on the C/C++ Compiler Support Downloads site.

Note: IBM Fix Central is primarily for downloading fix level filesets that upgrade the C++ RTE version to a higher fix level, without changing the major version number, and this might be confusing if you want to upgrade from say, major version 9 to major version 10. For example, if your system is currently at C++ RTE version 9.0.0.1, and you input 9.0.0.1 when asked by Fix Central for your current version, the download packages listed will only include all of the version 9 fixes above 9.0.0.1 to the latest fix level currently available for version 9. No version 10 packages will be included. If you want to upgrade to version 10, then you will have to report that your system is currently at version 10.0.0.0 so that Fix Central will list all of the fix packages that are available for version 10.

IBM Fix Central
Latest Updates for the C++ RTE and C++ Utilities
All XL C/C++ Compiler and Runtime Support Downloads
XL C/C++ Enterprise Edition Compilers for AIX

How to Obtain Support for the C++ RTE and C++ Utilities

Support for questions and problems relating to the installation of the C++ RTE and Utilities is available as part of AIX Software Maintenance. But the runtime and utilities are not supported as stand-alone software products. If you suspect a defect with the runtime or utilities while using it with a third-party application, contact the application provider for support. Full support (installation, defect support and general questions) for the runtime and utilities is available with the software maintenance agreement for the XL C++ Compilers. A suitable test case is required for defect support; click here for details.

Conclusion

The AIX C++ Runtime Environment and C++ Utilities consist primarily of shared libraries that are dynamically linked with C++ programs that have been compiled with IBM C++ compilers. The C++ Runtime is required by all programs and applications that have been compiled with an IBM XL C/C++ compiler, and the C++ Utilities are optionally required by some C++ programs and applications. The version that should be installed on your system should be specified by the C++ application provider. It is possible to install these runtime packages without rebooting the system.

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z0000008ZscAAE","label":"XL C++"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

More support for:
AIX

Component:
XL C++

Software version:
All Version(s)

Document number:
670135

Modified date:
23 September 2020

UID

isg3T1011011

Manage My Notification Subscriptions