AIX

 View Only
Expand all | Collapse all

vac.C base package not available to download

  • 1.  vac.C base package not available to download

    Posted Wed February 14, 2024 04:20 PM

    Hi AIX Community

    i would like install vac.12.1.0.23.aix53TL7-72.may2021.ptf.tar.Z and have issue with vac.C base package 12.1.0.0 prerequisite not available.

    Where can i get it plz ? i checked AIX DVD and no thing there.

    Thanks a lot for your help.



    ------------------------------
    Abderahim ABBAS
    ------------------------------


  • 2.  RE: vac.C base package not available to download

    IBM Champion
    Posted Thu February 15, 2024 04:48 AM

    Hi Abderahim,

    what you are trying to install is a fixpak (update) for IBM C/C++ Compiler v12. To install the fixpak you must have the original product. Usually if you have a license you can download product either through IBM Passport Advantage or IBM Entitled Systems Support.

    But I think you wouldn't be able to find this version there right now. Version 12 is very old. The latest "classic" version of IBM C/C++ Compiler is 16.1. The latest Clang-based IBM C/C++ Compiler is at 17.2.2. Unless you want to compile something for AIX 5.3, I'd suggest you go for a newer version.

    IBM OpenXLC C/C++ Compiler supports AIX 7.2 TL5 and AIX 7.3 and provides support for all modern C/C++ capabilities you need. It is full featured Clang based compiler and it makes it easier to code on Linux or Mac workstation and compile on AIX, because it uses the same Clang/LLVM as e.g. Apple's C/C++ compiler or clang you could find in every Linux distribution. If you need it for short time you buy subscription license. AFAIR it can be purchased on monthly basis. If you want to test it, you can download a test version. https://www.ibm.com/products/open-xl-cpp-aix-compiler-power



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 3.  RE: vac.C base package not available to download

    Posted Thu February 15, 2024 07:52 AM

    Hi Andrey

    Thank you for your response, i understand.

    My need is for DB2 ASN Librairies running on AIX 7.3, i have Github project and would like use one interesting commands from there :

    Github file : https://github.com/IBM/db2-samples/blob/master/cpp/bldrtn

    This script need xlc_r command which is available only on vac.C package !

    I downloaded evaluation binaries of IBM OpenXLC C/C++ Compiler and no chance, didn't find vac.C packages.

    My need is temporary to run that command bldrtn.

    Error :

    db2inst1@XXX:/home/db2inst1/asncdctools/src$ /db2/bin/V11.5.9.0/samples/c/bldrtn asncdc

    /db2/bin/V11.5.9.0/samples/c/bldrtn[49]: xlc_r:  not found

    /db2/bin/V11.5.9.0/samples/c/bldrtn[52]: xlc_r:  not found

    Thanks for your help

    Abderahim



    ------------------------------
    Abderahim ABBAS
    ------------------------------



  • 4.  RE: vac.C base package not available to download

    IBM Champion
    Posted Thu February 15, 2024 08:03 AM

    Hi Abderahim,

    xlc_r is a part of IBM's "classic" XL C/C++ compiler - https://www.ibm.com/support/pages/ibm-xl-cc-aix-161. Unfortunately I don't know if there is a trial version of it.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 5.  RE: vac.C base package not available to download

    Posted Thu February 15, 2024 09:06 AM
    I'm not a developer, so really don't know what I'm suggesting will work.. but, something to consider.
    I found this: 

    xlC_r
    The multi-threaded version of the IBM XL C/C++ compiler, needed as the routines can run in the same process as other routines 

    So, you know WHAT it is...
    can you find a thread-safe version of gcc, and modify the GitHub code to call gcc instead?
    Or, does your code really need to be multi-threaded? (in which case the need for  thread-safeness may become mute)





  • 6.  RE: vac.C base package not available to download

    IBM Champion
    Posted Thu February 15, 2024 09:12 AM

    Hi Tom,

    I think it is something that only IBM DB2 development can answer. Abderahim doesn't start xlc or gcc, he starts some DB2 command - /db2/bin/V11.5.9.0/samples/c/bldrtn and the command starts xlc_r. xlc and gcc have different set of options and can't be exchanged so easily.

    May be I should install Db2 to check what the command does...



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 7.  RE: vac.C base package not available to download

    Posted Fri February 16, 2024 01:10 PM

    Yes, before replacing any DB2 binary, i shall be sure about impacts.

    So, is there different packages providing xlc_r (C) and xlC_r (C++) on Fix central or Passeport advantage ?

    [XXXX:/]grep -i xlc_r /db2/bin/V11.5.9.0/samples/cpp/bldrtn /db2/bin/V11.5.9.0/samples/c/bldrtn
    /db2/bin/V11.5.9.0/samples/cpp/bldrtn:xlC_r $EXTRA_CFLAG -I$DB2PATH/include -c $1.C
    /db2/bin/V11.5.9.0/samples/cpp/bldrtn:xlC_r $EXTRA_CFLAG -qmkshrobj -o $1 $1.o -L$DB2PATH/$LIB -ldb2 -bE:$1.exp
    /db2/bin/V11.5.9.0/samples/c/bldrtn:xlc_r $EXTRA_CFLAG -I$DB2PATH/include -c $1.c
    /db2/bin/V11.5.9.0/samples/c/bldrtn:xlc_r $EXTRA_CFLAG -qmkshrobj -o $1 $1.o -ldb2 -L$DB2PATH/$LIB -bE:$1.exp
    [XXXX:/]

    [XXXX:/]lslpp -f vac.C* | grep -i xlc_r
                            /usr/vac/bin/xlc_r -> /usr/vac/bin/xlc
                            /usr/vac/bin/xlc_r4 -> /usr/vac/bin/xlc
                            /usr/vac/bin/xlc_r7 -> /usr/vac/bin/xlc
    [XXXX:/]

    [XXXX:/]lslpp -L vac.C | grep vac.C
      vac.C                    12.1.0.23    C     F    IBM XL C Compiler
    [XXXX:/]

    Find one AIX with installed vac.C 12 but is not supported on AIX 7.3 (but installed !!! :() :

    [xxxx:/home/db2inst1/asncdctools/src]/db2/bin/V11.5.9.0/samples/c/bldrtn asncdc
    xlc_r: 1501-287 (S) This compiler does not support AIX 7.3. Please check with IBM (http://www-01.ibm.com/support/docview.wss?rs=43&uid=swg21326972) to see if there is a PTF for this compiler that supports this AIX level.
    xlc_r: 1501-287 (S) This compiler does not support AIX 7.3. Please check with IBM (http://www-01.ibm.com/support/docview.wss?rs=43&uid=swg21326972) to see if there is a PTF for this compiler that supports this AIX level.
    cp: asncdc: A file or directory in the path name does not exist.
    [xxxx:/home/db2inst1/asncdctools/src]

    Question : on fix central, when i download fixes for Rational, XL C,C++ Compiler 13.1.0.0 or 16.1.00 AIX versions, i don't have vac.C package.

    Which product on ESS shall i purchase to have xlc_r command ?

    Thanks a lot for your help.



    ------------------------------
    Abderahim ABBAS
    ------------------------------



  • 8.  RE: vac.C base package not available to download

    IBM Champion
    Posted Fri February 16, 2024 04:52 AM

    The script on github is for linux and calls g++, try to install g++ for AIX 7.3 and use the linux script to compile on AIX.  You may have to tweak the script a bit.



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 9.  RE: vac.C base package not available to download

    Posted Fri February 16, 2024 01:00 PM

    g++ not proposed on https://www.ibm.com/support/pages/aix-toolbox-open-source-software-downloads-alpha

    Thanks.



    ------------------------------
    Abderahim ABBAS
    ------------------------------



  • 10.  RE: vac.C base package not available to download

    IBM Champion
    Posted Fri February 16, 2024 05:40 PM

    It's there.  Name is 'gcc-c++'.

    A bit of history: GCC used to stand for "GNU C Compiler", but as other languages were added to it, it was renamed to "GNU Compiler Collection".
    To add to the confusion:
    - gcc is also the binary of the GNU C compiler
    - g++ is the binary of the GNU C++ compiler
    - cpp is the binary of the C Preprocessor, but on the samples github, the cpp directory stands for 'C++'



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 11.  RE: vac.C base package not available to download

    Posted Sat February 17, 2024 04:21 AM

    Hi José and Andrey !

    Ok, great gcc history, good new about g++ that helping me on AIX 7.3 compilation, have issue on linking :

    I installed it well whith dnf on my AIX 7.3. I copied from one Linux ($DB2DIR/samples/cpp/bldrtn) where DB2 installed and using g++ command and modified it fr my AIX (bldrtn_linux bellow), but i have one issue on linking with ld flags that i don't know how to set them ! have you any idea ?

    db2inst1@XXXX:/home/db2inst1/asncdctools/src$ export PATH=$PATH:/opt/freeware/bin

    db2inst1@XXXX:/home/db2inst1/asncdctools/src$ /db2/bin/V11.5.9.0/samples/cpp/bldrtn_linux asncdc
    + DB2PATH=/home/db2inst1/sqllib
    + EXTRA_C_FLAGS=
    + + uname -m
    HARDWAREPLAT=00C56C814B00                           <<<<<<<<<<<<<<<<<<<<<<<<<<< My AIX return this on uname -m command :), MVP script.
    + [ 00C56C814B00 = x86_64 ]
    + [ 00C56C814B00 = ppc64 ]
    + [ 00C56C814B00 = s390x ]
    + [ 00C56C814B00 = ia64 ]
    + [ 00C56C814B00 = ppc64le ]
    + [ 00C56C814B00 = 00C56C814B00 ]
    + BITWIDTH=64
    + [ 64 = 32 ]
    + [ 64 = 64 ]
    + LIB=lib64
    + [ 00C56C814B00 = 00C56C814B00 ]
    + EXTRA_C_FLAGS=-maix64
    + EXTRA_LFLAG=-Wl,-rpath,/home/db2inst1/sqllib/lib64
    + [ -f asncdc.sqC ]
    + g++ -maix64 -fpic -I/home/db2inst1/sqllib/include -c asncdc.C -D_REENTRANT
    + g++ -maix64 -shared -o asncdc asncdc.o -Wl,-rpath,/home/db2inst1/sqllib/lib64 -L/home/db2inst1/sqllib/lib64 -ldb2 -lpthread
    ld: 0706-012 The -p flag is not recognized.
    ld: 0706-012 The -a flag is not recognized.
    ld: 0706-012 The -t flag is not recognized.
    ld: 0706-012 The -h flag is not recognized.
    collect2: error: ld returned 255 exit status
    + rm -f /home/db2inst1/sqllib/function/asncdc
    + cp asncdc /home/db2inst1/sqllib/function
    cp: asncdc: No such file or directory
    db2inst1@XXXX:/home/db2inst1/asncdctools/src$ env | grep LD
    LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib64
    db2inst1@XXXX:/home/db2inst1/asncdctools/src$

    Thanks for your help.

    Abderahim



    ------------------------------
    Abderahim ABBAS
    ------------------------------



  • 12.  RE: vac.C base package not available to download

    Posted Sat February 17, 2024 08:14 AM
    If you see the flags it's complaining about , it spells "path".
    I think it is using the value here as flags

    EXTRA_LFLAG=-Wl,-rpath,/home/db2inst1/sqllib/lib64

    Is there somewhere you can change rpath to just r?  Maybe the comma should be dropped as well 
    Such as...
    -r /home/......






  • 13.  RE: vac.C base package not available to download

    IBM Champion
    Posted Mon February 19, 2024 04:23 AM

    + g++ -maix64 -fpic -I/home/db2inst1/sqllib/include -c asncdc.C -D_REENTRANT
    This one worked OK.

    + g++ -maix64 -shared -o asncdc asncdc.o -Wl,-rpath,/home/db2inst1/sqllib/lib64 -L/home/db2inst1/sqllib/lib64 -ldb2 -lpthread
    ld: 0706-012 The -p flag is not recognized.
    ld: 0706-012 The -a flag is not recognized.
    ld: 0706-012 The -t flag is not recognized.
    ld: 0706-012 The -h flag is not recognized.
    collect2: error: ld returned 255 exit status

    This passed the "-rpath,/home/db2inst1/sqllib/lib64" to the AIX linker (ld), where '-r' is a standalone flag, so ld's getopt is parsing the subsequent characters as if they were flags.

    Try this: g++ -maix64 -shared -o asncdc asncdc.o -Wl -L/home/db2inst1/sqllib/lib64 -ldb2 -lpthread



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 14.  RE: vac.C base package not available to download

    IBM Champion
    Posted Mon February 19, 2024 04:38 AM

    As far as I remember, the analog of -rpath would be -blibpath in AIX ld. Something like:

    -Wl,-blibpath:/home/db2inst1/sqllib/lib64

    But I may be wrong here...



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 15.  RE: vac.C base package not available to download

    Posted Mon February 19, 2024 01:40 PM

    Hi everyone ! thans so much for your help and time.

    After some lectures, used -L flags sufficient to compile :

    -L the path used for searching the libraries specified with the –l flag. The -L paths
    are recorded in the loader section as the default search path for dynamically loadable
    modules.
    -blibpath the path to be inserted into the default path (Index 0 path) field of the loader
    section. When this flag is presented, the -L paths will not be stored. More
    information on this in the examples below.

    -Wl,<options> are used to pass comma-separated <options> on to the linker, not used.

    So, compiled options and logs :

    db2inst1@XXXX:/home/db2inst1/asncdctools/src$ export LD_LIBRARY_PATH=$HOME/sqllib/lib64
    db2inst1@XXXX:/home/db2inst1/asncdctools/src$ export PATH=$PATH:/opt/freeware/bin

    db2inst1@XXXX:/home/db2inst1/asncdctools/src$ /db2/bin/V11.5.9.0/samples/cpp/bldrtn_linux asncdc
    + DB2PATH=/home/db2inst1/sqllib
    + EXTRA_C_FLAGS=
    + + /opt/freeware/bin/uname -p                <<<<<<<<<<<< i like /opt/freeware/bin for a lot of open source commands
    HARDWAREPLAT=powerpc
    + [ powerpc = x86_64 ]
    + [ powerpc = ppc64 ]
    + [ powerpc = s390x ]
    + [ powerpc = ia64 ]
    + [ powerpc = ppc64le ]
    + [ powerpc = powerpc ]
    + BITWIDTH=64
    + [ 64 = 32 ]
    + [ 64 = 64 ]
    + LIB=lib64
    + [ powerpc = powerpc ]
    + EXTRA_C_FLAGS=-maix64
    + EXTRA_LFLAG=-W
    + [ -f asncdc.sqC ]
    + g++ -maix64 -fpic -I/home/db2inst1/sqllib/include -c asncdc.c -D_REENTRANT
    + g++ -maix64 -shared -o asncdc asncdc.o -W -L/home/db2inst1/sqllib/lib64 -ldb2 -lpthread            <<<<<< 
    + rm -f /home/db2inst1/sqllib/function/asncdc
    + cp asncdc /home/db2inst1/sqllib/function
    db2inst1@XXXX:/home/db2inst1/asncdctools/src$

    So, my last compiled binary are in use by DB2 :

    db2inst1@XXXX:/home/db2inst1$ export DB2CODEPAGE=923
    db2inst1@XXXX:/home/db2inst1$ nohup ${HOME}/sqllib/bin/asncap capture_schema=asncdc capture_server=DBNAME &
    [1]     11011018
    db2inst1@XXXX:/home/db2inst1$ Sending output to nohup.out

    db2inst1@XXXX:/home/db2inst1$ cat nohup.out
    2024-02-18-09.30.28.850579 ASN0600I  "Capture" : "" : "Initial" : Program "capture 11.4.0 (Build 11.5.9.0 Level s2310270807, PTF DYN2310270807AIX)" is starting.
    2024-02-18-09.30.31.061677 ASN0100I  CAPTURE "ASNCDC" : "WorkerThread" : The Capture version "capture 11.4.0 (Build 11.5.9.0 Level s2310270807, PTF DYN2310270807AIX), DB2 v11.5.9" program initialized successfully.
    2024-02-18-09.30.31.061716 ASN0109I  CAPTURE "ASNCDC" : "WorkerThread". The Capture program has successfully initialized and is capturing data changes for "0" registrations. "0" registrations are in a stopped state. "0" registrations are in an inactive state.
    db2inst1@XXXX:/home/db2inst1$

    Thanks a lot to you !

    Abderahim



    ------------------------------
    Abderahim ABBAS
    ------------------------------