This page is intended to be a template for PASE geeks building first Open Source project. After loading the software prerequisites, most Open Source projects follow same Install/Compile template steps.

Software Prerequisites:

  • IBM PASE for i (SS1, Option 33)
  • The XL C/C++ compiler for AIX needs to be installed in PASE.
       Note: Use the instructions found here:   xlcSetup - download trial version of xlc compiler for PASE 
  • The RPM package manager needs to be installed in PASE
       Note: Use the instructions found here:   OpenSourceBinaries
  • Use the script downloaded as part of the RPM package manager install instructions to download and install the following groups of pre-compiled Open Source binaries for AIX: GetBase GetWbase GetCompileTools DevCompileTools DevWbase
    TIP (horse, meet water):
    1) offers hope all dependent/needed related Open Source binaries (libzip, etc.) and compile artifacts (headers, make, etc.) are downloaded before you ever start working on your new Open Source project to avoid endless hours of frustration trying to understand inner working of Open Source compiles. In my opinion, you are much better off downloading excess binary stuff with over trying to find the missing needle in the haystack. After all is running (or at least compiled), PASE snooping tools exist that can help you figure out what each binary actually needs (PASE Snoop), thereby you may go back and do it again with only binary stuff you actually need.
    2) rarely installs the “latest” version of any open source binaries available, this is intentional because matching PASE architecture releases are far longer lived than AIX traditional software upgrade cycles (cough, dust off V5R4). I recommend you try to complete your new open source project work with these older RPM version binaries, so you don’t find yourself circling a recursive version upgrade toilet bowl.

Install the Open Source Software

  • Download the latest source tar file
    Note: FTP the tar file to the /usr/local directory on your IBM i.
  • Start up an interactive PASE session on your IBM i using the QP2TERM program
    ==> CALL QP2TERM
  • Ensure your PATH is set up correctly to find previously downloaded Open Source binaries
    > export PATH=/opt/freeware/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
    > export LIBPATH=/opt/freeware/lib:/QOpenSys/usr/lib:/usr/ccs/lib:/QOpenSys/usr/lib/X11:.:/usr/lib
    … /bin directories is where PASE will find utilities or main programs like xlc, gmake, etc. (think PASE *PGMs)
    … /lib directories is where PASE will find shared libraries like libc.a,, etc. (think PASE *BNDSRVPGMs)
    … export /path order is important, so you may have to shuffle/add PATH/LIBPATH order to fit a specific open source project (yep … this is normal)
    … best Unix command ever invented beyond “grep” is “find” for recursive path walk to find a missing file location
    > find /path/. -name “*something*” -print
  • Extract the tar file contents:
    > cd /usr/local
    > tar -xf fancyOSsrc-n.n.n.tar
  • Run the configure script to generate a makefile
    > cd fancyOSsrc-n.n.n
    > ./configure CC=xlc CFLAGS=‘-qlanglvl=extc89′ —with-template=aix —prefix=/usr/local/fancy
    —bindir=/usr/local/fancy/bin —datadir=/usr/local/fancy/share —sysconfdir=/usr/local/fancy/etc
    —libdir=/usr/local/fancy/lib —includedir=/usr/local/fancy/include
    —with-includes=/opt/freeware/include —with-libraries=/opt/freeware/lib
    … if all does not go to plan just keep re-trying ./configure and gmake command with different options
    … use ./configure —help (-h) to see what options are available to you
    … try again … and again … and again … (yep this is normal)
  • Run the generated makefile
    > gmake
    result: All of “fancy” successfully made. Ready to install
    … if compile errors pop up, best Unix utility ever built, “grep” can likely help
    … grep this directory
    > grep -i ‘something’ *.c
    … find → grep /path walk recursively
    > find /path/. -name “*.c” | xargs grep -i ‘something’
  • Install
    > gmake install
    result: “fancy” installation complete.


Tony “Ranger” Cairns - IBM i PHP / PASE