XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation...

62
IBM XL C/C++ for AIX, V16.1 Installation Guide Version 16.1 SC27-8058-00 IBM

Transcript of XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation...

Page 1: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

IBM XL C/C++ for AIX, V16.1

Installation GuideVersion 16.1

SC27-8058-00

IBM

Page 2: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation
Page 3: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

IBM XL C/C++ for AIX, V16.1

Installation GuideVersion 16.1

SC27-8058-00

IBM

Page 4: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

NoteBefore 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, V16.1 (Program 5765-J12; 5725-C72) and to all subsequent releasesand modifications until otherwise indicated in new editions. Make sure you are using the correct edition for thelevel of the product.

© Copyright IBM Corporation 2003, 2018.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

Page 5: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Contents

About this document . . . . . . . . . vWho should read this document . . . . . . . . vHow to use this document. . . . . . . . . . vHow this document is organized . . . . . . . viConventions . . . . . . . . . . . . . . viRelated information . . . . . . . . . . . . x

Available help information. . . . . . . . . xStandards and specifications. . . . . . . . xii

Technical support . . . . . . . . . . . . xiiiHow to send your comments . . . . . . . . xiii

Chapter 1. Installing IBM XL C/C++ forAIX, V16.1 . . . . . . . . . . . . . . 1Prerequisites . . . . . . . . . . . . . . 3

System prerequisites . . . . . . . . . . . 3Preparing the electronic distribution package . . 5Product fileset reference . . . . . . . . . 5Previewing the license agreements. . . . . . 10Previewing the default installation process . . . 10

Determining the installation procedure . . . . . 11Default installation (AIX) . . . . . . . . . . 12

Using the bundle installation method. . . . . 12Using SMIT . . . . . . . . . . . . . 13Using installp . . . . . . . . . . . . 14

Nondefault installation (AIX) . . . . . . . . 15Installation on an IBM i PASE system. . . . . . 17Testing the installation. . . . . . . . . . . 18

Checking compiler and fileset information . . . 18Testing simple programs . . . . . . . . . 19

Setting up IBM XL C/C++ for AIX, V16.1 . . . . 20Enabling and setting up utilization tracking . . 20

Enabling IBM License Metric Tool (ILMT) andTivoli Asset Discovery for Distributed (TADd) . . 20Configuring compiler defaults . . . . . . . 21Enabling the XL C/C++ error messages . . . . 21Creating shortcuts to the XL C/C++ invocationcommands. . . . . . . . . . . . . . 22Accessing the local documentation . . . . . 22

Chapter 2. Updating to latest release 25

Chapter 3. Updating to latest fix pack 27Prerequisites for fix packs . . . . . . . . . 28Updating a default installation . . . . . . . . 28Updating an nondefault installation using xlCndi. . 29Installing fix pack on the PASE system . . . . . 31

Chapter 4. Updating from evaluation tofull version . . . . . . . . . . . . . 33

Chapter 5. Uninstalling IBM XL C/C++for AIX, V16.1 . . . . . . . . . . . . 35Uninstalling a default installation . . . . . . . 36Uninstalling a nondefault installation . . . . . . 37Uninstalling versions of the MASS components . . 37

Notices . . . . . . . . . . . . . . 39Trademarks . . . . . . . . . . . . . . 41

Index . . . . . . . . . . . . . . . 43

© Copyright IBM Corp. 2003, 2018 iii

Page 6: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

iv XL C/C++: Installation Guide

Page 7: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

About this document

This guide provides detailed installation instructions for IBM® XL C/C++ for AIX®,V16.1. It includes multiple installation procedures that you can follow based onyour installation requirements and scenarios. Specific instructions are given incases requiring atypical installation. It also shows you how to test the installation,launch remotely-accessible HTML help, and enable and view different types ofdocumentation. Read it carefully before installing the compiler. You can also readthe README file in the root directory of your installation media, which containscurrent information about the compiler.

Who should read this documentThis document is intended for anyone who is responsible for installing IBM XLC/C++ for AIX, V16.1.

The majority of users can follow the default installation method detailed in thisdocumentation. Basic examples are tailored to reflect, as much as possible, the stepsrequired to perform a default installation.

The nondefault installation method addresses the needs of users who require acustomized installation for various purposes, such as maintaining more than oneversion of XL C/C++ on a single system. These are users who are familiar withcompiler installations and the file structures of the versions of the compilerproducts installed on the system. Advanced examples are tailored to reflect, as muchas possible, the steps required to perform a nondefault installation.

How to use this documentThis document provides procedures for three main installation scenarios:

Default installation

This scenario allows you to install a single version of XL C/C++ to adefault location. This scenario is applicable to the majority of users, and isthe recommended method of installation.

For an overview of the steps that you need to follow to perform a defaultinstallation, see “Default installation (AIX)” on page 12.

Nondefault installation

This scenario allows you to maintain multiple versions of XL C/C++ on asingle system, or to install the compiler to a nondefault location. Thisscenario is applicable only to nondefault users who have specialized needs,and is not recommended for the majority of users.

For an overview of the steps that you need to follow to perform annondefault installation, see “Nondefault installation (AIX)” on page 15.

Update installation

This scenario applies to users who have obtained a fix pack for an existingXL C/C++ V16.1 installation.

For an overview of the steps required to install a fix pack, see Chapter 3,“Updating to latest fix pack,” on page 27.

© Copyright IBM Corp. 2003, 2018 v

Page 8: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

For highly specialized installation scenarios that are outside the scope of thisdocument, see the Technotes at https://www.ibm.com/us-en/marketplace/xl-cpp-aix-compiler-power .

How this document is organizedThis book is organized to reflect the pre-installation, installation, post-installation,and troubleshooting phases of an XL C/C++ installation.

Table 1. Phases of an XL C/C++ installation

Phase Chapters User segment

Pre-installation “System prerequisites” onpage 3

All users

Installation “Default installation(AIX)” on page 12

v Users who want to use the simplest, mostdirect installation process

v Users who do not have any specialrequirements, such as the use of multipleversions of the compiler

“Nondefault installation(AIX)” on page 15

v Users who want to install the compiler ina nondefault location

v Users who want to have multiple versionsof the compiler on the same system

Post-installation Chapter 3, “Updating tolatest fix pack,” on page 27

Users who want to update XL C/C++ V16.1to the next fix level

All users

Productremoval

Chapter 5, “UninstallingIBM XL C/C++ for AIX,V16.1,” on page 35

Any user who needs to remove an XLC/C++ compiler from the system

ConventionsTypographical conventions

The following table shows the typographical conventions used in the IBM XLC/C++ for AIX, V16.1 information.

Table 2. Typographical conventions

Typeface Indicates Example

bold Lowercase commands, executablenames, compiler options, anddirectives.

The compiler provides basicinvocation commands, xlcand xlC(xlc++), along with several othercompiler invocation commands tosupport various C/C++ languagelevels and compilation environments.

italics Parameters or variables whoseactual names or values are to besupplied by the user. Italics arealso used to introduce new terms.

Make sure that you update the sizeparameter if you return more thanthe size requested.

underlining The default setting of a parameterof a compiler option or directive.

nomaf | maf

vi XL C/C++: Installation Guide

Page 9: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Table 2. Typographical conventions (continued)

Typeface Indicates Example

monospace Programming keywords andlibrary functions, compiler builtins,examples of program code,command strings, or user-definednames.

To compile and optimizemyprogram.c, enter: xlc myprogram.c-O3.

Qualifying elements (icons)

Most features described in this information apply to both C and C++ languages. Indescriptions of language elements where a feature is exclusive to one language, orwhere functionality differs between languages, this information uses icons todelineate segments of text as follows:

Table 3. Qualifying elements

IconShortdescription Meaning

C

C

C only begins /

C only ends

The text describes a feature that is supported in the Clanguage only; or describes behavior that is specific tothe C language.

C++

C++

C++ only begins/

C++ only ends

The text describes a feature that is supported in theC++ language only; or describes behavior that isspecific to the C++ language.

C11

C11

C11 begins /

C11 ends

The text describes a feature that is introduced intostandard C as part of C11.

C++11

C++11

C++11 begins /

C++11 ends

The text describes a feature that is introduced intostandard C++ as part of C++11.

C++14

C++14

C++14 begins /

C++14 ends

The text describes a feature that is introduced intostandard C++ as part of C++14.

IBM

IBM

IBM extensionbegins /

IBM extensionends

The text describes a feature that is an IBM extension tothe standard language specifications.

About this document vii

Page 10: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Table 3. Qualifying elements (continued)

IconShortdescription Meaning

xlc/xlC

xlc/xlC

IBM XL C/C++for AIX that isinvoked bylegacyinvocationsbegins/

IBM XL C/C++for AIX that isinvoked bylegacyinvocations ends

The text describes a feature that is specific to IBM XLC/C++ for AIX that is invoked by legacy invocations,such as xlc and xlC. For the full list of the legacyinvocations, see Legacy invocation commands in theXL C/C++ Compiler Reference.

xlclang/xlclang++

xlclang/xlclang++

IBM XL C/C++for AIX that isinvoked byxlclang/xlclang++invocationsbegins/

IBM XL C/C++for AIX that isinvoked byxlclang/xlclang++invocations ends

The text describes a feature that is specific to IBM XLC/C++ for AIX that is invoked by xlclang andxlclang++.

Syntax diagrams

Throughout this information, diagrams illustrate XL C/C++ syntax. This sectionhelps you to interpret and use those diagrams.v Read the syntax diagrams from left to right, from top to bottom, following the

path of the line.The ►►─── symbol indicates the beginning of a command, directive, or statement.The ───► symbol indicates that the command, directive, or statement syntax iscontinued on the next line.The ►─── symbol indicates that a command, directive, or statement is continuedfrom the previous line.The ───►◄ symbol indicates the end of a command, directive, or statement.Fragments, which are diagrams of syntactical units other than completecommands, directives, or statements, start with the │─── symbol and end withthe ───│ symbol.

v Required items are shown on the horizontal line (the main path):

►► keyword required_argument ►◄

v Optional items are shown below the main path:

►► keywordoptional_argument

►◄

viii XL C/C++: Installation Guide

Page 11: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

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 mainpath.

►► keyword required_argument1required_argument2

►◄

If choosing one of the items is optional, the entire stack is shown below themain path.

►► keywordoptional_argument1optional_argument2

►◄

v An arrow returning to the left above the main line (a repeat arrow) indicatesthat you can make more than one choice from the stacked items or repeat anitem. 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.

►► keyworddefault_argumentalternate_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.

Sample syntax diagram

The following syntax diagram example shows the syntax for the #pragmacomment directive.

►►(1) (2) (3) (4) (5) (9) (10)

# pragma comment ( compiler )datetimestamp

(6)copyrightuser (7) (8)

, " token_sequence "

►◄

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.

About this document ix

Page 12: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

7 A comma must appear between the comment type copyright or user, and anoptional character string.

8 A character string must follow the comma. The character string must beenclosed 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 correctaccording to the diagram shown above:

#pragma comment(date)#pragma comment(user)#pragma comment(copyright,"This text will appear in the module")

Example of a syntax statementEXAMPLE char_constant {a|b}[c|d]e[,e]... name_list{name_list}...

The following list explains the syntax statement:v Enter the keyword EXAMPLE.v Enter a value for char_constant.v Enter a value for a or b, but not for both.v Optionally, enter a value for c or d.v Enter at least one value for e. If you enter more than one value, you must put a

comma between each.v Optionally, enter the value of at least one name for name_list. If you enter more

than one value, you must put a comma between each name.

Note: The same example is used in both the syntax-statement and syntax-diagramrepresentations.

Examples in this information

The examples in this information, except where otherwise noted, are coded in asimple style that does not try to conserve storage, check for errors, achieve fastperformance, or demonstrate all possible methods to achieve a specific result.

The examples for installation information are labelled as either Example or Basicexample. Basic examples are intended to document a procedure as it would beperformed during a default installation; these need little or no modification.

Related informationThe following sections provide related information for XL C/C++:

Available help informationIBM XL C/C++ information

XL C/C++ provides product information in the following formats:v Quick Start Guide

The Quick Start Guide (quickstart.pdf) is intended to get you started with IBMXL C/C++ for AIX, V16.1. It is located by default in the XL C/C++ directoryand in the \quickstart directory of the installation DVD.

v README files

x XL C/C++: Installation Guide

Page 13: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

README files contain late-breaking information, including changes andcorrections to the product information. README files are located by default inthe XL C/C++ directory and in the root directory of the installation DVD.

v Installable man pagesMan pages are provided for the compiler invocations and all command-lineutilities provided with the product. Instructions for installing and accessing theman pages are provided in the IBM XL C/C++ for AIX, V16.1 Installation Guide.

v Online product documentationThe fully searchable HTML-based documentation is viewable in IBM KnowledgeCenter at http://www.ibm.com/support/knowledgecenter/SSGH3R_16.1.0/com.ibm.compilers.aix.doc/welcome.html.

v PDF documentsPDF documents are available on the web at https://www.ibm.com/support/knowledgecenter/SSGH3R_16.1.0/com.ibm.compilers.aix.doc/download_pdf.html.The following files comprise the full set of XL C/C++ product information.

Note: To ensure that you can access cross-reference links to other XL C/C++PDF documents, download and unzip the .zip file that contains all the productdocumentation files, or you can download each document into the samedirectory on your local machine.

Table 4. XL C/C++ PDF files

Document title PDF file name Description

What's New for IBM XLC/C++ for AIX, V16.1,GC27-8053-00

whats_new.pdf Provides an executive overview of newfunctions in the IBM XL C/C++ forAIX, V16.1 compiler, with newfunctions categorized according to userbenefits.

Getting Started withIBM XL C/C++ for AIX,V16.1, SC27-8055-00

getstart.pdf Contains an introduction to XL C/C++,with information about setting up andconfiguring your environment,compiling and linking programs, andtroubleshooting compilation errors.

IBM XL C/C++ for AIX,V16.1 Installation Guide,SC27-8058-00

install.pdf Contains information for installing XLC/C++ and configuring yourenvironment for basic compilation andprogram execution.

IBM XL C/C++ for AIX,V16.1 Migration Guide,GC27-8051-00

migrate.pdf Contains migration considerations forusing XL C/C++ to compile programsthat were previously compiled ondifferent platforms, by previous releasesof XL C/C++, or by other compilers.

IBM XL C/C++ for AIX,V16.1 CompilerReference, SC27-8057-00

compiler.pdf Contains information about the variouscompiler options, pragmas, macros,environment variables, and built-infunctions, including those used forparallel processing.

IBM XL C/C++ for AIX,V16.1 LanguageReference, SC27-8059-00

langref.pdf Contains information about the C andC++ programming languages, assupported by IBM, including languageextensions for portability andconformance to nonproprietarystandards.

About this document xi

Page 14: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Table 4. XL C/C++ PDF files (continued)

Document title PDF file name Description

IBM XL C/C++ for AIX,V16.1 Optimization andProgramming Guide,SC27-8060-00

proguide.pdf Contains information about advancedprogramming topics, such asapplication porting, interlanguage callswith Fortran code, library development,application optimization andparallelization, and the XL C/C++high-performance libraries.

Standard C++ LibraryReference, SC27-4262-02

standlib.pdf Contains reference information aboutthe standard C++ runtime libraries andheaders.

C/C++ Legacy ClassLibraries Reference,SC09-7652-00

legacy.pdf Contains reference information aboutthe USL I/O Stream Library and theComplex Mathematics Library.

To read a PDF file, use Adobe Reader. If you do not have Adobe Reader, youcan download it (subject to license terms) from the Adobe website athttp://www.adobe.com.

More information related to XL C/C++, including IBM Redbooks® publications,white papers, and other articles, is available on the web at http://www.ibm.com/support/docview.wss?uid=swg27036618.

For more information about the compiler, see the XL compiler on Power®

community at http://ibm.biz/xl-power-compilers.

Other IBM informationv Parallel Environment for AIX: Operation and Use

v The IBM Systems Information Center, at http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.doc/doc/base/aixparent.htm,is a resource for AIX information.You can find the following books for your specific AIX system:– AIX Commands Reference, Volumes 1 - 6

– Technical Reference: Base Operating System and Extensions, Volumes 1 & 2

– AIX National Language Support Guide and Reference

– AIX General Programming Concepts: Writing and Debugging Programs

– AIX Assembler Language Reference

Other informationv Using the GNU Compiler Collection available at http://gcc.gnu.org/onlinedocs.

Standards and specificationsXL C/C++ is designed to support the following standards and specifications. Youcan refer to these standards and specifications for precise definitions of some of thefeatures found in this information.v Information Technology - Programming languages - C, ISO/IEC 9899:1990, also

known as C89.v Information Technology - Programming languages - C, ISO/IEC 9899:1999, also

known as C99.v xlclang/xlclang++ Information Technology - Programming languages - C, ISO/IEC

9899:2011, also known as C11.

xii XL C/C++: Installation Guide

Page 15: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

v xlc/xlC Information Technology - Programming languages - C, ISO/IEC 9899:2011,also known as C11 (Partial support).

v Information Technology - Programming languages - C++, ISO/IEC 14882:1998, alsoknown as C++98.

v Information Technology - Programming languages - C++, ISO/IEC 14882:2003, alsoknown as C++03.

v xlclang/xlclang++ Information Technology - Programming languages - C++, ISO/IEC14882:2011, also known as C++11.

v xlc/xlC Information Technology - Programming languages - C++, ISO/IEC 14882:2011,also known as C++11 (Partial support).

v xlclang/xlclang++ Information Technology - Programming languages - C++, ISO/IEC14882:2014, also known as C++14.

v xlc/xlC Draft Technical Report on C++ Library Extensions, ISO/IEC DTR 19768. Thisdraft technical report has been submitted to the C++ standards committee, andis available at http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1836.pdf.

v AltiVec Technology Programming Interface Manual, Motorola Inc. This specificationfor vector data types, to support vector processing technology, is available athttp://www.freescale.com/files/32bit/doc/ref_manual/ALTIVECPIM.pdf.

v xlc/xlC Information Technology - Programming Languages - Extension for theprogramming language C to support decimal floating-point arithmetic, ISO/IEC WDTR24732. This draft technical report has been submitted to the C standardscommittee, and is available at http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1176.pdf.

v xlc/xlC Decimal Types for C++: Draft 4 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1977.html

v ANSI/IEEE Standard for Binary Floating-Point Arithmetic, ANSI/IEEE Std 754-1985.

Technical supportAdditional technical support is available from the XL C/C++ Support page athttps://www.ibm.com/mysupport/s/topic/0TO0z0000006v6TGAQ/xl-cc?productId=01t0z000007g72LAAQ. This page provides a portal with searchcapabilities to a large selection of Technotes and other support information.

If you have any question on the product, raise it in the XL C, C++, and FortranCompilers for Power servers community or open a case at https://www.ibm.com/mysupport/s/topic/0TO0z0000006v6TGAQ/xl-cc?productId=01t0z000007g72LAAQ.

For the latest information about XL C/C++, visit the product information site athttps://www.ibm.com/us-en/marketplace/xl-cpp-aix-compiler-power.

How to send your commentsYour feedback is important in helping us to provide accurate and high-qualityinformation. If you have any comments or questions about this information or anyother XL C/C++ information, send [email protected] an email.

Be sure to include the name of the manual, the part number of the manual, theversion of XL C/C++, and, if applicable, the specific location of the text you arecommenting on (for example, a page number or table number).

About this document xiii

Page 16: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

xiv XL C/C++: Installation Guide

Page 17: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1

This section outlines the steps required to install IBM XL C/C++ for AIX, V16.1.

The installation procedure is shown in the following workflow diagram:

© Copyright IBM Corp. 2003, 2018 1

Page 18: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Installa�on

Start

End

Yes

No

IBM i PASE

Test

(op�onal)

Setup

(op�onal)

AIX

Any nondefault

installa�on condi�on

met?

Download

package

Determine

your OS

Default

installa�on

Nondefault

installa�on

Meet

prerequisites

Note: Installing this version of the compiler does not remove or change previousversions of the compiler, only the C++ runtime library and the SMP runtimelibrary are migrated to the new versions. This was achieved by differentiating theinstallation fileset names from those of the previous versions, including the

2 XL C/C++: Installation Guide

Page 19: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

version, release and modification level (V.R.M) in the name, and installing to newlocations that include V.R.M in the installation paths.

PrerequisitesBefore you install IBM XL C/C++ for AIX, V16.1, you must meet the prerequisites.

The prerequisites are as follows:v Become either the root user or a user with administrator privileges.v Ensure that system prerequisites such as disk space and operating system are

met.v Prepare the electronic distribution package.v Optional: Preview the installable compiler filesets, license agreements, and

default installation process.

System prerequisitesAll system prerequisites must be ready on your system before IBM XL C/C++ forAIX and its documentation can be successfully installed.v Supported platforms:

– IBM AIX V7.1 TL4– IBM AIX V7.2– IBM i V7.3 PASE V7.3

Notes:

– The compiler filesets are not OS specific. If IBM XL C/C++ for AIX, V16.1 isinstalled on AIX V7.1, you do not need to migrate the compiler filesets whenthe operating system is migrated to AIX V7.2. If an OS-specific fileset isrequired in the future for a higher level of AIX, it will be identified in aTechnote tied to the fix pack that adds support for that version of AIX.

– To install the compiler on an operating system that is newly supported in afix pack, you must first install the full version and then apply the fix pack.Fix packs are available for download at Fix list for XL C/C++ for AIX. To findout the supported versions of XL compilers on your AIX operating system,see AIX OS levels supported by XL Compilers.

v Required hard disk space: 500 MB.You can use the following command to determine the amount of space availablein the default installation location (/opt/IBM/xlC/16.1.0/):df -m /opt

If you plan to install the compiler to a nondefault location, you can use thefollowing command:df -m installation_path

In this command, installation_path represents the nondefault location.v Required filesets: See the “Required filesets for installing XL C/C++” on page 4

section for details.v Required RAM: 2 GB (Recommended RAM: 4 GB or more)v Required software for documentation:

– HTML browser– PDF viewer

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 3

Page 20: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Required filesets for installing XL C/C++

The following filesets must be installed on your system to install IBM XL C/C++for AIX, V16.1.

Fileset name Fileset description Where to get

bos.adt.include Base application development include files AIX OSinstallationimage orFilesetinformationforbos:adt:include

bos.adt.lib Base application development libraries AIX OSinstallationimage orFilesetinformationfor bos.adt.lib

bos.adt.libm Base application development mathlibraries

AIX OSinstallationimage orFilesetinformationforbos.adt.libm

bos.rte Base operating system run time AIX OSinstallationimage or IBMsupport

bos.rte.libc Base application runtime library AIX OSinstallationimage orFilesetinformationfor bos.rte.libc

At least one of the following locale-specific filesets must be installed on yoursystem. You can find the filesets in your AIX OS installation image or IBM support.

Fileset name Fileset description

bos.loc.LANG Base locale support

bos.loc.pc.LANG Base system locale PC code set

bos.loc.utf.LANG Base system locale UTF code set

bos.loc.iso.LANG Base system locale ISO code set

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 thefollowing command:lslpp -L bos.adt.include bos.adt.lib bos.adt.libm bos.loc.\* bos.rte bos.rte.libc

Note: If one of the required filesets is missing, an error message might begenerated. An example follows.

4 XL C/C++: Installation Guide

Page 21: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

MISSING REQUISITES: The following filesets are required by one or more of theselected filesets listed above. They are not currently installed and could notbe found on the installation media.

bos.adt.libm 6.1.5.1 # Base Level Fileset

This message indicates that the bos.adt.libm fileset is required but not installed.

To install a missing fileset, use the following command:# installp -acXgd installation_path fileset

In this command, installation_path represents the location of the fileset to beinstalled.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Preparing the electronic distribution packageDownload the XL C/C++ electronic distribution package,IBM_XL_C_CPP_V16.1.0.1_AIX.tar.Z, and decompress and unpack it before theinstallation.

Download the electronic distribution package

To download the licensed version of the product, find the instructions available atFix list for IBM XL C/C++ for AIX.

To download the evaluation version of the product, go to IBM XL C/C++ for AIXMarketplace..

Decompress and unpack the electronic distribution package

The following example shows the steps to prepare the electronic distributionpackage, IBM_XL_C_CPP_V16.1.0.1_AIX.tar.Z, located in the /compiler/install/directory for installation.cd /compiler/installzcat IBM_XL_C_CPP_V16.1.0.1_AIX.tar.Z | tar -xvf -cd usr/sys/inst.images

Tip: For an overview of the installation process, see Installation workflowdiagram.

Product fileset referenceThe image includes filesets for the compiler components.

This section lists the filesets that are included in the installation image and thedefault directories to which the fileset contents are installed during a basicinstallation. You might optionally install all available filesets, or only the ones youwant. If you select specific filesets for installation, you might also choose toautomatically install any prerequisite filesets by using the installp -g flag.

XL C compiler filesetsThis topic lists the XL C compiler filesets V16.1.

Note: The XL C compiler fileset names are xlccmp.16.1.0.*.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 5

Page 22: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Table 5. XL C compiler filesets and default installation locations

Fileset name Fileset description Default installation locations

xlccmp.16.1.0 XL C compiler /opt/IBM/xlc/16.1.0//opt/IBM/xlc/16.1.0/bin//opt/IBM/xlc/16.1.0/exe//opt/IBM/xlc/16.1.0/listings//opt/IBM/xlc/16.1.0/etc//opt/IBM/xlc/16.1.0/lib//opt/IBM/xlc/16.1.0/include//opt/IBM/xlc/16.1.0/man//opt/IBM/xlc/16.1.0/doc//opt/IBM/xlc/16.1.0/msg/

xlccmp.16.1.0.bundle XL C media defined bundles /usr/sys/inst.data/sys_bundles/

xlccmp.16.1.0.lib XL C libraries for AIX 7.1, andAIX 7.2

/opt/IBM/xlc/16.1.0/lib/

xlccmp.16.1.0.license XL C license files /opt/IBM/xlc/16.1.0/

xlccmp.16.1.0.ndi XL C nondefault installationscript

/opt/IBM/xlc/16.1.0/bin

Note: All of the filesets required for the XL C compiler, except xlccmp.16.1.0.ndi,are also required for the XL C/C++ compiler.

Tip: For an overview of the installation process, see Installation workflowdiagram.

XL C++ compiler filesetsThis topic lists the XL C/C++ compiler filesets V16.1.

Note: The XL C/C++ compiler fileset names are xlCcmp.16.1.0.*.

Table 6. XL C/C++ compiler filesets and default installation locations

Fileset name Fileset description Default installation locations

xlCcmp.16.1.0 XL C++ compiler /opt/IBM/xlC/16.1.0//opt/IBM/xlC/16.1.0/bin//opt/IBM/xlC/16.1.0/exe//opt/IBM/xlC/16.1.0/listings//opt/IBM/xlC/16.1.0/etc//opt/IBM/xlC/16.1.0/lib//opt/IBM/xlC/16.1.0/include//opt/IBM/xlC/16.1.0/man//opt/IBM/xlC/16.1.0/samples//opt/IBM/xlC/16.1.0/doc//opt/IBM/xlC/16.1.0/msg/

xlCcmp.16.1.0.bundle XL C++ media definedbundles

/usr/sys/inst.data/sys_bundles/

xlCcmp.16.1.0.lib XL C++ libraries /opt/IBM/xlC/16.1.0/lib/

xlCcmp.16.1.0.tools XL C++ tools /opt/IBM/xlC/16.1.0/bin//opt/IBM/xlC/16.1.0/exe/aix61/

xlCcmp.16.1.0.license1 XL C++ license files for theXL C/C++

/opt/IBM/xlC/16.1.0/lib/

xlCcmp.16.1.0.evaluation2 XL C++ license files for theevaluation copy

/opt/IBM/xlC/16.1.0/

6 XL C/C++: Installation Guide

Page 23: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Table 6. XL C/C++ compiler filesets and default installation locations (continued)

Fileset name Fileset description Default installation locations

xlCcmp.16.1.0.ndi XL C++ nondefaultinstallation script

/opt/IBM/xlC/16.1.0/bin/

Notes:

1. Only included in XL C/C++ for AIX, V16.1.

2. Only included in the evaluation copy of the XL C/C++ for AIX compiler.

Tip: For an overview of the installation process, see Installation workflowdiagram.

XL C++ runtime environment filesetsThis topic lists the XL C++ runtime environment V16.1 filesets, and usage notes forinstalling and using the runtime environment.

Table 7. XL C++ runtime environment filesets and default installation locations

Fileset name Fileset description Default installation locations

libc++.rte LLVM runtime libraries /usr/lpp/xlC/lib/aix61/

xlC.adt.include XL C++ application developmenttoolkit

/usr/include/

xlC.rte XL C++ runtime libraries /usr/lpp/xlC/lib//usr/lpp/xlC/lib/profiled/

xlC.aix61.rte XL C++ runtime environment forAIX 7.1 and AIX 7.2

/usr/lpp/xlC/lib/aix61//usr/lpp/xlC/lib/profiled/aix61/

xlC.msg.LANG.rte XL C++ runtime messagesLANG = [en_US, ja_JP, Ja_JP]

/usr/lib/nls/msg/LANG/

Note: The XL C++ runtime environment fileset names are xlC.*.

Difference between the version of the XL C++ runtime environment and theversion of the compiler:

The version of the compiler and the version of the installed XL C++ runtimeenvironment might be different. When a new version of the XL C/C++ for AIXcompiler is released, the version of the XL C++ runtime environment it providesbecomes the standard supported version on all platforms supported by the newcompiler. Fix packs for AIX, and PTFs for the compiler and XL C++ runtimeenvironment all have the potential to upgrade the XL C++ runtime version to alater 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 latestversion at the time.

Backward compatibility of the XL C++ runtime environment to support oldapplications:

Applications compiled with the XL C++ compiler must be run on a system with aninstalled XL C++ runtime environment at the same or higher VRMF level (Version,Release, Modification, Fix level) than on the system the application was compiledon. For example, an older application compiled on a system with xlC.rte VRMF10.1.0.7 installed is supported to run on a system with xlC.rte VRMF 11.1.0.3installed, but not on a system with xlC.rte VRMF 10.1.0.3 installed.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 7

Page 24: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Support to run applications on newer AIX versions:

If the XL C++ runtime environment VRMF level requirement is met, applicationsbuilt on an AIX version are supported to run only on that AIX version or laterversions. For instance, an application built on an AIX 7.2 system with xlC.rteVRMF 16.1.0.1 is supported on an AIX 7.2 system with the xlC.rte VRMF 16.1.0.1runtime environment installed. However, the application is not supported on anAIX 7.1 system, and is also not supported on any AIX version if the xlC.rte VRMFis lower than 16.1.0.1. Applications built on an AIX version might run on a lowerAIX version; however, note that IBM does not warrant or support applicationsbuilt on an AIX version that are run on a lower AIX version.

For more information, see "AIX binary compatibility" in the AIX KnowledgeCenter.

Notes:

v You can check the version of the installed XL C++ runtime environment usingthe lslpp -l xlC\* command.

v You can download the latest runtime updates from Fix Central, or from Latestupdates for supported IBM C and C++ compilers.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Runtime debug memory routine filesetsThis topic lists the runtime debug memory routine filesets V5.5.

Table 8. Runtime debug memory routine filesets and default installation locations

Fileset name Fileset description Default installation locations

memdbg.adt User heap/memory debugtoolkit

/usr/vac/lib//usr/vac/lib/profiled/

memdbg.aix61 User heap/memory debugtoolkit for AIX 7.1, and AIX7.2

/usr/vac/lib/aix61//usr/vac/lib/profiled/aix61/

memdbg.msg.LANG User heap/memory debugmessages

LANG = [en_US, EN_US,ja_JP, JA_JP, Ja_JP, zh_CN,ZH_CN]

/usr/lib/nls/msg/LANG

Tip: For an overview of the installation process, see Installation workflowdiagram.

Shared-memory parallelism (SMP) runtime environment filesetsThis topic lists the SMP runtime filesets V5.1.0.

Table 9. SMP runtime filesets and default installation locations

Fileset name Fileset description Default installation locations

xlsmp.rte SMP runtime library /usr/include//usr/lpp/xlsmp/default_msg/

xlsmp.msg.LANG.rte SMP runtime messagesLANG = [en_US, EN_US,ja_JP, JA_JP, Ja_JP, zh_CN,ZH_CN, Zh_CN]

/usr/lib/nls/msg/LANG/

8 XL C/C++: Installation Guide

Page 25: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Table 9. SMP runtime filesets and default installation locations (continued)

Fileset name Fileset description Default installation locations

xlsmp.aix61.rte SMP runtime libraries for AIX7.1, and AIX 7.2

/usr/lpp/xlsmp/aix61/

Tip: For an overview of the installation process, see Installation workflowdiagram.

Mathematical Acceleration Subsystem (MASS) filesetsThis topic lists the MASS filesets V9.1.0.

Table 10. MASS filesets and default installation locations

Fileset name Fileset description Default installation locations

xlmass.V9.1.0 IBM MASS files /opt/IBM/xlmass/9.1.0//opt/IBM/xlmass/9.1.0/include//opt/IBM/xlmass/9.1.0/lib/

Tip: For an overview of the installation process, see Installation workflowdiagram.

Utilization reporting tool filesetThis topic lists the utilization reporting tool filesets V1.2.

Table 11. Utilization reporting tool fileset and default installation locations

Fileset name Fileset description Default installation locations

urt12 Utilization reporting tool files /opt/ibmurt/1.2//opt/ibmurt/1.2/bin//opt/ibmurt/1.2/config/

urt12.man.LANG Utilization reporting toolmanual page files

LANG = [en_US, EN_US,ja_JP, JA_JP, Ja_JP, zh_CN,ZH_CN]

/opt/ibmurt/1.2/man/LANG/man1/

urt12.msg.LANG Utilization reporting toolmessage files

LANG = [en_US, EN_US,ja_JP, JA_JP, Ja_JP, zh_CN,ZH_CN]

/opt/ibmurt/1.2/msg/LANG/

Note: The utilization reporting tool can be installed on the same machine as thecompiler or on a different machine. You must use the installp command to installthe urt12 fileset. The utilization reporting tool typically needs to be installed onlyonce, no matter how many compiler installations you have. This tool is useful forthose who are responsible for monitoring the overall compiler usage within anorganization. Individual developers and build teams do not need to use this tool.To install the utilization reporting tool, see the instructions provided in theREADME.LANG files found in the urt/ directory, which is located in the root directoryof the installation image.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 9

Page 26: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Previewing the license agreementsBefore installing IBM XL C/C++ for AIX, V16.1, you can preview the licenseagreements.

The terms and conditions for using XL C/C++ are specified in the following PDFfiles, which are located in the root directory of the distribution package:v LicenseAgreement.pdfv license.pdf

Note: For the evaluation copy of the XL C/C++ for AIX compiler, the license filesare LicenseAgreement.EVAL.pdf and license.EVAL.pdf.These license files can be found in the /opt/IBM/xlC/16.1.0/ directory afterdefault installation.

Note: You can use the utilization tracking and reporting feature to ensure thecompiler usage is compliant with the number of Concurrent User licenses youhave purchased. For more information, see Tracking and reporting compiler usagein the XL C/C++ Compiler Reference.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Previewing the default installation processBefore installing IBM XL C/C++ for AIX, V16.1, you can preview the defaultinstallation process using either the System Management Interface Tool (SMIT) orthe installp command.

Using SMIT

You can use the System Management Interface Tool (SMIT) to preview the defaultXL C/C++ installation.

Follow the steps to install the compiler to the default location given in “UsingSMIT” on page 13. When prompted with the SMIT dialog to customize theinstallation 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 notactually install the compiler on your system.

Using installp

You can also preview the command line installation process and write the outputto a log file, using the installp command. Follow the steps to install the compilerto the default location given in “Using installp” on page 14 and specify the -p flagto preview the process without installing the compiler.

The following example previews the installation of all the available compilerfilesets in the /cdrom/usr/sys/inst.images source directory and writes aninstallation log file to /tmp/install.log.

Example:installp -paXgd /cdrom/usr/sys/inst.images -e /tmp/install.log all

Tip: For an overview of the installation process, see Installation workflowdiagram.

10 XL C/C++: Installation Guide

Page 27: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Determining the installation procedureYou must determine the installation procedure that fits your system or installationrequirements before installing the compiler.

On AIX

You must choose either of the following procedures to install the compiler:

Default installation (recommended)Installs IBM XL C/C++ for AIX, V16.1 to the default directory,/opt/IBM/xlC/16.1.0/.

See default installation for more details.

Nondefault installationInstalls XL C/C++ to a nondefault location. Steps are detailed atnondefault installation.

You must follow the nondefault installation procedure if any of thefollowing conditions is true:v You are maintaining multiple fix levels or multiple versions of the

compiler on a single system.v You do not wish to alter the system run times with the compiler

installation.v You are installing the product to a nondefault location.

Restriction: Although nondefault installation gives you more freedom tochoose how many versions of XL C/C++ to keep on your system andwhere to install them, in many ways a nondefault installation is morerestrictive, demanding to implement, and difficult to maintain than defaultinstallation:v The xlCndi script does not check whether prerequisite packages are

installed.v You cannot use this script to install the product filesets individually.v You cannot use AIX tools (such as lslpp) to uninstall or to query

installed filesets for version or release level information.v Service refreshes of the compiler assume a default installation path. For

a non-default compiler installation, the xlCndi script must be used toapply service packages.

v To run xlCndi, you must have Perl version 5.5.3 or higher, runtimeenvironment perl.rte installed on your system. This fileset is suppliedwith the AIX base operating system.

v The xlCndi script requires that the original filesets are not renamed. Thismeans that you cannot install the compiler using filesets that have beencopied by the SMIT suboption "Copy Software to Hard Disk for FutureInstallation" because the version number of the compiler is appended tothe filesets when they are copied.

v The xlCndi tool requires you to install the current fix pack version of thexlCcmp.16.1.0.ndi fileset before the tool can be used to install the fixpack to a non-default location.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 11

Page 28: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

On IBM i PASE

To install the compiler on an IBM i PASE system, you must follow the installationprocedure detailed at “Installation on an IBM i PASE system” on page 17.

Default installation (AIX)The default installation procedure installs IBM XL C/C++ for AIX, V16.1 on anAIX system, to the default directory, /opt/IBM/xlC/16.1.0/.

The default installation is the easiest and fastest method because it can install thelatest version and configure the compiler, all through the use of a singleinstallation tool.

If you are using the default installation to install IBM XL C/C++ for AIX, V16.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 bemigrated to the new versions.

You can use the following methods to perform default installation procedure:v Bundle installation methodv System Management Interface Tool (SMIT)v installp command

You can use the default installation methods to perform any of the following tasks:v Install IBM XL C/C++ for AIX, V16.1 on a clean system.v Install IBM XL C/C++ for AIX, V16.1 on a system that has a previous version of

the XL compiler installed. In this case, both compilers will use the C++ runtimelibrary and the SMP runtime library provided with IBM XL C/C++ for AIX,V16.1.

v Install IBM XL C/C++ for AIX, V16.1 on a system where IBM XL Fortran forAIX, V16.1 is already installed. In this case, both compilers will use the SMP andMASS libraries provided with XL C/C++ for AIX. (For information aboutinstalling XL Fortran, see the IBM XL Fortran for AIX, V16.1 Installation Guide.)

Installation demonstration videos are also available on IBM Education Assistant athttp://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp.

Using the bundle installation methodYou can install XL C/C++ using the bundle installation method. The bundle filesetcontains scripts to help install either the evaluation version or the licensed versionof the compiler.

Procedure1. As the root user, install the compiler bundle fileset xlCcmp.16.1.0.bundle,

using the installp command.installp -aXd . xlCcmp.16.1.0.bundle

2. Enter the following command from the command line to start the Smit easymode:# smitty easy_install

3. Enter the name of the installation device. It is the path in which the filesets canbe found; for example, /usr/sys/inst.images. If the filesets are in your currentdirectory, you can use “.” as the input device.

12 XL C/C++: Installation Guide

Page 29: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

* 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 V7.1, or V7.2, choose

xlCcmp.16.1.0-evaluation.v If you are installing or upgrading to the licensed version on AIX V7.1, or

V7.2, choose xlCcmp.16.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.v You must change the ACCEPT new license agreements? option to yes to

accept new license agreements.6. Scroll to the end of the installation output to check the installation summary.

The output indicates whether the installation of your bundle has beensuccessful. Exit using Esc+0.

Note: Using the bundle installation method prevents the installation tools frominstalling filesets that are not supported by your operating system. Therefore,no error messages or failures that are caused by unsupported filesets aregenerated.

Related information:Installation workflow diagram

Using SMITThe SMIT guides you step by step through the installation process.

Procedure1. Enter the command smit install_latest. This command runs the SMIT, which

presents a menu-driven user interface for the installation process. You mustspecify the INPUT device/directory of the software.

2. Press F4 to select from a list of suggested devices and directories, or type in thename of the CD-ROM device or the path to the location of the packages. If youwant to install over a network you must have a network server installed, andthen specify the directory on the client that corresponds to the installationsource on the network server.

3. Press Enter. At this stage you are prompted with a list of questions that canhelp you customize the compiler installation on your system. Verify the defaultvalues, or modify them where necessary to accommodate your preferences.

Important: You must select yes next to Accept new LICENSE agreements? tocontinue with the installation.

Note:

v You can select the SOFTWARE to install field and press F4 to view theinstallable filesets on the device or in the directory, and then select thefilesets to install. Install the runtime libraries first, and then install the otherfilesets 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.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 13

Page 30: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

4. Press Enter and then press 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 runtimemessages.

v Messages are displayed as each part is successfully installed.v The installation log is stored in the /home/smit.log file.v If the level of the XL C++ or SMP runtime environment filesets that are

already installed on your system is higher than those included in thecompiler image, those runtime environment filesets included in the compilerimage are not installed and you might see an error message.

v If no locale-specific filesets is installed on your system, you might see anerror message for missing the required bos.*.LANG filesets.

Related information:Installation workflow diagram

Using installpYou can install XL C/C++ directly from the command line using the AIX commandinstallp. After the installation is completed, the installation output is written to alog file.

Procedure

Run the the installp command as follows:installp -aXYgd install_images_location -e logfile fileset_names

The following example installs all available compiler filesets in the/LOCATION_OF_EXTRACTED_TARBALL/usr/sys/inst.images source directory to thedefault locations, as specified in “Product fileset reference” on page 5, and writesan installation log file to /tmp/install.log.installp -aXYgd /LOCATION_OF_EXTRACTED_TARBALL/usr/sys/inst.images -e /tmp/install.log all

installp syntax

►► - installp -aYg fileset_names-p -X -d install_images_location -e logfile

►◄

-aYg Specifies that all the latest installable filesets available in theinstall_images_location directory are applied and that the required softwarelicense agreement is accepted.

-p Performs a preview of the installation process by running the preinstallationchecks. See “Previewing the license agreements” on page 10.

-X Attempts to expand the file system at the default location if there is insufficientspace to complete the installation.

-d install_images_locationSpecifies the directory where the filesets are located. This path can also beextracted tarball media.

14 XL C/C++: Installation Guide

Page 31: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

-e logfileSpecifies the name and location of the installation log file.

fileset_namesSpecifies a list of names of the filesets in install_images_location that you wantto install. The keyword all can be used to indicate that all filesets should beattempted during installation.

Note: If the level of the XL C++ or SMP runtime environment filesets that arealready installed on your system is higher than those included in the compilerimage, those runtime environment filesets included in the compiler image arenot installed and you might see an error message.

Related information:Installation workflow diagram

information about return codes of the installp command

Nondefault installation (AIX)To install IBM XL C/C++ for AIX to a nondefault location on AIX system, first useinstallp to install the xlCcmp.16.1.0.ndi fileset, and then use the xlCndi Perl scriptincluded in that fileset to install the compiler.

Procedure1. Run the installp command to install the xlCcmp.16.1.0.ndi fileset as follows:

installp -aYXgd install_images_location -e logfile xlCcmp.16.1.0.ndixlCcmp.16.1.0.license

►► - installp -aYg xlCcmp.14.1.ndi xlCcmp.14.1.license-p -X -d install_images_location -e logfile

►◄

-aYg Specifies that all the latest installable filesets available in theinstall_images_location directory are applied and that the required softwarelicense agreement is accepted.

-d install_images_locationSpecifies the directory where the filesets are located. This path might alsobe extracted tarball media.

-e logfileSpecifies the name and location of the installation log file. By default, theinstallation log file xlCndi.log is stored in your working directory.

-p Performs a preview of the installation process by running thepreinstallation checks. See “Previewing the license agreements” on page 10.

-X Attempts to expand the file system at the default location if there is notenough space to complete the installation.

Example:installp -aYgd /LOCATION_OF_EXTRACTED_TARBALL/usr/sys/inst.images -e /tmp/install.logxlCcmp.16.1.0.ndi \

xlCcmp.16.1.0.license

Note: This command automatically installs and accepts the license agreementfileset, xlCcmp.16.1.0.license, required to install xlCcmp.16.1.0.ndi.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 15

Page 32: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

2. Install any available updates to the xlCcmp.16.1.0.ndi fileset. You can downloadthe latest compiler updates from the support website: https://www.ibm.com/mysupport/s/topic/0TO0z0000006v6TGAQ/xl-cc?productId=01t0z000007g72LAAQTo check the version number of the xlCcmp.16.1.0.ndi fileset currently installedon your system, use the following command:lslpp -l xlCcmp.16.1.0.ndi

To install a new version of the xlCcmp.16.1.0.ndi fileset, use the followingcommand:installp -aYgd fix_pack_images_location -e logfile xlCcmp.16.1.0.ndi

3. Install IBM XL C/C++ for AIX by entering the following command:

►► perl /opt/IBM/xlC/14.1.0/bin/xlCndi -d source_path-e logfile

►-b target_dir -rte -version

►◄

perl /opt/IBM/xlC/16.1.0/bin/xlCndi -d source_path [-e logfile] [-b target_dir][-rte][-version]

where:

-d source_pathSpecifies the directory where the filesets are located. This path can also beextracted tarball media.

-e logfileSpecifies the name and location of the installation log file. By default, theinstallation log file xlCndi.log is stored in your working directory.

-b target_dirSpecifies the target location where the filesets are copied and expanded. Bydefault, the files are copied to the xlCndi directory in your workingdirectory. If the directory exists already, you will receive an error messageand the installation will stop.

-rte Specifies that only the runtime components should be installed.

-version Displays the version of the nondefault installation tool.

Note: The -eval option is deprecated and has no effect. The xlCndi Perl scriptautomatically determines the type of installation that is happening.The following example uses the xlCndi Perl script to install all availablecompiler filesets in the /LOCATION_OF_EXTRACTED_TARBALL/usr/sys/inst.imagessource directory to the nondefault location, /compiler/xlcpp/, and writes theinstallation log file xlcpp.ndi.inst.log to /tmp.Example:perl /opt/IBM/xlC/16.1.0/bin/xlCndi-d /LOCATION_OF_EXTRACTED_TARBALL/usr/sys/inst.images

-b /compiler/xlcpp/ -e /tmp/xlcpp.ndi.inst.log

16 XL C/C++: Installation Guide

Page 33: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Results

The xlCndi Perl script returns 0 if the installation is successful, or 1 if theinstallation fails.

IBM IBM XL C/C++ for AIX is installed into the chosen location.

The compiler invocation commands are installed to /target_dir/opt/IBM/xlC/16.1.0/bin/, where target_dir is the location of the compiler as set by the -b flagduring the nondefault installation.

The following example uses the command to run the compiler, if XL C/C++ isinstalled to the /compiler/xlcpp directory:/compiler/xlcpp/opt/IBM/xlC/16.1.0/bin/xlcpp -o hello_C hello.C

Installation on an IBM i PASE systemTo install XL C/C++ on an IBM i PASE system, you must follow the followinginstallation method.

About this task

During installation, if the xlCndi script determines that you are installing thecompiler onto a PASE system, it modifies the name of the XL C/C++ configurationfile 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.3PASE V7.3, xlc.cfg.72 is renamed to xlc.cfg.73, and the value of OS level is changedfrom 7.2 to 7.3.

Procedure1. Start the installation by inserting the compiler product installation CD into the

CD drive, or using the electronic distribution package.

Note: If you use the electronic image, you must extract the distributionpackage into a case sensitive file system, such as /QOpenSys/. The nondefaultinstallation 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. Thecompiler 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/userzcat IBM_XL_C_CPP_V16.1.0.1_AIX.tar.Z | tar -xvf -restore -qf usr/sys/inst.images/xlCcmp.16.1.0.ndi ./opt/IBM/xlC/16.1.0/bin/xlCndi

v If you use the installation CD, run the following commands:cd /QOpenSys/home/userrestore -qf /QOPT/CDROM/USR/SYS/INST.IMA/XLC.NDI ./opt/IBM/xlC/16.1.0/bin/xlCndi

5. Run the installation script to install the compiler. The destination directory forthe compiler is specified by the -b option in the command. The preferreddirectory names for the compilers are used in the following commands. If youchoose a different directory, the directory is in the /QOpenSys tree to allow forcase-sensitive file names.v If you use the electronic distribution package, run the following commands:

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 17

Page 34: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

/QIBM/ProdData/DeveloperTools/pase/bin/perl ./opt/IBM/xlC/16.1.0/bin/xlCndi -d \./usr/sys/inst.images -b /QOpenSys/xlcpp

v If you use the installation CD, run the following commands:/QIBM/ProdData/DeveloperTools/pase/bin/perl ./opt/IBM/xlC/16.1.0/bin/xlCndi -i -d \/QOPT/CDROM/USR/SYS/INST.IMA -b /QOpenSys/xlcpp

Results

After the XL C/C++ compiler is installed for use in i PASE, the XL C/C++compiler commands (for example, xlc) can be found in directory/QOpenSys/xlcpp/opt/IBM/xlC/16.1.0/bin/.

Note: You can add the directory that contains the compiler commands to the$PATH environment variable. The $PATH environment variable specifies thedirectories to be searched to find a command. For example, if you have installedXL C/C++ compiler, you can change the $PATH environment variable as follows toavoid specifying the command path when you use the compiler commands:export $PATH=$PATH:/QOpenSys/xlcpp/opt/IBM/xlC/16.1.0/bin

For more information about the IBM i V7.3 PASE system, see IBM PASE for i.

Testing the installationThere are optional testing procedures that you can use after you have installed thecompiler.

If the default installation procedure is executed, the compiler executables can befound in /opt/IBM/xlc/16.1.0/bin/.

Checking compiler and fileset informationYou can check the versions of the compiler and individual filesets installed byusing the lslpp command, the -qversion compiler option, or by viewing the.vrmf_history file.

Using lslpp

You can view information about the installed filesets by using the lslpp command:lslpp option_string

where option_string can be:

-L filesetDisplays the version and state of the fileset specified.

-f filesetDisplays the files and symbolic links associated with the fileset specified.

-w filenameIndicates which fileset the specified file (filename) belongs to.

Note: lslpp detects only filesets that have been installed using the SMIT orinstallp methods.

18 XL C/C++: Installation Guide

Page 35: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Using -qversion

To get more details about the version, release, and fix pack levels of the compiler,you can use the -qversion compiler option. For more information, see "-qversion"in the XL C/C++ Compiler Reference.

Viewing the .vrmf_history file

If you have installed XL C/C++ to a nondefault location, you can view the versioninformation for each fileset installed by viewing the .vrmf_history text file that isinstalled in the main directory of the compiler.

Note: You must not edit this file because it might cause unexpected behavior ofthe xlCndi script.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Testing simple programsTo test the product installation and the critical search paths, try building,compiling, and running a couple of simple programs.

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

Note: To use shortcuts to the compiler invocation commands, see “Creatingshortcuts to the XL C/C++ invocation commands” on page 22. Otherwise,include the full path to the commands to compile the program.

3. Run the program:./hello

The expected result is that "Hello World!" is displayed on the screen.4. Check the exit code of the program:

echo $?

The result is zero.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 19

Page 36: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Setting up IBM XL C/C++ for AIX, V16.1There are optional setup procedures that you can use after you have installed thecompiler.

Enabling and setting up utilization trackingYou can use utilization tracking to detect whether the compiler usage exceeds yourentitlement based on the number of concurrent user and authorized user licensesyou have purchased.

The utilization reporting tool

The utilization reporting tool is disabled by default. You can enable it bymodifying the entry -qnoenabletracking to -qenabletracking in the utilizationtracking configuration file, urt_client.cfg. Various other aspects of utilizationtracking can also be specified in this file. In each installation of the compiler, thereis a symlink named urt_client.cfg that points to the utilization trackingconfiguration file. You might need to change the symlink if you use a copy of theutilization tracking configuration file in a different location or if you use multiplecopies of the file. For more information, see Configuring utilization tracking in theXL C/C++ Compiler Reference.

IBM Software License Metric (SLM) Tags logging

In addition to the utilization reporting tool, you can set up SLM Tags logging totrack compiler usage. The compiler logs compiler license usage in the SLM Tagsformat, to a location you can define by specifying the slm_dir attribute of theconfiguration file. The default location is /var/opt/ibm/xl-compiler/ for a defaultinstallation, or $prefix/var/opt/ibm/xl-compiler/ for a nondefault installation,where $prefix is the nondefault installation path. For more information, seeSetting up SLM Tags logging in the XL C/C++ Compiler Reference.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Enabling IBM License Metric Tool (ILMT) and Tivoli AssetDiscovery for Distributed (TADd)

IBM License Metric Tool (ILMT) and Tivoli® Asset Discovery for Distributed(TADd) can help you manage software usage metering and license allocationservices on supported systems. In general, ILMT and TADd recognize and monitorthe products that are installed and in use on your system.

ILMT and TADd are enabled for IBM XL C/C++ for AIX, V16.1 for inventorysupport only, which means that ILMT and TADd can detect product installation ofXL C/C++ but not its usage.

Note: ILMT and TADd are not a part of the XL C/C++ compiler offering, andmust be purchased and installed separately.

Once installed and activated, ILMT and TADd scan your system for productinventory signatures that indicate whether a given product is installed on yoursystem. ILMT and TADd also identify the version, release, and modification levelsof the product. Inventory signature files are not updated after fix pack installation.

20 XL C/C++: Installation Guide

Page 37: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

If XL C/C++ is installed in the default location, the signature files are in the/opt/IBM/xlC/16.1.0/ directory. Otherwise, if XL C/C++ is installed in anondefault location, the signature files are in the /target_dir/opt/IBM/xlC/16.1.0/directory, where target_dir is the target directory for installation specified by the -boption of the nondefault installation script.

For more information, see IBM License Metric Tool and Tivoli Asset Discovery forDistributed.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Configuring compiler defaultsYou can change some of the default settings of the compiler for your specificneeds.v If you are using XL C/C++ on a system running AIX 7.1, the configuration file is

/opt/IBM/xlc/16.1.0/etc/xlc.cfg.71.v If you are using the compiler on a system running AIX 7.2, the configuration file

is /opt/IBM/xlc/16.1.0/etc/xlc.cfg.72.v The GCC options configuration file is gxlc.cfg.

For more information about how to change the XL C/C++ compiler settings, seeCustomizing the configuration file and Configuring the gxlc or gxlc++ optionmapping in the XL C/C++ Compiler Reference.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Enabling the XL C/C++ error messagesThe compiler message catalogs and help files are automatically configured to usethe en_US locale and encoding. To use any other supported locale, you must setthe LANG and NLSPATH environment variable.

The XL C/C++ messages and help files support the following language localeswhich are installed by default:v en_US (ISO8859-1)v EN_US (UTF-8)v ja_JP (IBM-eucJP)v JA_JP (UTF-8)v Ja_JP (IBM-943)v zh_CN (IBM-eucCN)v ZH_CN (UTF-8)v Zh_CN (GB18030)

To verify the current setting, you can use the echo command:echo -e "\n $LANG \n\n $NLSPATH"

The LANG variable specifies the national language for message and help files. Andthe NLSPATH variable specifies the path name.

English (en_US) is the default national language. To use any supported locale otherthan en_US, you must set the LANG and NLSPATH environment variable so that

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 21

Page 38: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

the compiler and runtime functions can find the appropriate message catalogs. Forexample, to specify the Japanese locale with the ja_JP code page, use the followingcommands:LANG=ja_JPNLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/prime/%Nexport LANG NLSPATH

Substitute any valid national language code for ja_JP.

Tip: For an overview of the installation process, see Installation workflowdiagram.

Creating shortcuts to the XL C/C++ invocation commandsThe compiler invocation commands are not automatically installed in /usr/bin/.To invoke the compiler without having to specify the full path, create a shortcut tothe invocation commands.

To verify the current setting, you can use the echo command:echo -e "\n $PATH"

The PATH variable specifies the directory search path for the executable files of thecompiler.

To create a shortcut to the XL C/C++ invocation commands, do one of thefollowing:v Create symbolic links for the specific drivers from /opt/IBM/xlc/16.1.0/bin/

and /opt/IBM/xlC/16.1.0/bin/ to /usr/bin/.Example:ln -s /opt/IBM/xlC/16.1.0/bin/xlc /usr/bin/xlc

v Add /opt/IBM/xlc/16.1.0/bin/ and /opt/IBM/xlC/16.1.0/bin/ to your PATHenvironment variable.Example:PATH=$PATH:/opt/IBM/xlC/16.1.0/bin/export PATH

Note: If XL C/C++ resides in a nondefault location, the invocation commands areinstalled to /target_dir/opt/IBM/xlC/16.1.0/bin where target_dir is the targetdirectory for installation specified by the -b option of the nondefault installationscript. You can create a shortcut to the invocation commands of a nondefaultinstallation by adding the location of the compiler invocations,target_dir/opt/IBM//opt/IBM/xlC/16.1.0/bin/, to the PATH environmentvariable.

For example, if you installed XL C/C++ to the /compiler/xlcpp directory, youwould run the commands:PATH=$PATH:/compiler/xlcpp/opt/IBM/xlC/16.1.0/bin/export PATH

Tip: For an overview of the installation process, see Installation workflowdiagram.

Accessing the local documentationManual pages for the compiler invocation commands and other command utilitiesare included.

22 XL C/C++: Installation Guide

Page 39: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Enabling manual pages

To verify the current setting, you can use the echo command:echo -e "\n $MANPATH"

The MANPATH variable optionally specifies the directory search path for findingman pages. MANPATH must contain /opt/IBM/xlC/16.1.0/man/$LANG before thedefault man path.

Before you can view the manual pages, you must add the manual page directoryto the MANPATH environment variable by entering the following command:export MANPATH=$MANPATH:/opt/IBM/xlC/16.1.0/man/LANG

where LANG might be any of the following language locales:v en_USv EN_USv ja_JPv JA_JPv Ja_JPv zh_CNv ZH_CNv Zh_CN

For example, to set the language of the manual pages to English, run thecommands:MANPATH=$MANPATH:/opt/IBM/xlC/16.1.0/man/en_USexport MANPATH

Alternatively, to set the language of the manual pages to one of the othersupported languages, run the commands:MANPATH=$MANPATH:/opt/IBM/xlC/16.1.0/man/$LANGexport MANPATH

where $LANG is set to any of the language locales listed above.

Viewing manual pages

To invoke a manual page, run the command:man command

where command is any XL C/C++ invocation or utility command. For availableinvocations or utility commands in IBM XL C/C++ for AIX, see Accessing the localdocumentation.

Example:man xlc

Tip: For an overview of the installation process, see Installation workflowdiagram.

Chapter 1. Installing IBM XL C/C++ for AIX, V16.1 23

Page 40: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

24 XL C/C++: Installation Guide

Page 41: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Chapter 2. Updating to latest release

If you are not using the latest release of the compiler, you can update your currentrelease to the latest release.

You can find the latest release of IBM XL C/C++ for AIX from Fix list for IBM XLC/C++ for AIX.

The following diagram shows the procedure of updating your compiler product tothe latest release:

Yes No

To install

the latest release to the

same directory?

NoYes

Start

Install

the latest

release

Remove

current release,

using rm -rf

Current release

installed using

default installa�on?

© Copyright IBM Corp. 2003, 2018 25

Page 42: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

26 XL C/C++: Installation Guide

Page 43: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Chapter 3. Updating to latest fix pack

A fix pack is an update to IBM XL C/C++ for AIX that provides a fix or multiplefixes to the product.

You can download the latest compiler updates from IBM support. You can alsofind the instructions on Fix Central.

The following diagram shows the procedure of installing an update to IBM XLC/C++ for AIX.

Installa�on

Start

End

No

Yes

IBM i PASE

AIX

Default

installa�onNondefault

installa�on

Current version

installed using default

installa�on?

Download

package

Determine

your OS

Meet

prerequisites

© Copyright IBM Corp. 2003, 2018 27

Page 44: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Prerequisites for fix packsBefore installing an update to IBM XL C/C++ for AIX, V16.1, you must meet theprerequisites.

The prerequisites are as follows:v Become either the root user or a user with administrator privileges.v Ensure that system prerequisites such as disk space and operating system are

met. You can refer to the same prerequisites for installation: “Systemprerequisites” on page 3

v Prepare the fix packs.

Preparing a fix pack for installation

Updates to the compiler are supplied as fix packs. To find the fix pack, see IBM Fixlist .

Before you use these fix packs to update the compiler, you must download anddecompress these packages, and then generate a .toc file.

Procedure:1. Log in as root or have superuser authority.2. Download the fix pack that you want (for example 16.1.0.1-IBM-xlCcmp-AIX-

FP001.tar.Z) into an empty directory.3. Restore the compressed file and extract the fix pack filesets from the

downloaded package. To decompress and unpack the tar file, use the followingcommand:zcat package_name.tar.Z | tar -xvf -

4. Use the command inutoc directory_name to generate a .toc file in the samedirectory as the unpacked filesets.

Example:

The following example shows the steps to prepare the package,16.1.0.1-IBM-xlCcmp-AIX-FP001.tar.Z, located in the directory /compiler/update/,for installation:cd /compiler/updatezcat 16.1.0.1-IBM-xlCcmp-AIX-FP001.tar.Z | tar -xvf -inutoc .

Updating a default installationIf you used a default installation process to install XL C/C++ to a default location,it is recommended that you use SMIT or the installp command to install fixpacks.

Using SMIT1. Run the command: smit update_all. This command invokes the SMIT, which

presents a menu-driven user interface for the installation process.2. When you see INPUT device/directory of the software, enter the path of the

directory where the fix pack filesets and .toc are located.3. Press Enter. At this stage, you are prompted with a list of questions that help

you customize the compiler installation on your system. Verify the default

28 XL C/C++: Installation Guide

Page 45: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

values, or modify them where necessary, to accommodate your preferences. Donot modify the value in the SOFTWARE to install field.

4. Press Enter twice. 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, usesmit install_all to ensure all filesets related to this operating system version areinstalled.

Using installp

Run the command:

►► - installp -ag fileset_names-p -X -d fix_pack_filesets_location -e logfile

►◄

installp -aXgd fix_pack_filesets_location -e logfile fileset_names

-ag Specifies that all the latest installable filesets available in thefix_pack_filesets_location directory are applied.

-p Performs a preview of the installation process by running the preinstallationchecks. See “Previewing the license agreements” on page 10.

-X Attempts to expand the file system at the default location if there is notenough space to complete the installation.

-d fix_pack_filesets_locationSpecifies the directory where the filesets are located. This path might also be amounted CD-ROM drive.

-e logfileSpecifies the name and location of the installation log file.

fileset_namesSpecifies a list of names of the filesets in fix_pack_filesets_location that you wantto install.

Note: The keyword all can be used to indicate that all filesets must beattempted during installation.

The following example installs all available fix pack filesets in the/compiler/update/ source directory to the default locations, as specified in“Product fileset reference” on page 5, and writes an installation log file to/tmp/install.log.installp -aXgd /compiler/update/ -e /tmp/install.log all

Updating an nondefault installation using xlCndiIf the XL C/C++ compiler has been installed to a nondefault directory, you mustuse xlCndi to install fix packs.

About this task

Note: The xlCndi tool forces you to install the fix pack xlCcmp.16.1.0.ndi filesetbefore using the tool to install the fix pack to a nondefault location.

Chapter 3. Updating to latest fix pack 29

Page 46: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Procedure1. Install the xlCcmp.16.1.0.ndi fileset included in the fix pack. This fileset must be

installed first so that the xlCndi script inside it can be used to correctly installthe remaining filesets.To determine the version number of the xlCcmp.16.1.0.ndi fileset currentlyinstalled on your system, run the command:lslpp -l xlCcmp.16.1.0.ndi

To install a new version of the xlCcmp.16.1.0.ndi fileset, run the command:installp -aXgd fix_pack_images_location -e logfile xlCcmp.16.1.0.ndi

2. Create a text file listing the fix pack filesets you want to install. This text filemust contain the name of a single fix pack file on each line. You can use the lscommand to do this:ls source_path > fix_pack_names_file

Examplels /compiler/update/*.bff > /home/user/update.list

update.list contains all the updated fileset names, one for each line as follows:xlccmp.16.1.0.bff

3. Use the perl command to run the xlCndi script:

►► perl /opt/IBM/xlC/16.1.0/bin/xlCndi -d source_path -u fix_pack_names_file ►

►-e logfile -b target_dir -rte -version

►◄

perl /opt/IBM/xlC/16.1.0/bin/xlCndi -d source_path -u fix_pack_names_file [-e logfile]-b [target_dir]

where:

-d source_pathSpecifies the directory where the filesets are located. This path might alsobe a mounted CD-ROM drive.

-u fix_pack_names_fileSpecifies the text file containing the names of fix pack filesets you want toinstall.

-e logfileSpecifies the name and location of the installation log file. By default, theinstallation log file xlCndi.log is stored in your working directory.

-b target_dirSpecifies 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 nondefault installation tool.

Note: The installation script creates a compressed TAR backup of thecompiler files that exist before the fix pack update. If a problem occurs withthe installation of the fix pack update or with the fix pack update itself,you can restore from this backup file target_dir.tar.Z to uninstall the fixpack update.

30 XL C/C++: Installation Guide

Page 47: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

The following example uses the xlCndi Perl script to install all available fixpack filesets in the /compiler/update/ source directory to the nondefaultlocation, /compiler/xlcpp/ and writes the installation log file to/tmp/xlcpp.ndi.inst.log.Example:perl /opt/IBM/xlC/16.1.0/bin/xlCndi -d /compiler/update/ -u /compiler/update/ptflist-b /compiler/xlcpp/-e /tmp/xlcpp.ndi.inst.log

Installing fix pack on the PASE systemThis section describes the steps to install fix packs for the XL C/C++ compiler onthe PASE system.

Procedure1. Obtain the fix packs to be installed.2. Decompress and then unpack the fix packs. If you have downloaded the

compressed TAR images to the /QOpenSys/ptf/ directory, you can use thefollowing commands from a QP2TERM command line:cd /QOpenSys/ptfuncompress <filename.tar.Z>tar -xvf <filename.tar>

3. Create a file containing a list of the fix packs to be installed. To do so, use thefollowing commands on a QP2TERM command line:cd /QOpenSys/ptfls *.bff > ptflist.txt

4. Check and update, if necessary, the nondefault installation (NDI) tool itself. Theupdated version of the NDI tool needs to be restored first in order to use theupdated version to install the rest of the fix pack. To do so, use the followingcommands:cd /QOpenSys/home/userls /QOpenSys/ptf/xlCcmp.16.1.0.ndi_*restore -qf xlCcmp.16.1.0.ndi_V.R.M.F.bff ./opt/IBM/xlC/16.1.0/bin/xlCndi

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 fix pack. Skip this commandand continue with the next step in the instructions.

v If the ls command returns a file name, make a note of this file name and usethat file name in the restore command.restore -qf xlCcmp.16.1.0.ndi_V.R.M.F.bff ./opt/IBM/xlC/16.1.0/bin/xlCndi

For example, if the file name returned is xlCcmp.16.1.0.ndi_16.1.0.1.bff,issue the following command:restore -qf xlCcmp.16.1.0.ndi_16.1.0.1.bff ./opt/IBM/xlC/16.1.0/bin/xlCndi

5. Run the installation script to install the fix packs. Enter the following commandfrom the QP2TERM command line:/QIBM/ProdData/DeveloperTools/pase/bin/perl ./opt/IBM/xlC/16.1.0/bin/xlCndi \-d /QOpenSys/ptf -b /QOpenSys/xlcpp -u /QOpenSys/ptf/ptflist.txt

The installation script creates a compressed TAR backup of the compiler filesthat exist before the fix pack update. If you use the directories as shown inthese instructions, this file is named /QOpensys/xlcpp.backup.tar.Z. If aproblem occurs with the installation of the fix pack update or with the fix packupdate itself, you can restore from this backup to uninstall the fix pack update.

Chapter 3. Updating to latest fix pack 31

Page 48: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

32 XL C/C++: Installation Guide

Page 49: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Chapter 4. Updating from evaluation to full version

This section outlines the steps required to update IBM XL C/C++ for AIX, V16.1from evaluation to full version.

To update to a full version, you must install a full version on top of an evaluationversion.

The following diagram shows the procedure:

Yes No

To install

full version to the

same directory?

NoYes

Start

Evalua�on version

installed using

default installa�on?

Install

full version

Remove

evalua�on version,

using rm -rf

© Copyright IBM Corp. 2003, 2018 33

Page 50: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

34 XL C/C++: Installation Guide

Page 51: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Chapter 5. Uninstalling IBM XL C/C++ for AIX, V16.1

This section outlines the steps required to uninstall both default and nondefaultinstallations of IBM XL C/C++ for AIX, V16.1.

The following diagram shows the uninstallation procedure:

No

Start

End

Yes

Remove �lesets

using commands

Remove �lesets

using tools

Uninstall MASS

components

(op�onal)

Installed using default

installa�on?

IBM i PASE

AIX

Determine

your OS

Become

root user

Notes:

© Copyright IBM Corp. 2003, 2018 35

Page 52: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

1. Some filesets might not be uninstalled if they are required by other installedproducts. See “Product fileset reference” on page 5 for details about filesetsincluded with IBM XL C/C++ for AIX, V16.1.

2. Because automatically uninstalling dependent packages might cause problems,it is recommended that you preview uninstallation to ensure that all dependentfilesets are no longer required.

Uninstalling a default installationTo uninstall the compiler from the default location, you can use either SMIT orinstallp to remove the compiler filesets.

Note:

v If you attempt to remove a fileset that is required by another installed fileset, theselected fileset will not be removed unless its dependents are also beingremoved.

v The XL C++ runtime level of the xlC.rte and xlC.aix61.rte filesets are notremoved if you uninstall a default installation. For more information onbackward compatibility of the XL C++ runtime environment, see “XL C++runtime environment filesets” on page 7.

Using SMIT

The following steps illustrate how to uninstall IBM XL C/C++ for AIX, V16.1 usingthe 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, youmust not remove any filesets which are shared between the compilers. In thiscase, enter the following name in the field:xlccmp.16.1.0* xlCcmp.16.1.0*

Otherwise, enter the following name in the field:xlccmp.16.1.0* xlCcmp.16.1.0* xlmass.9.1.0 memdbg.*

If you also want to uninstall the SMP library, enter the following name in thefield. (Generally, you are not recommended to do this, because you might haveapplications that are dependent on this runtime library.)xlsmp.*

In the REMOVE dependent software? field, select yes.

Note: To preview the uninstallation, set the PREVIEW only? value to yes.

Using installp

To uninstall IBM XL C/C++ for AIX, V16.1 using the installp command, enter thefollowing command on the command line:installp -ug filesets

where filesets is the list of filesets (wildcards accepted) to uninstall.

36 XL C/C++: Installation Guide

Page 53: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

If you have XL Fortran installed in its default location, you must not remove anyfilesets that are shared between the compilers. In this case, use the followingcommand:installp -ug xlccmp.16.1.0\* xlCcmp.16.1.0\*

Otherwise, use the following command:installp -ug xlccmp.16.1.0\* xlCcmp.16.1.0\* xlmass.9.1.0 memdbg.\*

If you also want to uninstall the SMP library, use the following command.(Generally, this is not recommended, because you might have applications that aredependent on this runtime library.)installp -ug xlccmp.16.1.0\* xlCcmp.16.1.0\* xlmass.9.1.0 memdbg.\* xlsmp.\*

Uninstalling a nondefault installationTo uninstall the XL C/C++ compiler installed to a nondefault location, delete thecompiler directory, and uninstall the xlCcmp.16.1.0.ndi fileset and the licenseagreement fileset.

About this task

To determine which version of each fileset is installed, see “Checking compiler andfileset information” on page 18.

Procedurev To delete the compiler directory, enter the following command:

rm -rf target_dir

where target_dir is the target directory for installation specified by the -b optionof the nondefault installation script.

v To uninstall the xlCcmp.16.1.0.ndi and the license agreement filesets, enter thefollowing command:installp -u xlCcmp.16.1.0.ndi xlCcmp.16.1.0.license

v If you are uninstalling an evaluation version of the compiler, enter the followingcommand to uninstall the xlCcmp.16.1.0.ndi and the xlCcmp.16.1.0.evaluationfilesets:installp -u xlCcmp.16.1.0.ndi xlCcmp.16.1.0.evaluation

Uninstalling versions of the MASS componentsIf you have previously installed the MASS libraries on the system on which youare installing the IBM XL C/C++ for AIX, V16.1, it is recommended that youuninstall the libraries by removing the directory in which they have been installed.

Procedure

Enter the following command to remove the MASS directory:rm -rf mass_directory

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 theMASS directory, you must delete them as well. The compiler installationautomatically handles the creation of the necessary symbolic links.

Chapter 5. Uninstalling IBM XL C/C++ for AIX, V16.1 37

Page 54: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

38 XL C/C++: Installation Guide

Page 55: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Notices

Programming interfaces: Intended programming interfaces allow the customer towrite programs to obtain the services of IBM XL C/C++ for AIX.

This information was developed for products and services offered in the U.S.A.IBM may not offer the products, services, or features discussed in this document inother countries. Consult your local IBM representative for information on theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not give youany license to these patents. You can send license inquiries, in writing, to:

IBM Director of LicensingIBM CorporationNorth Castle Drive, MD-NC119Armonk, NY 10504-1785U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBMIntellectual Property Department in your country or send inquiries, in writing, to:

Intellectual Property LicensingLegal and Intellectual Property LawIBM Japan, Ltd.19-21, Nihonbashi-Hakozakicho, Chuo-kuTokyo 103-8510, Japan

The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law:INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THISPUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHEREXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESSFOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express orimplied warranties in certain transactions, therefore, this statement may not applyto you.

This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvementsand/or changes in the product(s) and/or the program(s) described in thispublication at any time without notice.

Any references in this information to non-IBM websites are provided forconvenience only and do not in any manner serve as an endorsement of those

© Copyright IBM Corp. 2003, 2018 39

Page 56: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

websites. The materials at those websites are not part of the materials for this IBMproduct and use of those websites is at your own risk.

IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

Licensees of this program who want to have information about it for the purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

Intellectual Property Dept. for Rational SoftwareIBM Corporation5 Technology Park DriveWestford, MA 01886U.S.A.

Such information may be available, subject to appropriate terms and conditions,including in some cases, payment of a fee.

The licensed program described in this document and all licensed materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement or any equivalent agreementbetween us.

Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environments mayvary significantly. Some measurements may have been made on development-levelsystems and there is no guarantee that these measurements will be the same ongenerally available systems. Furthermore, some measurements may have beenestimated through extrapolation. Actual results may vary. Users of this documentshould verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly available sources.IBM has not tested those products and cannot confirm the accuracy ofperformance, compatibility or any other claims related to non-IBM products.Questions on the capabilities of non-IBM products should be addressed to thesuppliers of those products.

All statements regarding IBM's future direction or intent are subject to change orwithdrawal without notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily businessoperations. To illustrate them as completely as possible, the examples include thenames of individuals, companies, brands, and products. All of these names arefictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, whichillustrates programming techniques on various operating platforms. You may copy,modify, and distribute these sample programs in any form without payment toIBM, for the purposes of developing, using, marketing or distributing applicationprograms conforming to the application programming interface for the operating

40 XL C/C++: Installation Guide

Page 57: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

platform for which the sample programs are written. These examples have notbeen thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs. The sampleprograms are provided “AS IS”, without warranty of any kind. IBM shall not beliable for any damages arising out of your use of the sample programs.

Each copy or any portion of these sample programs or any derivative work, mustinclude a copyright notice as follows:

© (your company name) (year). Portions of this code are derived from IBM Corp.Sample Programs. © Copyright IBM Corp. 1998, 2018.

PRIVACY POLICY CONSIDERATIONS:

IBM Software products, including software as a service solutions, (“SoftwareOfferings”) may use cookies or other technologies to collect product usageinformation, to help improve the end user experience, or to tailor interactions withthe end user, or for other purposes. In many cases no personally identifiableinformation is collected by the Software Offerings. Some of our Software Offeringscan help enable you to collect personally identifiable information. If this SoftwareOffering uses cookies to collect personally identifiable information, specificinformation about this offering's use of cookies is set forth below.

This Software Offering does not use cookies or other technologies to collectpersonally identifiable information.

If the configurations deployed for this Software Offering provide you as customerthe ability to collect personally identifiable information from end users via cookiesand other technologies, you should seek your own legal advice about any lawsapplicable to such data collection, including any requirements for notice andconsent.

For more information about the use of various technologies, including cookies, forthese purposes, see IBM's Privacy Policy at http://www.ibm.com/privacy andIBM's Online Privacy Statement at http://www.ibm.com/privacy/details in thesection entitled “Cookies, Web Beacons and Other Technologies,” and the “IBMSoftware Products and Software-as-a-Service Privacy Statement” athttp://www.ibm.com/software/info/product-privacy.

TrademarksIBM, the IBM logo, and ibm.com are trademarks or registered trademarks ofInternational Business Machines Corp., registered in many jurisdictions worldwide.Other product and service names might be trademarks of IBM or other companies.A current list of IBM trademarks is available on the web at “Copyright andtrademark information” at http://www.ibm.com/legal/copytrade.shtml.

Adobe is a registered trademark of Adobe Systems Incorporated in the UnitedStates, other countries, or both.

Windows is a trademark of Microsoft Corporation in the United States, othercountries, or both.

Notices 41

Page 58: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

42 XL C/C++: Installation Guide

Page 59: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

Index

Aadvanced installation

overview 11testing 19

audienceoverview v

Bbasic installation

testing 19

Ccompiler information

checking 18configuration

defaults 21

Ddefault installation

overview 1, 12, 25, 33uninstallation 36updates 28

documentationmanual pages 23

Eelectronic distribution packages

preparing 5enabling

IBM License Metric Tool 20Tivoli Asset Discovery for

Distributed 20

Ffileset information

checking 18filesets

required 4

Hhard disk space

required 3

Ii PASE

installation 17installp

preview installation 10PTF installation 14

invocation commandsshortcuts 22

Llanguages

locale-specific filesets 4license agreements

previewing 10lslpp 4

Nnon-default installation

uninstallation 37nondefault installation

overview 11procedures 15updates 29

Ooperating systems

required 3

Ppost-installation

overview 18, 20pre-installation

overview 3prerequisites 3

pre-PTFoverview 28

preparationelectronic distribution packages 5

previewinstallation 10license agreements 10

PTF installationoverview 27SMIT 13

SSystem Management Interface Tool

preview installation 10

Uuninstallation

default installation 36MASS libraries 37non-default installation 37overview 35

update installationoverview 27

updatesdefault installation 28nondefault installation 29

© Copyright IBM Corp. 2003, 2018 43

Page 60: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

44 XL C/C++: Installation Guide

Page 61: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation
Page 62: XL C/C++: Installation Guide · About this document This guide pr ovides detailed installation instr uctions for IBM ® XL C/C++ for AIX ®, V16.1. It includes multiple installation

IBM®

Product Number: 5765-J12; 5725-C72

Printed in USA

SC27-8058-00