We did not have any krb5 errors, but there is something going on with libiconv. I ran the build three ways:
The first did not specify anything about iconv in the configure command:
configure --prefix=/apps/home/pdb --enable-krb5 > configure.20230707.txt 2>&1
make clean all > make.20230707.txt 2>&1
and ended in linker errors:
ld: 0711-317 ERROR: Undefined symbol: .libiconv_open
ld: 0711-317 ERROR: Undefined symbol: .libiconv_close
ld: 0711-317 ERROR: Undefined symbol: .libiconv
The second set the iconv path to one of two candidate locations:
configure --prefix=/apps/home/pdb --enable-krb5 --with-libiconv-prefix=/opt/freeware > configure.freew
make clean all > make.freeware.txt 2>&1
and resulted in the same linker errors:
ld: 0711-317 ERROR: Undefined symbol: .libiconv_open
ld: 0711-317 ERROR: Undefined symbol: .libiconv_close
ld: 0711-317 ERROR: Undefined symbol: .libiconv
The third set a different iconv path:
configure --prefix=/apps/home/pdb --enable-krb5 --with-libiconv-prefix=/usr > configure.usr.txt 2>&1
make clean all > make.usr.txt 2>&1
and completed successfully, but I do not know yet whether it is working. I have installed it for the developer who was asking for it and will know more when he completes his testing.
For now, I have a question about our libiconv installation. I am told that we have the latest, but i don't know the install path. I see two main candidates:
-rw-r--r-- 1 root system 3205279 Mar 22 10:32 /opt/freeware/lib/libiconv.a
-r--r--r-- 1 bin bin 782787 Nov 17 2021 /usr/lib/libiconv.a
I expected the one in /opt/freeware/lib to work, but it did not. What can I do to test or update libiconv? Or am I barking up the wrong tree there?
All output files attached. Thanks!
------------------------------
Greg O'Keefe
------------------------------
Original Message:
Sent: Mon July 03, 2023 11:45 AM
From: Greg O'Keefe
Subject: Compiling of FreeTDS from source on AIX 7.3
Thank you! We will do that and post the results.
------------------------------
Greg O'Keefe
Original Message:
Sent: Sat July 01, 2023 01:33 AM
From: Ranjit Ranjan
Subject: Compiling of FreeTDS from source on AIX 7.3
I see, some further progress in build log.
To fix the below error, you can install readline-devel package using 'dnf install readline-devel' and try again the same steps for building
fisql.c:29:10: fatal error: readline/readline.h: No such file or directory 29 | #include <readline/readline.h> | ^~~~~~~~~~~~~~~~~~~~~
------------------------------
Ranjit Ranjan
Original Message:
Sent: Fri June 30, 2023 07:45 PM
From: Greg O'Keefe
Subject: Compiling of FreeTDS from source on AIX 7.3
Done, output attached.
------------------------------
Greg O'Keefe
Original Message:
Sent: Fri June 30, 2023 06:57 PM
From: Ranjit Ranjan
Subject: Compiling of FreeTDS from source on AIX 7.3
This looks fine. At least , this is not reporting KRB related symbol issue.
Try 'export LDFLAGS="-L/opt/freeware/lib"' in the shell , then below
- ./configure --prefix=/ranjit/freetds/build --enable-krb5
- make
- make install
------------------------------
Ranjit Ranjan
Original Message:
Sent: Fri June 30, 2023 12:58 PM
From: Greg O'Keefe
Subject: Compiling of FreeTDS from source on AIX 7.3
I tried that and it failed (see below). In fact, that is essentially the thing I tried back a few months ago. I started with configure, added --prefix, added --with-iconv-prefix, and then added --enable-krb5 in various permutations. The --with-iconv-prefix was in response to the libiconv linker errors, and the --enable-krb5 was in response to runtime connect failures. Here is my output from the most recent test (configure output and make output attached):
configure --prefix=/home/gokeefe --enable-krb5 > configure.20230630.out 2>&1
make > make.20230630.out 2>&1
------------------------------
Greg O'Keefe
Original Message:
Sent: Fri June 30, 2023 12:24 PM
From: Ranjit Ranjan
Subject: Compiling of FreeTDS from source on AIX 7.3
I am able to build the same version by following below steps. Try once on the freshly cloned/checkout code . Just to avoid any wrong configuration in existing folder.
- ./configure --prefix=/ranjit/freetds/build --enable-krb5
- make
- make install
(0) root @ aixoss1-lp2: /ranjit/freetds/build/bin
# pwd
/ranjit/freetds/build/bin
(0) root @ aixoss1-lp2: /ranjit/freetds/build/bin
# ls
bsqldb bsqlodbc datacopy defncopy fisql freebcp osql tdspool tsql
------------------------------
Ranjit Ranjan
Original Message:
Sent: Fri June 30, 2023 10:42 AM
From: Greg O'Keefe
Subject: Compiling of FreeTDS from source on AIX 7.3
Thanks, both of you. This freetds-1.3.18 (let me know if you want configure output or build output, and I'll run it again and save everything). For the target file specified by --enable-krb5=[lib], I tried every version that I could find on the box, minus the 64-bit libs.
Step 1:
configure --prefix=/apps/home/pdb --with-libiconv-prefix=/usr --enable-krb5=/usr/krb5/lib/libtp_krb5.a
Step 2:
# edit the generated Makefiles as needed (currently there are three)
cd src/apps
sed '/^CFLAGS*/s/$/ -I\/home\/gokeefe\/external\/include/' Makefile > Makefile-
mv Makefile- Makefile
cd -
cd src/apps/fisql
sed '/^CFLAGS*/s/$/ -I\/home\/gokeefe\/external\/include/' Makefile > Makefile-
mv Makefile- Makefile
cd -
cd src/tds
sed '/^CFLAGS*/s/$/ -I\/apps\/home\/pdb\/include/' Makefile > Makefile-
mv Makefile- Makefile
cd -
Step 3:
make clean all install
------------------------------
Greg O'Keefe
Original Message:
Sent: Fri June 30, 2023 08:10 AM
From: Ranjit Ranjan
Subject: Compiling of FreeTDS from source on AIX 7.3
And also, share the steps you are using to build.
------------------------------
Ranjit Ranjan
Original Message:
Sent: Mon June 26, 2023 08:26 AM
From: Ken Foster
Subject: Compiling of FreeTDS from source on AIX 7.3
One of our developers is trying to compile FreeTDS from source on AIX 7.3
They are having trouble with the Kerberos piece. they are receiving linker errors during the compile.
Here are the installed krb5 packages.
krb5.client.rte 1.6.0.4
krb5.client.samples 1.6.0.4
krb5.doc.en_US.html 1.5.0.0
krb5.doc.en_US.pdf 1.6.0.4
krb5.lic 1.6.0.4
krb5.msg.EN_US.client.rte 1.6.0.4
krb5.client.rte 1.6.0.4
The switch for turning on kerberos says all that is needed is to have kerberos configured on the server. Is the krb5.toolkit also required?
Here is some of the output from the developer.
ld: 0711-317 ERROR: Undefined symbol: .gss_init_sec_context
ld: 0711-317 ERROR: Undefined symbol: .gss_release_buffer
ld: 0711-317 ERROR: Undefined symbol: .gss_release_name
ld: 0711-317 ERROR: Undefined symbol: .gss_delete_sec_context
ld: 0711-317 ERROR: Undefined symbol: .gss_import_name
# available Kerberos libs to test/choose from (64-bit libs removed from list):
#-rw-r--r-- 1 user staff 544919 Aug 18 2016 /apps/home/pdb/lib/libgssapi_krb5.so.2.2 x
# ends with the following linker errors:
# ld: 0711-317 ERROR: Undefined symbol: .gss_init_sec_context
# ld: 0711-317 ERROR: Undefined symbol: .gss_release_buffer
# ld: 0711-317 ERROR: Undefined symbol: .gss_release_name
# ld: 0711-317 ERROR: Undefined symbol: .gss_delete_sec_context
# ld: 0711-317 ERROR: Undefined symbol: .gss_import_name
#-rw-r--r-- 1 staff 1418007 Aug 18 2016 /apps/home/pdb/lib/libkrb5.so.3.3 x
# same as above*
#-rw-r--r-- 1 staff 89628 Aug 18 2016 /apps/home/pdb/lib/libkrb5support.so.0.1 x
# same as above*
# *did not clean first
#-rw-r--r-- 1 root system 9512997 Mar 22 10:33 /opt/freeware/lib/libgssapi_krb5.a x
# same as above
#-rw-r--r-- 1 root system 3460839 Oct 18 2022 /opt/freeware/lib/libgssapi_krb5.so.2.2 x
# same as above
#-rw-r--r-- 1 root system 15770215 Mar 22 10:33 /opt/freeware/lib/libkrb5.a x
# same as above
#-rw-r--r-- 1 root system 6347404 Oct 18 2022 /opt/freeware/lib/libkrb5.so.3.3 x
# same as above
#-rw-r--r-- 1 root system 1215718 Oct 18 2022 /opt/freeware/lib/libkrb5support.a x
# same as above
#-rw-r--r-- 1 root system 583174 Oct 18 2022 /opt/freeware/lib/libkrb5support.so.0.1 x
# same as above
#-rw-r--r-- 1 heidev heidev 544919 Aug 18 2016 /opt/pdb/pdb1/lib/libgssapi_krb5.so x
# same as above
#-rw-r--r-- 1 heidev heidev 544919 Aug 18 2016 /opt/pdb/pdb1/lib/libgssapi_krb5.so.2.2 x
# same as above
#-rw-r--r-- 1 heidev heidev 1418007 Aug 18 2016 /opt/pdb/pdb1/lib/libkrb5.so x
# same as above
#-rw-r--r-- 1 heidev heidev 1418007 Aug 18 2016 /opt/pdb/pdb1/lib/libkrb5.so.3.3 x
# same as above
#-rw-r--r-- 1 heidev heidev 89628 Aug 18 2016 /opt/pdb/pdb1/lib/libkrb5support.so x
# same as above
#-rw-r--r-- 1 heidev heidev 89628 Aug 18 2016 /opt/pdb/pdb1/lib/libkrb5support.so.0.1 x
# same as above
#-rw-r--r-- 1 root security 2348647 Jan 30 2017 /usr/krb5/lib/libgssapi_krb5.a x
# same as above
#-rw-r--r-- 1 root security 2576906 Jan 30 2017 /usr/krb5/lib/libkrb5.a x
# same as above
#-rw-r--r-- 1 root system 30938 Apr 26 2012 /usr/lib/libtp_krb5.a x
#threadsafe.c: In function 'tds_getservice':
#threadsafe.c:248:2: error: #error getservbyname_r style unknown
# 248 | #error getservbyname_r style unknown
------------------------------
Ken Foster
------------------------------