Installation Guide: IBM XL C/C++ For AIX, V13.1
Installation Guide: IBM XL C/C++ For AIX, V13.1
Installation Guide: IBM XL C/C++ For AIX, V13.1
1
Installation Guide
Version 13.1
SC27-4258-00
IBM XL C/C++ for AIX, V13.1
Installation Guide
Version 13.1
SC27-4258-00
Note
Before using this information and the product it supports, read the information in “Notices” on page 39.
First edition
This edition applies to IBM XL C/C++ for AIX, V13.1 (Program 5765-J07; 5725-C72) and to all subsequent releases
and modifications until otherwise indicated in new editions. Make sure you are using the correct edition for the
level of the product.
© Copyright IBM Corporation 2003, 2014.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this information . . . . . . . . v Preparing a PTF package for installation. . . . . 22
Who should read this document . . . . . . . . v Installing PTF updates on the PASE system. . . 22
How to use this document. . . . . . . . . . v Updating a basic installation. . . . . . . . . 23
How this document is organized . . . . . . . vi Using SMIT . . . . . . . . . . . . . 23
Conventions . . . . . . . . . . . . . . vi Using installp . . . . . . . . . . . . 24
Related information . . . . . . . . . . . . ix Updating an advanced installation using xlCndi . . 24
IBM XL C/C++ information . . . . . . . . ix Product version migration . . . . . . . . . 26
Standards and specifications . . . . . . . . xi Operating system migration . . . . . . . . . 26
Other IBM information . . . . . . . . . xii
Other information . . . . . . . . . . . xii Chapter 5. After installing XL C/C++ . . 27
Technical support . . . . . . . . . . . . xii Checking compiler and fileset information . . . . 27
How to send your comments . . . . . . . . xii Enabling utilization tracking. . . . . . . . . 28
Enabling IBM License Metric Tool (ILMT) and Tivoli
Chapter 1. Before installing XL C/C++ . . 1 Asset Discovery for Distributed (TADd) . . . . . 28
The installation image and filesets . . . . . . . 1 Configuring compiler defaults . . . . . . . . 29
Filesets . . . . . . . . . . . . . . . 1 Setting environment variables . . . . . . . . 29
Preparing the electronic distribution package . . 6 Enabling the XL C/C++ error messages . . . . . 29
National language support . . . . . . . . 7 Enabling the manual pages . . . . . . . . . 30
System prerequisites . . . . . . . . . . . . 7 Creating shortcuts to the XL C/C++ invocation
Previewing the installation and license agreements . 8 commands. . . . . . . . . . . . . . . 30
Accessing the local documentation . . . . . . 31
Chapter 2. Basic installation . . . . . 11 Viewing the HTML documentation . . . . . 31
Viewing the PDF documentation . . . . . . 32
Tasks for basic installation . . . . . . . . . 11
Viewing the manual pages . . . . . . . . 33
Using the bundle installation method. . . . . . 12
Testing the installation. . . . . . . . . . . 33
Using SMIT . . . . . . . . . . . . . . 13
Using installp . . . . . . . . . . . . . 14
Chapter 6. Uninstalling XL C/C++ . . . 35
Chapter 3. Advanced installation . . . 15 Uninstalling a basic installation . . . . . . . . 35
Uninstalling an advanced installation . . . . . . 36
Limitations of non-default installation . . . . . 15
Uninstalling versions of the MASS components
Tasks for advanced installation . . . . . . . . 15
downloaded from the web . . . . . . . . . 37
Non-default installation procedure. . . . . . . 16
Installing on an IBM i PASE system . . . . . 18
Running XL C/C++ from a non-default location . . 19 Notices . . . . . . . . . . . . . . 39
Trademarks and service marks . . . . . . . . 41
Chapter 4. Update installation . . . . . 21
Tasks for update installation . . . . . . . . . 21 Index . . . . . . . . . . . . . . . 43
The basic installation methods detailed in this document address the needs of the
majority of users. Basic examples are tailored to reflect, as much as possible, the
steps required to perform a basic installation.
The advanced installation method addresses the needs of users who require a
customized installation for various purposes, such as maintaining more than one
version of XL C/C++ on a single system. These are users who are familiar with
compiler installations and with the file structures of the versions of the compiler
products installed on the system. Advanced examples are tailored to reflect, as much
as possible, the steps required to perform an advanced installation.
Conventions
Typographical conventions
The following table shows the typographical conventions used in the IBM XL
C/C++ for AIX, V13.1 information.
Table 2. Typographical conventions
Typeface Indicates Example
bold Lowercase commands, executable The compiler provides basic
names, compiler options, and invocation commands, xlc and xlC
directives. (xlc++), along with several other
compiler invocation commands to
support various C/C++ language
levels and compilation environments.
italics Parameters or variables whose Make sure that you update the size
actual names or values are to be parameter if you return more than
supplied by the user. Italics are the size requested.
also used to introduce new terms.
underlining The default setting of a parameter nomaf | maf
of a compiler option or directive.
Most features described in this information apply to both C and C++ languages. In
descriptions of language elements where a feature is exclusive to one language, or
where functionality differs between languages, this information uses icons to
delineate segments of text as follows:
Table 3. Qualifying elements
Qualifier/Icon Meaning
C only, or C only begins The text describes a feature that is supported in the C language
C only; or describes behavior that is specific to the C language.
C only ends
C++ only, or C++ only The text describes a feature that is supported in the C++
begins language only; or describes behavior that is specific to the C++
C++ language.
C++
IBM
C11
C11 ends
C++11, or C++11 begins The text describes a feature that is introduced into standard
C++11 C++ as part of C++11.
C++11
C++11 ends
Syntax diagrams
keyword required_argument
keyword
optional_argument
v If you can choose from two or more items, they are shown vertically, in a stack.
If you must choose one of the items, one item of the stack is shown on the main
path.
keyword required_argument1
required_argument2
If choosing one of the items is optional, the entire stack is shown below the
main path.
keyword
optional_argument1
optional_argument2
v An arrow returning to the left above the main line (a repeat arrow) indicates
that you can make more than one choice from the stacked items or repeat an
item. The separator character, if it is other than a blank, is also indicated:
keyword repeatable_argument
v The item that is the default is shown above the main path.
default_argument
keyword alternate_argument
v Keywords are shown in nonitalic letters and should be entered exactly as shown.
v Variables are shown in italicized lowercase letters. They represent user-supplied
names or values.
v If punctuation marks, parentheses, arithmetic operators, or other such symbols
are shown, you must enter them as part of the syntax.
The following syntax diagram example shows the syntax for the #pragma
comment directive.
Notes:
1 This is the start of the syntax diagram.
2 The symbol # must appear first.
3 The keyword pragma must appear following the # symbol.
4 The name of the pragma comment must appear following the keyword pragma.
5 An opening parenthesis must be present.
6 The comment type must be entered only as one of the types indicated:
compiler, date, timestamp, copyright, or user.
7 A comma must appear between the comment type copyright or user, and an
optional character string.
8 A character string must follow the comma. The character string must be
enclosed in double quotation marks.
9 A closing parenthesis is required.
10 This is the end of the syntax diagram.
The following examples of the #pragma comment directive are syntactically correct
according to the diagram shown above:
#pragma comment(date)
#pragma comment(user)
#pragma comment(copyright,"This text will appear in the module")
The examples in this information, except where otherwise noted, are coded in a
simple style that does not try to conserve storage, check for errors, achieve fast
performance, or demonstrate all possible methods to achieve a specific result.
The examples for installation information are labelled as either Example or Basic
example. Basic examples are intended to document a procedure as it would be
performed during a basic, or default, installation; these need little or no
modification.
Related information
The following sections provide related information for XL C/C++:
To read a PDF file, use Adobe Reader. If you do not have Adobe Reader, you
can download it (subject to license terms) from the Adobe website at
http://www.adobe.com.
http://www.ibm.com/support/docview.wss?uid=swg27036618
Other information
v Using the GNU Compiler Collection available at http://gcc.gnu.org/onlinedocs
Technical support
Additional technical support is available from the XL C/C++ Support page at
http://www.ibm.com/support/entry/portal/Overview/Software/Rational/
XL_C~C++_for_AIX. This page provides a portal with search capabilities to a large
selection of Technotes and other support information.
If you cannot find what you need, you can send email to compinfo@ca.ibm.com.
For the latest information about XL C/C++, visit the product information site at
http://www.ibm.com/software/products/us/en/xlcpp-aix/.
Be sure to include the name of the manual, the part number of the manual, the
version of XL C/C++, and, if applicable, the specific location of the text you are
commenting on (for example, a page number or table number).
Installing this version of the compiler does not remove or change previous versions
of the compiler, only the C++ runtime library and the SMP runtime library are
migrated to the new versions. This was achieved by differentiating the installation
fileset names from those of the previous versions, including the version, release
and modification level (V.R.M) in the name, and installing to new locations that
include V.R.M in the installation paths.
You can upgrade the evaluation version of the compiler to the licensed version by
installing the licensed product package on top of the evaluation package. By
following the Chapter 2, “Basic installation,” on page 11 or Chapter 3, “Advanced
installation,” on page 15 procedure for the licensed product package, the compiler
license can be installed. Shared filesets between the evaluation and licensed
versions that have already been installed are reported as Already installed.
Note: If the evaluation version was installed using the advanced (non-default)
installation method, and you want to install the licensed version to the same
location, you must first remove the evaluation version using rm -rf, or install the
licensed version to a different directory than the evaluation version.
Filesets
The image includes filesets for the compiler components.
This section lists the filesets that are included in the installation image and the
default directories to which the fileset contents are installed during a basic
installation. You might optionally install all available filesets, or only the ones you
want. If you select specific filesets for installation, you might also choose to
automatically install any prerequisite filesets by using the installp -g flag.
Note: All of the filesets required for the XL C compiler, except xlccmp.13.1.0.ndi,
are also required for the XL C/C++ compiler.
The version of the compiler and the version of the installed XL C++ runtime
environment might be different. When a new version of the XL C/C++ for AIX
compiler is released, the version of the XL C++ runtime environment it provides
becomes the standard supported version on all platforms supported by the new
compiler. Fix packs for AIX, and PTFs for the compiler and XL C++ runtime
environment all have the potential to upgrade the XL C++ runtime version to a
later version than the version of the installed compiler. For example, the XL C++
runtime environment V11.1.0.2 was included in the May 2011 PTF for XL C/C++
for AIX, V10.1, because the XL C++ runtime environment V11.1 was the latest
version at the time.
Applications compiled with the XL C++ compiler must be run on a system with an
installed XL C++ runtime environment at the same or higher VRMF level (Version,
Release, Modification, Fix level) than on the system the application was compiled
on. For example, an older application compiled on a system with xlC.rte VRMF
10.1.0.7 installed is supported to run on a system with xlC.rte VRMF 11.1.0.3
installed, but not on a system with xlC.rte VRMF 10.1.0.3 installed.
Applications built on a lower AIX operating system version are supported on later
AIX versions, provided that the XL C++ runtime environment VRMF level
requirement is met. Downward compatibility to AIX versions lower than the
system that the application was built on is not supported. For example, an
application built on an AIX 7.1 system with xlC.rte VRMF 13.1.0.1 is supported on
When upgrading an operating system from AIX 5.3 to AIX 6.1 or AIX 7.1, ensure
that the XL C++ runtime environment on the upgraded system matches or exceeds
the version that was previously installed on the AIX 5.3 system.
The procedure to upgrade AIX 5.3 to AIX 6.1 or AIX 7.1 involves automatic
uninstallation of the xlC.aix50.rte fileset, and installing the xlC.aix61.rte fileset
packaged in the operating system upgrade. In some cases, this packaged fileset can
have a lower XL C++ runtime version than the previously installed version on AIX
5.3. Applications used or developed with the previous, higher C++ runtime level
might encounter errors if a lower C++ runtime level is used.
You can check the version of the installed XL C++ runtime environment using the
lslpp -l xlC\* command. If the version is lower than the previously installed
version on AIX 5.3, you can download the latest runtime updates from Fix Central,
or from Latest updates for supported IBM C and C++ compilers. For information
about operating system migration, see “Operating system migration” on page 26.
Related information:
For more information about how to determine the current supported IBM XL C++
runtime environment, see Determining the currently supported IBM XL C++
Runtime Environment for a given AIX OS level.
The IBM Debugger for AIX, V13.1 is included with the XL C/C++ installation
image. This source-level debugger uses a client/server model:
v The debug engine is a server component that is installed on AIX.
v The debug client is a graphical user interface that is installed on Windows
workstations.
Notes:
v The IBM Debugger for AIX, V13.1 supersedes the IBM Distributed Debugger. If
the IBM Distributed Debugger, V9.2 is installed on your system, it will be
removed upon installation of the IBM Debugger for AIX, V13.1. The
post-installation script then modifies the idebug fileset levels in the Object Data
Manager (ODM) database to 99.99.9999.9999 to prevent future installations of
idebug.* filesets.
v The AIX client of the IBM Debugger for AIX is discontinued.
Note: The utilization reporting tool can be installed on the same machine as the
compiler or on a different machine. You must use the installp command to install
the urt12 fileset. The utilization reporting tool typically needs to be installed only
once, no matter how many compiler installations you have. This tool is useful for
those who are responsible for monitoring the overall compiler usage within an
organization. Individual developers and build teams do not need to use this tool.
To install the utilization reporting tool, see the instructions provided in the
README.LANG files found in the urt/ directory, which is located in the root directory
of the installation image.
Note: You must be logged in as the root user or have superuser authority.
To uncompress and unpack the file, use the command:
zcat IBM_XL_C_CPP_V13.1.0.0_AIX.tar.Z | tar -xvf -
The following example shows the steps to prepare the electronic distribution
package, IBM_XL_C_CPP_V13.1.0.0_AIX.tar.Z, located in the /compiler/install/
directory for installation.
cd /compiler/install
zcat IBM_XL_C_CPP_V13.1.0.0_AIX.tar.Z | tar -xvf -
cd usr/sys/inst.images
English (en_US) is the default national language. Following installation, you can
set the NLSPATH so that messages are displayed in a different language. See
“Enabling the XL C/C++ error messages” on page 29.
System prerequisites
All system prerequisites must be ready on your system before XL C/C++ and its
documentation can be successfully installed and run.
v Supported operating systems:
– AIX V6.1 TL 2 Service Pack 5 or later
– AIX V7.1
– IBM i V7.1 PASE V7.1
Note: Additional filesets must be installed on these systems. For details, see
“Required filesets for installing XL C/C++” on page 8.
v Required hard disk space: 500 MB
v Required software for documentation:
– HTML browser
– PDF viewer
You can use the following command to determine the amount of space available in
the default installation location (/opt/IBM/xlC/13.1.0/):
df -m /opt
If you plan to install the compiler to a non-default location, you can use the
following command:
df -m installation_path
The following filesets must be installed on your system to install IBM XL C/C++
for AIX, V13.1:
You can view information about the installed filesets by using the lslpp command.
For example, to determine if the required filesets have been installed, use the
following command:
lslpp -L bos.adt.include bos.adt.lib bos.adt.libm bos.loc.\* bos.rte bos.rte.libc
This message indicates that the bos.adt.libm fileset is required but not installed.
You can find the required bos.* filesets on your AIX OS installation image.
Note: For the evaluation copy of the XL C/C++ for AIX compiler, the license files
are LicenseAgreement.EVAL.pdf and license.EVAL.pdf.
These license files can be found in the /opt/IBM/xlC/13.1.0/ directory after basic
installation.
Note: You can use the utilization tracking and reporting feature to ensure the
compiler usage is compliant with the number of Concurrent User licenses you
have purchased. For more information, see Tracking and reporting compiler usage
in the XL C/C++ Compiler Reference.
Using SMIT
You can use the System Management Interface Tool (SMIT) to preview the basic XL
C/C++ installation.
Follow the steps to install the compiler to the default location given in “Using
SMIT” on page 13. When prompted with the SMIT dialog to customize the
installation in step 3, set the Preview only? field to yes. With this setting enabled,
SMIT displays progress messages at each stage of the installation but does not
actually install the compiler on your system.
Using installp
You can also preview the command line installation process and write the output
to a log file, using the installp command. Follow the steps to install the compiler
to the default location given in “Using installp” on page 14 and specify the -p flag
to preview the process without installing the compiler.
The following example previews the installation of all the available compiler
filesets in the /cdrom/usr/sys/inst.images source directory and writes an
installation log file to /tmp/install.log.
Example:
installp -paXgd /cdrom/usr/sys/inst.images -e /tmp/install.log all
The basic installation is the easiest and fastest method because it can install the
latest version and configure the compiler, all through the use of a single
installation tool.
If you are using the basic installation to install IBM XL C/C++ for AIX, V13.1, any
previous version of the XL compiler will not be uninstalled. However, the C++
runtime library and the shared-memory parallelism (SMP) runtime library will be
migrated to the new versions.
If you are not installing IBM XL C/C++ for AIX, V13.1 to the default directory, do
not use basic installation. Instead, see the procedures in Chapter 3, “Advanced
installation,” on page 15.
The following basic installation methods install XL C/C++ to the default directory.
If you have the root access or an account with superuser privileges, you can use
the Bundle installation method, the System Management Interface Tool (SMIT), or
the installp command to install the compiler.
You can use the basic installation methods to perform any of the following tasks:
v Install IBM XL C/C++ for AIX, V13.1 on a clean system.
v Install IBM XL C/C++ for AIX, V13.1 on a system that has a previous version of
the XL compiler installed. In this case, both compilers will use the C++ runtime
library and the SMP runtime library provided with IBM XL C/C++ for AIX,
V13.1.
v Install IBM XL C/C++ for AIX, V13.1 on a system where IBM XL Fortran for
AIX, V15.1 is already installed. In this case, both compilers will use the SMP and
MASS libraries provided with XL C/C++ for AIX. (For information about
installing XL Fortran, see the IBM XL Fortran for AIX, V15.1 Installation Guide.)
v Install an update on a system where IBM XL C/C++ for AIX, V13.1 has already
been installed. In this case, use the procedure in Chapter 4, “Update
installation,” on page 21.
To install the compiler using the bundle installation method, take the following
steps:
Procedure
1. As the root user, install the compiler bundle fileset xlCcmp.13.1.0.bundle,
using the installp command. You can skip this step if you are upgrading from
the evaluation version and the fileset is already installed on the system.
installp -aXd . xlCcmp.13.1.0.bundle
2. Enter the following command from the command line to start Smit easy mode:
# smitty easy_install
3. Enter the name of the installation device. It is the path in which the filesets can
be found; for example, /usr/sys/inst.images. If the filesets are in your current
directory, you can use “.” as the input device.
* INPUT device / directory for software [.]
4. From the selection screen, select the package that you need.
v If you are installing the evaluation version on AIX V6.1 or V7.1, choose
xlCcmp.13.1.0-evaluation.
v If you are installing or upgrading to the licensed version on AIX V6.1 or
V7.1, choose xlCcmp.13.1.0-licensed.
5. Change the following values provided on the bundle screen as appropriate to
your situation, and press Enter to continue.
v You can change the AUTOMATICALLY install requisite software? option to
yes to install the compiler automatically.
v You can change the EXTEND file systems if space needed? option to yes to
extend file systems.
Note: Using the bundle installation method prevents the installation tools from
installing filesets that are not supported by your operating system. Therefore,
no failures and error messages caused by unsupported filesets are generated as
mentioned in “Using SMIT” and “Using installp” on page 14.
Using SMIT
The SMIT guides you step by step through the installation process.
Procedure
1. Enter the command smit install_latest. This command runs the SMIT, which
presents a menu-driven user interface for the installation process. You must
specify the INPUT device/directory of the software.
2. Press F4 to select from a list of suggested devices and directories, or type in the
name of the CD-ROM device or the path to the location of the packages. If you
want to install over a network you must have a network server installed, and
then specify the directory on the client that corresponds to the installation
source on the network server.
3. Press Enter. At this stage you are prompted with a list of questions that can
help you customize the compiler installation on your system. Verify the default
values, or modify them where necessary to accommodate your preferences.
Important: You must select yes next to Accept new LICENSE agreements? to
continue with the installation.
Note:
v You can select the SOFTWARE to install field and press F4 to view the
installable filesets on the device or in the directory, then select the filesets to
install. Install the runtime libraries first, then install the other filesets in any
order. It is recommended that you keep the default setting, _all_latest, to
install all the filesets.
v To preview the installation process without actually installing the compiler
select yes next to the Preview only? field.
4. Press Enter and then Enter again.
Notes:
v The runtime libraries and compiler filesets are always required.
v You do not need all of the compile-time and runtime message catalogs, only
those for the national languages that you need for compile-time and runtime
messages.
v Messages are displayed as each part is successfully installed.
v The installation log is stored in the /home/smit.log file.
To install the compiler and write the installation output to a log file using the
installp command, follow these steps:
-aYg
Specifies that all the latest installable filesets available in the
install_images_location directory are applied and that the required software
license agreement is accepted.
-p
Performs a preview of the installation process by running the preinstallation
checks. See previewing the installation.
-X
Attempts to expand the file system at the default location if there is insufficient
space to complete the install.
-d install_images_location
Specifies the directory where the filesets are located. This path may also be a
mounted CD-ROM drive.
-e logfile
Specifies the name and location of the installation log file.
fileset_names
Specifies a list of names of the filesets in install_images_location that you want
to install.
Note: The keyword all can be used to indicate that all filesets should be
attempted during installation.
Example:
installp -aXYgd /cdrom/usr/sys/inst.images -e /tmp/install.log all
For information about return codes of the installp command, see "installp
Command" in the IBM AIX documentation at http://www.ibm.com/systems/
power/software/aix/resources.html.
To perform an advanced installation, you need to use the xlCndi Perl script
provided with the installation image, to install XL C/C++ to a non-default
directory and run multiple versions of XL C/C++ on a single system. The script is
packaged in the xlCcmp.13.1.0.ndi fileset. To avoid unexpected behavior during
installation, do not modify this script.
Procedure
1. First use the installp command to install the xlCcmp.13.1.0.ndi fileset. Run the
command:
installp -aYXgd install_images_location -e logfile xlCcmp.13.1.0.ndi
xlCcmp.13.1.0.license
-aYg
Specifies that all the latest installable filesets available in the
install_images_location directory are applied and that the required software
license agreement is accepted.
-d install_images_location
Specifies the directory where the filesets are located. This path might also
be a mounted CD-ROM drive.
Note: This command automatically installs and accepts the license agreement
fileset, xlCcmp.13.1.0.license, required to install xlCcmp.13.1.0.ndi.
2. Install any available updates to the xlCcmp.13.1.0.ndi fileset. You can download
the latest compiler updates from the support website: http://www.ibm.com/
support/entry/portal/Overview/Software/Rational/XL_C~C++_for_AIX
To check the version number of the xlCcmp.13.1.0.ndi fileset currently installed
on your system, use the following command:
lslpp -l xlCcmp.13.1.0.ndi
To install a new version of the xlCcmp.13.1.0.ndi fileset, use the following
command:
installp -aYgd ptf_images_location -e logfile xlCcmp.13.1.0.ndi
3. Install XL C/C++ by entering the following command:
-b target_dir -rte -version
where:
-d source_path
Specifies the directory where the filesets are located. This path may also be
a mounted CD-ROM drive.
-e logfile
Specifies the name and location of the installation log file. By default, the
installation log file xlCndi.log is stored in your working directory.
-b target_dir
Specifies the location where the filesets to be copied and expanded. By
default, the files are copied to the xlCndi directory in your working
directory. If the directory exists already, you will receive an error message
and the installation will stop.
-rte
Specifies that only the runtime components should be installed.
Note: The -eval option is deprecated and has no effect. The xlCndi Perl script
automatically determines the type of installation that is happening.
The following example uses the xlCndi Perl script to install all available
compiler filesets in the /cdrom/usr/sys/inst.images source directory to the
non-default location, /compiler/xlcpp/ and writes the installation log file to
/tmp/xlcpp.ndi.inst.log.
Example:
perl /opt/IBM/xlC/13.1.0/bin/xlCndi -d /cdrom/usr/sys/inst.images
-b /compiler/xlcpp/ -e /tmp/xlcpp.ndi.inst.log
Results
Users installing XL C/C++ on an IBM i PASE system must use the non-default
installation method because the AIX SMIT and installp utilities are not supported.
If, during installation, the xlCndi script determines that you are installing the
compiler onto a PASE system, it modifies the name of the XL C/C++ configuration
file and one of its variables, oslevel, to match the version of PASE you are running.
For example, if the compiler has been installed on a system running IBM i V7.1
PASE V7.1, xlc.cfg.61 is renamed xlc.cfg.71 and the value of OS level is changed
from 6.1 to 7.1.
Note: If you use the electronic image, you must extract the distribution
package into a case sensitive file system, such as /QOpenSys/. The non-default
installation option -i can only be used if you install the compiler using the CD.
2. Sign on to the system with a user profile that has *ALLOBJ authority. The
compiler product files are owned by this user profile.
3. Start an interactive i PASE terminal session by entering this CL command.
call qp2term
4. Restore the appropriate compiler installation script.
v If you use the electronic distribution package, run the following commands:
cd /QOpenSys/home/user
zcat IBM_XL_C_CPP_V13.1.0.0_AIX.tar.Z | tar -xvf -
restore -qf usr/sys/inst.images/xlCcmp.13.1.0.ndi ./opt/IBM/xlC/13.1.0/bin/xlCndi
v If you use the installation CD, run the following commands:
cd /QOpenSys/home/user
restore -qf /QOPT/CDROM/USR/SYS/INST.IMA/XLC.NDI ./opt/IBM/xlC/13.1.0/bin/xlCndi
Note: You can add the directory that contains the compiler commands to the
$PATH environment variable. The $PATH environment variable specifies the
directories to be searched to find a command. For example, if you have installed
XL C/C++ compiler, you can change the $PATH environment variable as follows to
avoid specifying the command path when you use the compiler commands:
export $PATH=$PATH:/QOpenSys/xlcpp/opt/IBM/xlC/13.1.0/bin
For information about installing PTFs for compiler installation updates on the
PASE system, see “Installing PTF updates on the PASE system” on page 22.
For more information about the IBM i V7.1 PASE system, see IBM PASE for i.
For example, if you installed XL C/C++ to the /compiler/xlcpp directory, you can
run the compiler by using this command:
/compiler/xlcpp/opt/IBM/xlC/13.1.0/bin/xlC -o hello_C hello.C
You can download the latest compiler updates from the support website:
http://www.ibm.com/support/entry/portal/Overview/Software/Rational/
XL_C~C++_for_AIX . You can also find the instructions on Fix Central.
If the compiler has been installed to any directory other than /opt/IBM/xlC/
13.1.0/, you must follow the steps outlined in the following table, Table 16.
Table 16. Steps for advanced installation: update installation
Task For more information, see . . .
Become either the root user or a user with Documentation supplied with the
administrator privileges. operating system.
Ensure that all system prerequisites are met. “System prerequisites” on page 7
Download, uncompress, and unpack the PTF “Preparing a PTF package for
package. installation” on page 22
Generate a .toc file. “Preparing a PTF package for
installation” on page 22
Install any PTF updates to the xlCcmp.13.1.0.ndi “Using SMIT” on page 23 or
fileset using SMIT or installp. “Using installp” on page 24
Use the non-default installation script to install “Updating an advanced installation
further updates. using xlCndi” on page 24
Use the following instructions to prepare the update package for installation:
Before installing the PTFs, you must have already installed the compilers on the
PASE system using the steps in “Installing on an IBM i PASE system” on page 18.
To install PTFs for the XL C/C++ compiler on i PASE, follow these steps:
1. Obtain the PTF package files to be installed.
2. Uncompress and then untar the PTF package files. If you have downloaded the
compressed TAR images to the /QOpenSys/ptf/ directory, you can use the
following commands from a QP2TERM command line:
cd /QOpenSys/ptf
uncompress <filename.tar.Z>
tar -xvf <filename.tar>
3. Create a file containing a list of the PTF packages to be installed. To do so, use
the following commands on a QP2TERM command line:
cd /QOpenSys/ptf
ls *.bff > ptflist.txt
4. Check and update, if necessary, the non-default installation (NDI) tool itself.
The updated version of the NDI tool needs to be restored first in order to use
the updated version to install the rest of the PTF package. To do so, use the
following commands:
Notes:
v If the ls command returns an error message indicating the file does not exist,
it means the NDI tool is not updated by the PTF package. Skip this
command and continue with the next step in the instructions.
v If the ls command does return a file name, make a note of this file name and
use that file name in the restore command. For example, if the file name
returned is xlCcmp.13.1.0.ndi.0000.0006.bff, then replace the
xlCcmp.13.1.0.ndi.V.R.M.F.bff file name shown in the restore command
with the actual name returned results in the following restore command:
restore -qf xlCcmp.13.1.0.ndi.V.R.M.F.bff ./opt/IBM/xlC/13.1.0/bin/xlCndi
5. Run the installation script to install the PTFs. Enter the following command
from the QP2TERM command line:
/QIBM/ProdData/DeveloperTools/pase/bin/perl ./opt/IBM/xlC/13.1.0/bin/xlCndi \
/QOpenSys/ptf -b /QOpenSys/xlcpp -u /QOpenSys/ptf/ptflist.txt
The installation script creates a compressed TAR backup of the compiler files that
exist before the PTF update. If you use the directories as shown in these
instructions, this file is named /QOpensys/xlcpp.backup.tar.Z. If a problem is
encountered with the installation of the PTF update or with the PTF update itself,
you can restore from this backup to uninstall the PTF update.
Using SMIT
About this task
Procedure
1. Run the command: smit update_all. This command invokes the SMIT, which
presents a menu-driven user interface for the installation process.
2. When asked to, specify the INPUT device/directory of the software, enter the
path of the directory where the PTF filesets and .toc are located.
3. Press Enter.
At this stage, you are prompted with a list of questions that will help you
customize the compiler installation on your system. Verify the default values,
or modify them where necessary, to accommodate your preferences. Do not
modify the value in the "SOFTWARE to install" field.
4. Press Enter and then Enter again.
Messages are displayed as each part is successfully installed, and the
installation log is stored to /home/smit.log.
Note: If you have migrated your system to a new operating system version,
use smit install_all to ensure all filesets related to this operating system
version are installed.
To install a PTF by using the installp command and write the output to a log file,
follow these steps:
Note: The keyword all can be used to indicate that all filesets must be
attempted during installation.
The following example installs all available PTF filesets in the /compiler/update/
source directory to the default locations, as specified in “Filesets” on page 1, and
writes an installation log file to /tmp/install.log.
Example:
installp -aXgd /compiler/update/ -e /tmp/install.log all
Note: The xlCndi tool enforces that you install the PTF xlCcmp.13.1.0.ndi fileset
before using the tool to install the PTF to a non-default location.
update.list contains all the updated fileset names, one for each line. For
example:
xlccmp.13.1.0.1.bff
3. Use the perl command to run the xlCndi script:
-e logfile -b target_dir -rte -version
where:
-d source_path
Specifies the directory where the filesets are located. This path might also
be a mounted CD-ROM drive.
-u ptf_names_file
Specifies the text file containing the names of PTF filesets you want to
install.
-e logfile
Specifies the name and location of the installation log file. By default, the
installation log file xlCndi.log will be stored in your working directory.
-b target_dir
Specifies the directory where the compiler you are updating is installed.
-rte
Specifies that only the runtime component is installed.
-version
Displays the version of the non-default installation tool.
The compiler filesets are not OS specific and do not require migration if XL C/C++
V13.1 is installed on AIX 6.1 and the operating system is migrated to AIX 7.1. If an
OS specific fileset is required in the future for a higher level of AIX, it will be
identified in a Tech Note tied to the PTF that adds support for that version of AIX.
Using lslpp
You can view information on the installed filesets by using the lslpp command:
lslpp option_string
Note: lslpp detects only filesets that have been installed using the SMIT or installp
methods.
Using -qversion
To get more details about the version, release, and PTF levels of the compiler, you
can use the -qversion compiler option. For more information, see "-qversion" in the
XL C/C++ Compiler Reference.
If you have installed XL C/C++ to a non-default location, you can view the
version information for each fileset installed by viewing the .vrmf_history text file
that is installed in the compiler's main directory.
Note: You must not edit this file because it might cause unexpected behavior of
the xlCndi script.
Enabling IBM License Metric Tool (ILMT) and Tivoli Asset Discovery for
Distributed (TADd)
IBM License Metric Tool (ILMT) and Tivoli® Asset Discovery for Distributed
(TADd) can help you manage software usage metering and license allocation
services on supported systems. In general, ILMT and TADd recognize and monitor
the products that are installed and in use on your system.
ILMT and TADd are enabled for IBM XL C/C++ for AIX, V13.1 for inventory
support only, which means that ILMT and TADd can detect product installation of
XL C/C++ but not its usage.
Note: ILMT and TADd are not a part of the XL C/C++ compiler offering, and
must be purchased and installed separately.
Once installed and activated, ILMT and TADd scan your system for product
inventory signatures that indicate whether a given product is installed on your
system. ILMT and TADd also identify the version, release, and modification levels
of the product. Inventory signature files are not updated after PTF installation.
If XL C/C++ is installed in the default location, the signature files are in the
/opt/IBM/xlC/13.1.0/ directory. Otherwise, if XL C/C++ is installed in a
non-default location, the signature files are in the /target_dir/opt/IBM/xlC/
13.1.0/ directory, where target_dir is the target directory for installation specified
by the -b option of the non-default installation script.
For more information, see IBM License Metric Tool and Tivoli Asset Discovery for
Distributed.
If you are using XL C/C++ on a system running AIX 6.1, the configuration file is
/opt/IBM/xlc/13.1.0/etc/xlc.cfg.61, and if you are on a system running AIX 7.1,
the configuration file is /opt/IBM/xlc/13.1.0/etc/xlc.cfg.71. The GCC options
configuration file is gxlc.cfg.
For more information about how to change the XL C/C++ compiler's settings, see
Customizing the configuration file and Configuring the gxlc or gxlc++ option
mapping in the XL C/C++ Compiler Reference.
You can use the echo command to determine the current setting of these variables:
echo -e "\n $LANG \n\n $NLSPATH \n\n $MANPATH \n\n $PATH"
LANG Specifies the national language for message and help files. See
“National language support” on page 7.
MANPATH Optionally specifies the directory search path for finding man
pages. MANPATH must contain /opt/IBM/xlC/13.1.0/man/$LANG
before the default man path.
NLSPATH Specifies the path name of the message and help files.
PATH Specifies the directory search path for the executable files of the
compiler.
Note: The LANG and NLSPATH environment variables are initialized when the
operating system is installed, and might differ from the ones you want to use.
Substitute any valid national language code for ja_JP, provided the associated
message catalogs are installed.
Before you can view the manual pages, you must add the manual page directory
to the MANPATH environment variable by entering the following command:
export MANPATH=$MANPATH:/opt/IBM/xlC/13.1.0/man/LANG
For example, to set the language of the manual pages to English, run the
commands:
MANPATH=$MANPATH:/opt/IBM/xlC/13.1.0/man/en_US
export MANPATH
Alternatively, to set the language of the manual pages to one of the other
supported languages, run the command:
MANPATH=$MANPATH:/opt/IBM/xlC/13.1.0/man/$LANG
export MANPATH
To test whether the manual pages have been successfully installed, open one or
more of the manual pages, as described in “Viewing the manual pages” on page
33.
Either
v Create symbolic links for the specific drivers from /opt/IBM/xlc/13.1.0/bin/
and /opt/IBM/xlC/13.1.0/bin/ to /usr/bin/.
Example:
ln -s /opt/IBM/xlC/13.1.0/bin/xlc /usr/bin/xlc
or
v Add /opt/IBM/xlc/13.1.0/bin/ and /opt/IBM/xlC/13.1.0/bin/ to your PATH
environment variable.
Example:
PATH=$PATH:/opt/IBM/xlC/13.1.0/bin/
export PATH
Notes:
v You must have the root access to launch and shut down the information center.
v Before you run the information center, you must ensure the machine is running
in the 64–bit mode. It must display 64 when you run the following command:
bootinfo -K
Note: The downloaded information center does not contain the documentation for
IBM Debugger for AIX, V13.1. You can access the debugger documentation, which
consists of HTML online help and additional HTML documents, from its graphical
user interface.
See “Related information” on page ix for a list of IBM XL C/C++ publications and
descriptions of the PDF files available with the product.
For instructions about how to enable the man pages for viewing, see “Enabling the
manual pages” on page 30.
Example:
man xlc
For example:
1. Create the following C and C++ programs:
[hello.c]
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
[hello.cpp]
#include <iostream>
int main()
{
std::cout << "Hello World!\n" << std::endl;
return 0;
}
2. Compile the test programs. For example:
xlc hello.c -o hello
xlc++ hello.cpp -o hello
Notes:
1. You must have the root access to uninstall XL C/C++.
2. Some filesets might not be uninstalled if they are required by other installed
products. See “Filesets” on page 1 for details about filesets included with IBM
XL C/C++ for AIX, V13.1.
3. Because automatically uninstalling dependent packages might cause problems,
it is recommended that you preview uninstallation to ensure that all dependent
filesets are no longer required.
If you attempt to remove a fileset that is required by another installed fileset, the
selected fileset will not be removed unless its dependents are also being removed.
Using SMIT
The following steps illustrate how to uninstall IBM XL C/C++ for AIX, V13.1 using
the SMIT interface:
v Run the command:
smit remove
v In the SOFTWARE name field, enter the fileset names (wildcards accepted)
separated by a space. If you have XL Fortran installed in its default location, you
must not remove any filesets which are shared between the compilers. In this
case, enter the following name in the field:
xlccmp.13.1.0* xlCcmp.13.1.0*
If you also want to uninstall the SMP library, enter the following name in the
field. (Generally, you are not recommended to do this, because you might have
applications that are dependent on this runtime library.)
xlsmp.*
To uninstall IBM Debugger for AIX, V13.1, you also need to enter the following
name in the field:
ibmdebugger
In the REMOVE dependent software? field, select yes.
Note: To preview the uninstallation, set the PREVIEW only? value to yes.
To uninstall IBM XL C/C++ for AIX, V13.1 using the installp command, enter the
following command on the command line:
installp -ug filesets
If you have XL Fortran installed in its default location, you must not remove any
filesets which are shared between the compilers. In this case, filesets should be:
xlccmp.13.1.0\* xlCcmp.13.1.0\*
If you also want to uninstall the SMP library, enter the following name in the field.
(Generally, you are not recommended to do this, because you might have
applications that are dependent on this runtime library.)
xlsmp.\*
To uninstall IBM Debugger for AIX, V13.1, enter the following command:
installp -ug ibmdebugger
To determine which version of each fileset is installed, see “Checking compiler and
fileset information” on page 27.
where target_dir is the target directory for installation specified by the -b option of
the non-default installation script.
To uninstall the xlCcmp.13.1.0.ndi and the license agreement filesets, enter the
following command:
installp -u xlCcmp.13.1.0.ndi xlCcmp.13.1.0.license
If you are uninstalling an evaluation version of the compiler, enter the following
command to uninstall the xlCcmp.13.1.0.ndi and the xlCcmp.13.1.0.evaluation
filesets:
installp -u xlCcmp.13.1.0.ndi xlCcmp.13.1.0.evaluation
where mass_directory is the location of the MASS libraries. If you have created
symbolic links in the /usr/lib/ directory to the libraries in the MASS directory,
you must delete them as well. The compiler installation automatically handles the
creation of the necessary symbolic links.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Lab Director
IBM Canada Ltd. Laboratory
8200 Warden Avenue
Markham, Ontario L6G 1C7
Canada
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
All statements regarding IBM's future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
© (your company name) (year). Portions of this code are derived from IBM Corp.
Sample Programs. © Copyright IBM Corp. 1998, 2014.
Adobe and the Adobe logo are either registered trademarks or trademarks of
Adobe Systems Incorporated in the United States, other countries, or both.
Windows and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Notices 41
42 XL C/C++: Installation Guide
Index
Special characters H PTF 21
N
D national language support 7
debugger 5 non-default installation 15
default installation 11
documentation 31
HTML 31
man pages 33
O
operating system
PDF 32
migration 26
required 7
E
electronic distribution package 6
environment variables, setting 29
P
PASE 18
error messages, enabling 30
post-installation 27
pre-installation 1
prerequisites 7
F previewing 9
filesets installation 9
checking 27 license agreements 9
required 8 product version
migration 26
Printed in USA
SC27-4258-00