public inbox for pgsql-odbc@postgresql.org
help / color / mirror / Atom feedAIX 7.2 install psqlodbc with error
2+ messages / 2 participants
[nested] [flat]
* AIX 7.2 install psqlodbc with error
@ 2025-10-31 09:09 hlloo@hko.gov.hk
0 siblings, 1 reply; 2+ messages in thread
From: hlloo@hko.gov.hk @ 2025-10-31 09:09 UTC (permalink / raw)
To: pgsql-odbc; +Cc: H Loo <hildaloo2011@gmail.com>; LingLoo Hing <hlloo@hko.gov.hk>
Dear Guru,
The issue happened when I do below with 'Illegal instruction(coredump):
>isql -v test_pg
Illegal instruction(coredump)
>odbcinst -j
unixODBC 2.3.9
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /etc/odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
Illegal instruction(coredump)
My Questions:
1. Does psqlodbc is not supported to install or use with AIX 64bit server
as remote connecting to other postgres server?
2. My download of psqlodbc is wrong?
3. Any clues my steps in-correct or any good way to install psqlodbc ? (I
eventally need this driver to configure AIX oracle DBlink to read Postgres
Data)
Below are the setup step I did:
I download psqlodbc-13.02.0000.tar.gz from
https://ftp.postgresql.org/pub/odbc/versions.old/src/psqlodbc-13.02.0000.tar.gz
cd psqlodbc-13.02.0000
chown -R root:system *
autoconfig -i
./configure ODBCVER=0x0351 CPPFLAGS="-DSQLCOLATTRIBUTE_SQLLEN"
--with-libpq=/usr/local/pgsql --with-unixodbc=/opt/freeware/bin
--disable-dependency-tracking --prefix=/usr/local \
--build=powerpc-ibm-aix --host=powerpc-ibm-aix CC="gcc -maix64" CXX="g++
-maix64"
...
checking for library containing SQLGetPrivateProfileString... -lodbcinst
checking for pthread_create in -lpthreads... yes
checking for PQsetSingleRowMode in -lpq... no
configure: error: libpq library version >= 9.2 is required <==== [found
no solution to fix error like this]
Thus, then try manual compile:
# Build object files individually
for file in *.c; do
if [ "$file" != "odbcapi30.c" ]; then
gcc $CFLAGS -c -fPIC $file -o ${file%.c}.o
fi
done
gcc $CFLAGS -DSQLColAttribute=my_SQLColAttribute -c -fPIC odbcapi30.c -o
odbcapi30.o
gcc -maix64 -shared -o psqlodbc.so *.o $LDFLAGS $LIBS -Wl,-G -Wl,-brtl
>ls psqlodbc*
psqlodbc.c psqlodbc.def psqlodbc.dsp psqlodbc.h psqlodbc.o
psqlodbc.rc psqlodbc.reg psqlodbc.sln psqlodbc.so
psqlodbc.vcproj psqlodbca.def
My environment
I target to have psqlodbc installing to AIX7.2:
>oslevel -s
7200-04-02-2028
>prtconf -c
CPU Type: 64-bit
>bootinfo -K
64
ODBC driver version 2.3.9
PostgreSQL version 11.9
Due to AIX 7.2 available psqlodbc that I can find and trying the download
psqlodbc-13.02.0000 download
Currently has unixodbc installed and OK to use.
resulted coredump
>file /oracle/psqlodbc-13.02.0000/psqlodbc.so
/oracle/psqlodbc-13.02.0000/psqlodbc.so: 64-bit XCOFF executable or object
module not stripped
~root@gapoc1:/oracle/psqlodbc-13.02.0000~
>dump -Hv -X64 /oracle/psqlodbc-13.02.0000/psqlodbc.so
/oracle/psqlodbc-13.02.0000/psqlodbc.so:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x00000268 0x0000063b 0x00000096
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000007 0x00009da8 0x00002bca 0x00009e3e
***Import File Strings***
INDEX PATH BASE MEMBER
0 /opt/freeware/lib:/usr/lib:/lib
1 libpq.a libpq.so.5
2 libodbc.a libodbc.so.2
3 libodbcinst.a libodbcinst.so.2
4 libgcc_s.a shr.o
5 libc.a shr_64.o
6 ..
~root@gapoc1:/oracle/psqlodbc-13.02.0000~
>
>ldd /oracle/psqlodbc-13.02.0000/psqlodbc.so
/oracle/psqlodbc-13.02.0000/psqlodbc.so needs:
/opt/freeware/lib/libpq.a(libpq.so.5)
/opt/freeware/lib/libodbc.a(libodbc.so.2)
/opt/freeware/lib/libodbcinst.a(libodbcinst.so.2)
/opt/freeware/lib/libgcc_s.a(shr.o)
/usr/lib/libc.a(shr_64.o)
/opt/freeware/lib/libtcl8.6.a(libtcl8.6.so)
/opt/freeware/lib/libldap_r.a(libldap_r-2.4.so.2)
/opt/freeware/lib/libintl.a(libintl.so.8)
/usr/lib/libpthreads.a(shr_xpg5_64.o)
/opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.2)
/opt/freeware/lib/libssl.a(libssl.so.1.0.2)
/opt/freeware/lib/libiconv.a(libiconv.so.2)
/usr/lib/libpthread.a(shr_xpg5_64.o)
/unix
/usr/lib/libcrypt.a(shr_64.o)
/usr/lib/libdl.a(shr_64.o)
/opt/freeware/lib/liblber.a(liblber-2.4.so.2)
/opt/freeware/lib/libsasl2.a(libsasl2.so.3)
/usr/lib/libs.a(shr_64.o)
~root@gapoc1:/oracle/psqlodbc-13.02.0000~
I very appreciate you shed a light to this issue.
Regards
Hilda
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: AIX 7.2 install psqlodbc with error
@ 2025-10-31 19:28 Dave Cramer <davecramer@postgres.rocks>
parent: hlloo@hko.gov.hk
0 siblings, 0 replies; 2+ messages in thread
From: Dave Cramer @ 2025-10-31 19:28 UTC (permalink / raw)
To: hlloo@hko.gov.hk; +Cc: pgsql-odbc; H Loo <hildaloo2011@gmail.com>
Hello,
We don't have an AIX machine to test on.
I would try the latest version, you can get it
https://github.com/postgresql-interfaces/psqlodbc
I'd also post this there as there may be someone using AIX that can help
out.
Dave Cramer
www.postgres.rocks
On Fri, 31 Oct 2025 at 08:07, <hlloo@hko.gov.hk> wrote:
> Dear Guru,
>
> The issue happened when I do below with 'Illegal instruction(coredump):
>
> >isql -v test_pg
> Illegal instruction(coredump)
>
> >odbcinst -j
> unixODBC 2.3.9
> DRIVERS............: /etc/odbcinst.ini
> SYSTEM DATA SOURCES: /etc/odbc.ini
> FILE DATA SOURCES..: /etc/ODBCDataSources
> USER DATA SOURCES..: /etc/odbc.ini
> SQLULEN Size.......: 8
> SQLLEN Size........: 8
> SQLSETPOSIROW Size.: 8
> Illegal instruction(coredump)
>
>
> *My Questions: *
> 1. Does psqlodbc is not supported to install or use with AIX 64bit server
> as remote connecting to other postgres server?
> 2. My download of psqlodbc is wrong?
> 3. Any clues my steps in-correct or any good way to install psqlodbc ? (I
> eventally need this driver to configure AIX oracle DBlink to read Postgres
> Data)
>
>
> *Below are the setup step I did: *
>
> I download psqlodbc-13.02.0000.tar.gz from
> https://ftp.postgresql.org/pub/odbc/versions.old/src/psqlodbc-13.02.0000.tar.gz
>
> cd psqlodbc-13.02.0000
> chown -R root:system *
>
> autoconfig -i
>
> ./configure ODBCVER=0x0351 CPPFLAGS="-DSQLCOLATTRIBUTE_SQLLEN"
> --with-libpq=/usr/local/pgsql --with-unixodbc=/opt/freeware/bin
> --disable-dependency-tracking --prefix=/usr/local \
> --build=powerpc-ibm-aix --host=powerpc-ibm-aix CC="gcc -maix64" CXX="g++
> -maix64"
>
> ...
> checking for library containing SQLGetPrivateProfileString... -lodbcinst
> checking for pthread_create in -lpthreads... yes
> checking for PQsetSingleRowMode in -lpq... no
> configure: error: libpq library version >= 9.2 is required <==== [found
> no solution to fix error like this]
>
>
> Thus, then try manual compile:
>
> # Build object files individually
> for file in *.c; do
> if [ "$file" != "odbcapi30.c" ]; then
> gcc $CFLAGS -c -fPIC $file -o ${file%.c}.o
> fi
> done
> gcc $CFLAGS -DSQLColAttribute=my_SQLColAttribute -c -fPIC odbcapi30.c -o
> odbcapi30.o
> gcc -maix64 -shared -o psqlodbc.so *.o $LDFLAGS $LIBS -Wl,-G -Wl,-brtl
>
> >ls psqlodbc*
> psqlodbc.c psqlodbc.def psqlodbc.dsp psqlodbc.h
> psqlodbc.o psqlodbc.rc psqlodbc.reg psqlodbc.sln
> psqlodbc.so psqlodbc.vcproj psqlodbca.def
>
>
>
> *My environment*
>
> I target to have psqlodbc installing to AIX7.2:
>
> >oslevel -s
> 7200-04-02-2028
>
> >prtconf -c
> CPU Type: 64-bit
>
> >bootinfo -K
> 64
>
> ODBC driver version 2.3.9
> PostgreSQL version 11.9
>
> Due to AIX 7.2 available psqlodbc that I can find and trying the download
> psqlodbc-13.02.0000 download
>
>
>
> Currently has unixodbc installed and OK to use.
>
>
>
>
> resulted coredump
>
>
>
>
> >file /oracle/psqlodbc-13.02.0000/psqlodbc.so
> /oracle/psqlodbc-13.02.0000/psqlodbc.so: 64-bit XCOFF executable or object
> module not stripped
> ~root@gapoc1:/oracle/psqlodbc-13.02.0000~
>
>
>
>
> >dump -Hv -X64 /oracle/psqlodbc-13.02.0000/psqlodbc.so
>
> /oracle/psqlodbc-13.02.0000/psqlodbc.so:
>
> ***Loader Section***
> Loader Header Information
> VERSION# #SYMtableENT #RELOCent LENidSTR
> 0x00000001 0x00000268 0x0000063b 0x00000096
>
> #IMPfilID OFFidSTR LENstrTBL OFFstrTBL
> 0x00000007 0x00009da8 0x00002bca 0x00009e3e
>
>
> ***Import File Strings***
> INDEX PATH BASE MEMBER
> 0 /opt/freeware/lib:/usr/lib:/lib
> 1 libpq.a libpq.so.5
> 2 libodbc.a libodbc.so.2
> 3 libodbcinst.a libodbcinst.so.2
> 4 libgcc_s.a shr.o
> 5 libc.a shr_64.o
> 6 ..
> ~root@gapoc1:/oracle/psqlodbc-13.02.0000~
> >
>
>
>
> >ldd /oracle/psqlodbc-13.02.0000/psqlodbc.so
> /oracle/psqlodbc-13.02.0000/psqlodbc.so needs:
> /opt/freeware/lib/libpq.a(libpq.so.5)
> /opt/freeware/lib/libodbc.a(libodbc.so.2)
> /opt/freeware/lib/libodbcinst.a(libodbcinst.so.2)
> /opt/freeware/lib/libgcc_s.a(shr.o)
> /usr/lib/libc.a(shr_64.o)
> /opt/freeware/lib/libtcl8.6.a(libtcl8.6.so)
> /opt/freeware/lib/libldap_r.a(libldap_r-2.4.so.2)
> /opt/freeware/lib/libintl.a(libintl.so.8)
> /usr/lib/libpthreads.a(shr_xpg5_64.o)
> /opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.2)
> /opt/freeware/lib/libssl.a(libssl.so.1.0.2)
> /opt/freeware/lib/libiconv.a(libiconv.so.2)
> /usr/lib/libpthread.a(shr_xpg5_64.o)
> /unix
> /usr/lib/libcrypt.a(shr_64.o)
> /usr/lib/libdl.a(shr_64.o)
> /opt/freeware/lib/liblber.a(liblber-2.4.so.2)
> /opt/freeware/lib/libsasl2.a(libsasl2.so.3)
> /usr/lib/libs.a(shr_64.o)
> ~root@gapoc1:/oracle/psqlodbc-13.02.0000~
>
> I very appreciate you shed a light to this issue.
>
> Regards
> Hilda
Attachments:
[image/gif] noname (63.2K, 3-noname)
download | view image
[image/gif] noname (8.6K, 4-noname)
download | view image
[image/gif] noname (9.1K, 5-noname)
download | view image
[image/gif] noname (5.0K, 6-noname)
download | view image
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-10-31 19:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-31 09:09 AIX 7.2 install psqlodbc with error hlloo@hko.gov.hk
2025-10-31 19:28 ` Dave Cramer <davecramer@postgres.rocks>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox