Install Xlc Compiler Aix
Posted By admin On 14.08.19On install path of websphere MQ/java/lib/jdbc>make oracleI am getting below error
Problem installing XLC 11.1 compiler on AIX 5.3. IBM® XL C for AIX® is a compiler that facilitates the creation and maintenance. Help on installing C compiler on AIX. Installing GCC compiler on AIX; AIX. IBM® XL C/C++ is a high-performance optimizing compiler designed to use IBM POWER. 11.1 on the IBM AIX 7.1. When using lslpp -l and grep commands to search for the installed compiler file sets, a common mistake is to misinterpret the xlC.aix61.rte or the xlC.aix50.rte flieset as the XL C/C for AIX compiler file set.
I am not sure if xlc is installed in my machine. My machine is AIX 6.1. But I can find xlcpp in my machine. how to proceed?Is there any way to create switch file?
If I execute $ /usr/ccs/lib/cpp -help
I am getting
how to proceed?
user1929905user19299052 Answers
/usr/ccs/lib/cpp is not the XL C/C++ for AIX compiler, it is the C Pre-Processor which ships as part of AIX. The XL C/C++ for AIX compiler is a separate Licensed Program Product for which licenses must be separately purchased.
If you have XL C/C++ for AIX installed, you would find the /usr/vac/bin/xlc and /usr/vacpp/bin/xlc++ commands installed on your system. You can also check for the filesets vac.C and vacpp.cmp.core using the lslpp command:
lslpp -L vac.C vacpp.cmp.core
Dwayne has it mostly right but I believe xlc++ also has a version of xlc. I see in your other question that you have xlcpp so perhaps what you need to do is add /usr/vacpp/bin to your PATH.
I also tend to use grep with lslpp:
should tell you which xlc, xlcpp, etc you have installed.
HTH
Not the answer you're looking for? Browse other questions tagged unixaixxlc or ask your own question.
Question
Issues with installing xlC compilers on AIX
Answer
Introduction
IBM compilers for AIX are marketed as xlC/C++.
The runtime environment is also xlC/C++.
These are two very different things. The runtime environment is installed with AIX and provides libraries to run C++ applications.
The xlC and xlC/C++ compilers are not provided with the AIX operating system and are purchased separately. Customers can either purchase the xlC compiler, which provides the C compiler, or they can purchase the xlC/C++ compiler, which provides the C and C++ compilers.
Prior to the xlC 13.1 compiler filesets were installed with “vac” in their name, a holdover from when they were marketed as Visual Age compilers. Starting with 13.1 compiler filesets now are installed with xlc and xlC in their names
xlCcmp
xlccmp
Installation Example
This is an example of runtime and compiler filesets installed on a system:
# lslpp -l grep -i xlc
xlC.adt.include 13.1.0.0 COMMITTED C Set ++ Application
xlC.aix61.rte 13.1.3.1 COMMITTED IBM XL C++ Runtime for AIX 6.1
xlC.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor
xlC.msg.en_US.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor
xlC.msg.en_US.rte 13.1.3.1 COMMITTED IBM XL C++ Runtime
xlC.rte 13.1.3.1 COMMITTED IBM XL C++ Runtime for AIX
xlC.sup.aix50.rte 9.0.0.1 COMMITTED XL C/C++ Runtime for AIX 5.2
xlCcmp.13.1.0 13.1.0.0 COMMITTED XL C++ compiler
xlCcmp.13.1.0.bundle 13.1.0.0 COMMITTED XL C++ media defined bundles
xlCcmp.13.1.0.lib 13.1.0.0 COMMITTED XL C++ libraries
xlCcmp.13.1.0.license 13.1.0.0 COMMITTED XL C++ license files
xlCcmp.13.1.0.ndi 13.1.0.0 COMMITTED XL C++ non-default
xlCcmp.13.1.0.tools 13.1.0.0 COMMITTED XL C++ tools
xlccmp.13.1.0 13.1.0.0 COMMITTED XL C compiler
xlccmp.13.1.0.bundle 13.1.0.0 COMMITTED XL C media defined bundles
xlccmp.13.1.0.lib 13.1.0.0 COMMITTED XL C libraries for AIX 6.1 and
xlccmp.13.1.0.license 13.1.0.0 COMMITTED XL C license files
xlccmp.13.1.0.ndi 13.1.0.0 COMMITTED XL C non-default installation
Note that the runtime filesets all have 'rte' as part of their name. Please also note that if xlccmp.13.1.0 is not in the lslpp outpout you do not have the C compiler installed and if xlCcmp.13.1.0 is not in the output you do not have the C++ compiler installed.
Installation Directories
The 13.1 compilers install under /opt/IBM and install per version so you can have multiple compilers installed at the same time.
/opt/IBM/xlc/13.1.0/bin
/opt/IBM/xlC/13.1.0/bin
This means you can have the 13.1.2 compiler installed next to the 13.1.0 compiler and only have to use PATH or Makefile variables to point to the correct location.
Compilers prior to 13.1 have a default installation directory of /usr/vac. If customers wanted both a 11.1 and 12.1 compiler on the same system one had to be installed using the NDI (non-default install) process.
Where to Get the Compiler
Some customers mistakenly think they can get the C compilers from the patch update site which links to Fix Central. This site is only meant to download compiler patches. It does not provide a functional compiler. Patches only apply to the version of the compiler that is installed. You cannot patch a 12.1 compiler to 13.1, the 13.1 version needs to be purchased. This is also emphasized in the Updates section below.
Once the compiler has been purchased there are three means for a customer to get it:
- media provided by sales
- from the Passport Advantage website, http://www-01.ibm.com/software/howtobuy/passportadvantage/pao_customers.htm
- ESS download
AIX support cannot provide compiler filesets as this is a sales function, not a support function.
Installation Guides
The installation guide for the respective compiler versions is your best source of information on how to install, de-install, or update the compiler software. They are readily found by searching for “xlC compiler install” on the internet.
Once the compiler has been installed, the customer must either place its location on his PATH variable, update application Makefiles, or type the full path to the version he wants to use.
Download Xlc Compiler Aix 7.1
A simple test to make sure the compiler works is to type
cc -qversion
Here is an example program the customer can compile to prove the compiler works.
$ cat hello.c
#include <stdio.h>
int main(void) {
printf(“hello worldn”);
}
cc hello.c (for a basic compile)
./a.out (to run the program)
Updates
Patches for the C/C++ compilers and updates for the C/C++ runtime environment can be obtained from this location:
Install Xlc Compiler Aix To Windows
Note that this will direct you to Fix Central under Rational software to do the actual download. Also note that an update means patching the existing compiler. It does not mean upgrading to a new compiler version, such as from xlC 11.1 to xlC 13.1. That requires purchasing the new compiler version.
Common Issues
1. A common issue after updating AIX is that customers try to use old compilers, that usually have never been patched, on newer versions of AIX. They will get a message stating that there is no configuration file for that version of AIX.
The most likely reason for this is that the newer version of AIX had not been released when the compiler was made available . If the compiler is still under support, as shown in the previous link, then patching it to the most current version will address the problem. For the compiler to work there must by an /etc/vac.cfg file that corresponds to the proper version of AIX, eg
/etc/vac.cfg.61 (for AIX 6.1)
/etc/vac.cfg.71 (for AIX 7.1)
2. Another issue is that the customer upgrades AIX and the compiler that was being used is no longer supported (for example xlC 10.1). The customer purchases and installs xlC 13.1 and still gets an error that the compiler is not supported. A common reason for this is that the customer has his PATH variable pointing to the old compiler or the Makefile being used has a path referencing the old compiler.
3. Customers will sometimes compile on one version of AIX and attempt to run the binary on a different version of AIX. This is supported if the version of AIX on which the program was compiled is older than the version the binary is being run on - for example, you can compile on AIX 6.1 and expect the binary to work on AIX 7.1. However, you cannot expect a binary compiled on AIX 7.2 to work on AIX 7.1, or compiled on AIX 7.1 to work on AIX 6.1. This is because libc.a is dynamically linked into the binary and newer versions of AIX have symbol definitions that do not exist in older versions. See