AIXMunchNotInstalledError

How to solve a munch-related error

Sometimes, after installing the XLC 9 development software on an AIX machine, you will bump into this error:

xlC128_r -brtl   -G -o /dev_code/shlib/libapsutishr.so -qmkshrobj -bnoentry  /dev_code/lib/apsuti.a \
-bE:/dev_code/make/uti_linker.exp  -lld -lpthreads -lm -lmsaa
xlC128_r: 1501-265 (S) C++ compiler is not installed or munch attribute ( = /usr/vacpp/exe/munch ) in the config file is incorrect.
make: 1254-004 The error code from the last command is 255.
make: 1254-005 Ignored error code 255 from last command.

Oooops... Something is wrong here. How do we solve this? By reinstalling the package, of course!

The following steps should give you the necessary information to do this:

1. Checking the munch binary in XLC configuration

You can find the munch program in the XL C configuration by doing the following:

$ grep -i munch /etc/vac*
/etc/vac.cfg:        munch     = /usr/vacpp/exe/munch
/etc/vac.cfg.52:        munch     = /usr/vacpp/exe/munch
/etc/vac.cfg.53:        munch     = /usr/vacpp/exe/munch

Now, on the other hand, if you enter the command below, you will probably get the following error:

$ ls -alF /usr/vacpp/exe/munch
ls: 0653-341 The file /usr/vacpp/exe/munch does not exist.

Now, we know munch really was not installed.

2. Finding what package installed munch

This was a tad more complicated. Check this page, and you will note that munch is installed by the package named vacpp.cmp.tools.

One very simple way to check the installation of this package is to list its contents, as reported by the lslpp command:

bash-3.00# lslpp -f vacpp.cmp.tools
  Fileset               File
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  vacpp.cmp.tools 9.0.0.0
                         /usr/vacpp/bin/c++filt
                         /usr/vacpp/bin/makeC++SharedLib_r -> /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin/makeC++SharedLib128 -> /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin/makeC++SharedLib_r7 -> /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin/linkxlC

No munch anywhere: we now know that there was a problem while installing this package.

3. Re-installation of the vacpp.cmp.tools package

This is rather more simple, but you have to force the installation of the vacpp.cmp.tools, which you have to do "by hand", since smitty will simply detect that the package is already install and leave it at that.

To force the installation, you therefore have to use installp directly, and use the following command to preview the installation:

bash-3.00# /usr/lib/instl/sm_inst installp_cmd -a -l -d '/cdrom1/usr/sys/inst_ima ' -f 'vacpp.cmp.tools' \
 '-p' '-c' '-N'  '-X'  '-v' '-V2'  '-Y'

PLEASE NOTE Change the /cdrom1/usr/sys/inst_ima path to the correct path, on your system, where AIX will be able to find the XLC 9 packages... Or you will fail! Also, this should be all on one long line.

Once you are satisfied the installation is going to take place, simply enter the following command to start the installation:

bash-3.00# /usr/lib/instl/sm_inst installp_cmd -a -l -d '/cdrom1/usr/sys/inst_ima ' -f 'vacpp.cmp.tools' \
 '-F' '-c' '-N'  '-X'  '-v' '-V2'  '-Y'

PLEASE NOTE The installp option -p (= Preview) has been replaced by -F (= "Force") in order to force installp to force the installation of the package.

After a little while (18 seconds on the system I was working on!) the package vacpp.cmp.tools should be (re-)installed on your system.

4. Checking the installation of the munch binary

Just do a lslpp as above, only this time everything should be all right:

bash-3.00# lslpp -f vacpp.cmp.tools
  Fileset               File
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  vacpp.cmp.tools 9.0.0.0

                         /usr/vacpp/exe
                         /usr/vacpp/exe/aix52/munch                          <---
                         /usr/vacpp/bin/c++filt
                         /usr/vacpp/bin/makeC++SharedLib_r -> /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin/makeC++SharedLib128 -> /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin/makeC++SharedLib_r7 -> /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin/makeC++SharedLib
                         /usr/vacpp/bin
                         /usr/vacpp/bin/linkxlC
                         /usr/vacpp/exe/aix52
                         /usr/vacpp

Much better!

Checking with a simple ls is also positive :

$ ls -alF /usr/vacpp/exe/munch
lrwxrwxrwx   1 root     system           11 Jan 11 17:32 /usr/vacpp/exe/munch@ -> aix52/munch*

And that should be about it! Hope this helps!

See Also: