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
------------------------------
Original Message:
Sent: Mon February 19, 2024 04:37 AM
From: Andrey Klyachkin
Subject: vac.C base package not available to download
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
Original Message:
Sent: Sat February 17, 2024 04:21 AM
From: Abderahim ABBAS
Subject: vac.C base package not available to download
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
Original Message:
Sent: Fri February 16, 2024 05:40 PM
From: José Pina Coelho
Subject: vac.C base package not available to download
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
Original Message:
Sent: Fri February 16, 2024 01:00 PM
From: Abderahim ABBAS
Subject: vac.C base package not available to download
g++ not proposed on https://www.ibm.com/support/pages/aix-toolbox-open-source-software-downloads-alpha
Thanks.
------------------------------
Abderahim ABBAS
Original Message:
Sent: Fri February 16, 2024 04:52 AM
From: José Pina Coelho
Subject: vac.C base package not available to download
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
Original Message:
Sent: Thu February 15, 2024 07:52 AM
From: Abderahim ABBAS
Subject: vac.C base package not available to download
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
Original Message:
Sent: Thu February 15, 2024 04:47 AM
From: Andrey Klyachkin
Subject: vac.C base package not available to download
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
Original Message:
Sent: Wed February 14, 2024 04:20 PM
From: Abderahim ABBAS
Subject: vac.C base package not available to download
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
------------------------------