Bug 6464 - samba 3.3.4 build failure on AIX 5.3/6.1 against IBM Kerberos
Summary: samba 3.3.4 build failure on AIX 5.3/6.1 against IBM Kerberos
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.3.4
Hardware: PPC AIX
: P3 enhancement
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-10 17:42 UTC by Ben Huntsman
Modified: 2019-10-14 19:01 UTC (History)
2 users (show)

See Also:


Attachments
config.log, gzipped. (128.82 KB, application/octet-stream)
2009-06-10 17:59 UTC, Ben Huntsman
no flags Details
krb5.h from IBM Kerberos (75.79 KB, text/plain)
2009-06-11 09:52 UTC, Ben Huntsman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Huntsman 2009-06-10 17:42:33 UTC
Attempting to compile Samba 3.3.4 as STATIC on IBM AIX 5.3 with latest patches.  This will be deployed on AIX 6.1.
IBM Kerberos is installed into /usr/krb5.  IBM Kerberos puts its headers in /usr/include.  I can furnish the krb5.h upon request.

The point is to be able to join the AIX system to an Active Directory domain.
It seems as though samba is unable to determine the protocols supported by IBM's Kerberos.

OpenLDAP is compiled as Static libs, and is version 2.4.16.
C Compiler is gcc 3.3.2

Here are the build errors:

Compiling libsmb/clikrb5.c
libsmb/clikrb5.c:258:2: #error UNKNOWN_CREATE_KEY_FUNCTIONS
libsmb/clikrb5.c:1011:2: #error UNKNOWN_KRB5_VERIFY_CHECKSUM_FUNCTION
libsmb/clikrb5.c: In function `handle_krberror_packet':
libsmb/clikrb5.c:1527: error: `ERROR_TABLE_BASE_krb5' undeclared (first use in t
his function)
libsmb/clikrb5.c:1527: error: (Each undeclared identifier is reported only once
libsmb/clikrb5.c:1527: error: for each function it appears in.)
libsmb/clikrb5.c:1608:2: #error UNKNOWN_KRB5_ENCTYPE_TO_STRING_FUNCTION
The following command failed:
gcc -I. -I/bk/compile/samba-3.3.4/build/source  -I/bk/compile/samba-3.3.4/openld
ap/include -O -D_SAMBA_BUILD_=3 -I/bk/compile/samba-3.3.4/build/source/popt -I/b
k/compile/samba-3.3.4/build/source/iniparser/src -Iinclude -I./include  -I. -I.
-I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAV
E_CONFIG_H  -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib
/tdb/include -I./libaddns -I./librpc -I./popt -DLDAP_DEPRECATED   -I/include -I/
bk/compile/samba-3.3.4/build/source/lib -D_SAMBA_BUILD_=3  -c libsmb/clikrb5.c -
o libsmb/clikrb5.o
make: 1254-004 The error code from the last command is 1.


Here are the options to configure:

./configure \
--prefix=/opt/samba-3.3.4 \
--sysconfdir=/etc/samba-3.3.4 \
--localstatedir=/var/adm/samba-3.3.4 \
--enable-static=yes \
--enable-shared=no \
--with-privatedir=/etc/samba-3.3.4/private \
--with-lockdir=/var/adm/samba-3.3.4/locks \
--with-piddir=/var/adm/samba-3.3.4/locks \
--with-swatdir=/opt/samba-3.3.4/swat \
--with-configdir=/etc/samba-3.3.4/conf \
--with-logfilebase=/var/adm/samba-3.3.4/logs \
--with-localedir=/etc/samba-3.3.4/locale \
--with-aio-support \
--with-winbind \
--with-ldap \
--with-ads \
--with-krb5 \
--with-pam \

Björn Jacke asked for the config.log, but as it's ~5mb, I can't post it here.  I will see about attaching it, or will make it available for ftp download upon request.
Comment 1 Ben Huntsman 2009-06-10 17:59:25 UTC
Created attachment 4270 [details]
config.log, gzipped.
Comment 2 Björn Jacke 2009-06-11 09:36:17 UTC
please also attach krb5.h and a list of other files from the krb5 package in /usr/include if you can find any. Also please attach the ouput of "find /usr/krb5" so we can see which files there are.

And IBM does not ship the shared libs?
Comment 3 Ben Huntsman 2009-06-11 09:52:10 UTC
Created attachment 4277 [details]
krb5.h from IBM Kerberos
Comment 4 Ben Huntsman 2009-06-11 09:56:35 UTC
IBM may supply shared libs, but we are building static to attempt to eliminate dependency issues.  Not all of our systems have the same packages installed, and we wish to deploy the same binaries to a dozen or so different systems.  Some of these are AIX 5.3, but most are 6.1.  We are willing to investigate building shared if it is determined that this will not work otherwise.

Here is the output from find:

$ find /usr/krb5 -print
/usr/krb5
/usr/krb5/bin
/usr/krb5/bin/kdestroy
/usr/krb5/bin/kinit
/usr/krb5/bin/klist
/usr/krb5/bin/kpasswd
/usr/krb5/bin/ksu
/usr/krb5/bin/kvno
/usr/krb5/sbin
/usr/krb5/sbin/kadmin
/usr/krb5/sbin/ksetup
/usr/krb5/sbin/ktutil
/usr/krb5/sbin/setpagname
/usr/krb5/sbin/config.krb5
/usr/krb5/sbin/unconfig.krb5
/usr/krb5/sbin/start.krb5
/usr/krb5/sbin/stop.krb5
/usr/krb5/lib
/usr/krb5/lib/libgssapi_krb5.a
/usr/krb5/lib/libgssrpc.a
/usr/krb5/lib/libkadm5clnt.a
/usr/krb5/lib/libkdb5.a
/usr/krb5/lib/libkrb5.a
/usr/krb5/lib/libss.a
/usr/krb5/lib/libk5profile.a
/usr/krb5/lib/libksvc.a
/usr/krb5/scripts
/usr/krb5/scripts/clean_exit
/usr/krb5/scripts/defines
/usr/krb5/scripts/get_cfg_args
/usr/krb5/scripts/get_st_args
/usr/krb5/scripts/get_ucfg_args
/usr/krb5/scripts/init
/usr/krb5/scripts/mk_cl_cfg
/usr/krb5/scripts/mk_srv_cfg
/usr/krb5/scripts/rm_cfg
/usr/krb5/scripts/rm_utils
/usr/krb5/scripts/start_daemons
/usr/krb5/scripts/stop_daemons
/usr/krb5/scripts/ls_entry
/usr/krb5/scripts/mk_entry
/usr/krb5/scripts/rm_entry
/usr/krb5/scripts/runkprop
/usr/krb5/ldif
/usr/krb5/ldif/IBM.service.schema.ldif
/usr/krb5/ldif/NS5.service.schema.ldif
/usr/krb5/ldif/service_add.ldif
/usr/krb5/README.en_US
/usr/krb5/README.KO_KR
/usr/krb5/README.ko_KR
/usr/krb5/README.PT_BR
/usr/krb5/README.pt_BR
/usr/krb5/README.ZH_CN
/usr/krb5/README.Zh_CN
/usr/krb5/README.zh_CN
/usr/krb5/README.ZH_TW
/usr/krb5/README.Zh_TW
/usr/krb5/README.zh_TW
/usr/krb5/COPYRIGHT

Comment 5 Björn Jacke 2009-06-11 14:51:17 UTC
does compile work if you use the configure option --with-krb5=/usr/krb5 ?
Comment 6 Ben Huntsman 2009-06-11 18:17:13 UTC
No, compiling with the option --with-krb5=/usr/krb5 still does not work.
Here is the output:

libsmb/clikrb5.c:258:2: #error UNKNOWN_CREATE_KEY_FUNCTIONS
libsmb/clikrb5.c:1011:2: #error UNKNOWN_KRB5_VERIFY_CHECKSUM_FUNCTION
libsmb/clikrb5.c: In function `handle_krberror_packet':
libsmb/clikrb5.c:1527: error: `ERROR_TABLE_BASE_krb5' undeclared (first use in t
his function)
libsmb/clikrb5.c:1527: error: (Each undeclared identifier is reported only once
libsmb/clikrb5.c:1527: error: for each function it appears in.)
libsmb/clikrb5.c:1608:2: #error UNKNOWN_KRB5_ENCTYPE_TO_STRING_FUNCTION
The following command failed:
gcc -I. -I/bk/compile/samba-3.3.4/build/source  -I/usr/krb5/include -I/bk/compil
e/samba-3.3.4/openldap/include -O -D_SAMBA_BUILD_=3 -I/bk/compile/samba-3.3.4/bu
ild/source/popt -I/bk/compile/samba-3.3.4/build/source/iniparser/src -Iinclude -
I./include  -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libad
dns -I./librpc -DHAVE_CONFIG_H  -I/usr/krb5/include -Iinclude -I./include -I. -I
. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I.
/popt -DLDAP_DEPRECATED   -I/include -I/bk/compile/samba-3.3.4/build/source/lib 
-D_SAMBA_BUILD_=3  -c libsmb/clikrb5.c -o libsmb/clikrb5.o
make: 1254-004 The error code from the last command is 1.
Comment 7 Daniel Moldovan 2009-11-11 07:25:42 UTC
Hi Support,

I got the same errors on Solaris 10 and Samba 3.3.9, Samba 3.4.2, Samba 3.4.3

Regards
rippacc
Comment 8 Björn Jacke 2009-11-23 11:11:16 UTC
the proper fix is actually to fix the krb5 installation: there should always the krb5-config around these days, which can't be found on your system. For that reason linking of the krb5 test progs fails.

If you can provide remote access to such a machine I might have a look if manual krb5 detection could be improved to work on a system with an broken/incomplete krb5 install like this.
Comment 9 Daniel Moldovan 2009-11-24 04:04:54 UTC
(In reply to comment #8)
> the proper fix is actually to fix the krb5 installation: there should always
> the krb5-config around these days, which can't be found on your system. For
> that reason linking of the krb5 test progs fails.
> 
> If you can provide remote access to such a machine I might have a look if
> manual krb5 detection could be improved to work on a system with an
> broken/incomplete krb5 install like this.
> 
Hi Björn,

as a work around I modified confingure.in 

# change line 3796 
smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=no)])
to
smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes)])

And I made further work arrounds
LD=/usr/ccs/bin/ld
and while calling ./configure GCC="gcc -m64"

With these workarounds I got a functional samba installation in 64 Bit on
Solaris 9 and Solaris 10.

Regards
rippacc

Comment 10 Björn Jacke 2019-10-14 19:01:42 UTC
this is about the old autoconf build system, which we don't have any more and about incorrect krb5 installations. closing this bug finally.