Skip Menu |
 

From: Mark Ashley <mark@ibiblio.org>
Date: Wed, 20 Feb 2013 16:34:02 +1100
Subject: krb5 1.11 doesn't build on Solaris w/ Sun Studio, the first time. A re-make works
To: krb5-bugs@mit.edu
Download (untitled) / with headers
text/plain 2.5KiB
Hi folks,

There's a weird (i.e. I didn't spend any time tracking it down)
problem with libdb2 in krb5 1.11.

The compile fails with:

making all in plugins/kdb/db2...
gmake[1]: Entering directory `/var/tmp/krb5-1.11/src/plugins/kdb/db2'
cc -KPIC -DSHARED -DPLUGIN -I../../../include -I../../../include
-I../../../lib/kdb -I./../../../lib/kdb -DKRB5_DEPRECATED=1
-DKRB5_PRIVATE -I/usr/local/include -L/usr/local/lib
-I/usr/local/include -L/usr/local/lib -errtags=yes
-errwarn=E_BAD_PTR_INT_COMBINATION,E_BAD_PTR_INT_COMB_ARG,E_PTR_TO_VOID_IN_ARITHMETIC,E_NO_IMPLICIT_DECL_ALLOWED,E_ATTRIBUTE_PARAM_UNDEFINED
-D_REENTRANT -c kdb_xdr.c -o kdb_xdr.so.o && mv -f kdb_xdr.so.o
kdb_xdr.so
cc -KPIC -DSHARED -DPLUGIN -I../../../include -I../../../include
-I../../../lib/kdb -I./../../../lib/kdb -DKRB5_DEPRECATED=1
-DKRB5_PRIVATE -I/usr/local/include -L/usr/local/lib
-I/usr/local/include -L/usr/local/lib -errtags=yes
-errwarn=E_BAD_PTR_INT_COMBINATION,E_BAD_PTR_INT_COMB_ARG,E_PTR_TO_VOID_IN_ARITHMETIC,E_NO_IMPLICIT_DECL_ALLOWED,E_ATTRIBUTE_PARAM_UNDEFINED
-D_REENTRANT -c adb_openclose.c -o adb_openclose.so.o && mv -f
adb_openclose.so.o adb_openclose.so
"policy_db.h", line 58: syntax error before or at: HASHINFO
"adb_openclose.c", line 26: undefined symbol: BTREEINFO
"adb_openclose.c", line 26: syntax error before or at: btinfo
"adb_openclose.c", line 28: undefined symbol: btinfo

Possibly the db.hin file didn't get modded into db.h?

If I then run a make in the plugins/kdb/db2/libdb2 dir and then re-run
the make from the top src directory then things keep on flowing and
the compile completes.

Here's the full recipe:

cd /var/tmp
rm -rf /krb5 krb5-1.11
untgz /usr/local/src/crypto/krb5-1.11.tar.gz
cd krb5-1.11/src
./configure --prefix=/usr/local \
--with-ldap \
--with-system-db \
--with-tcl=/usr/local \
--with-pkinit-crypto-impl=openssl \
--with-readline
gmake
cd plugins/kdb/db2/libdb2; gmake
cd /var/tmp/krb5-1.11/src
gmake
gmake install

This gets it to compile which is good enough for me for now, sorry but
I'm time poor today. Hopefully you have a box to test this on.

ta,
Mark.

Happens on:
# uname -a
SunOS host1 5.10 Generic_142901-13 i86pc i386 i86pc
# cc -V
cc: Sun C 5.11 SunOS_i386 145355-01 2010/10/11
# gmake --version
GNU Make 3.82

# uname -a
SunOS host2 5.10 Generic_147440-15 sun4v sparc SUNW,T5240
# cc -V
cc: Sun C 5.11 SunOS_sparc 145354-01 2010/10/11
# gmake --version
GNU Make 3.82

# uname -a
SunOS host3 5.11 oi_151a5 i86pc i386 i86pc
# cc -V
cc: Sun C 5.11 SunOS_i386 2010/08/13
# gmake --version
GNU Make 3.82
Your build was configured with --with-system-db, so plugins/kdb/db2/libdb2
was not built, and <db.h> was taken from /usr/local/include or the system
include path. If that system header does not defined BTREEINFO or
HASHINFO, then the failure you observed is unsurprising. Those symbols
are a documented part of the BDB interface at least as of 4.2.
From: Mark Ashley <mark@ibiblio.org>
Date: Thu, 21 Feb 2013 14:51:55 +1100
Subject: Re: [krbdev.mit.edu #7572] krb5 1.11 doesn't build on Solaris w/ Sun Studio, the first time. A re-make works
To: rt-comment@krbdev.mit.edu, rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 3.6KiB
Hey Greg,

Thanks for the follow up. It appears that Oracle has deprecated
BTREEINFO in its latest BDB versions.

Digging into the krb5 install guide:

--with-system-db
Use an installed version of the Berkeley DB package, which must
provide an API compatible with version 1.85. This option is
unsupported and untested. In particular, we do not know if the
database-rename code used in the dumpfile load operation will behave
properly. If this option is not given, a version supplied with the
Kerberos sources will be built and installed. (We are not updating
this version at this time because of licensing issues with newer
versions that we haven't investigated sufficiently yet.)

So it looks like the configure script could be enhanced to first hunt
for <db_185.h> when --with-system-db is used.

These perl replacement lines result in a full clean compile with what
I assume is the expected results.

cd /var/tmp
rm -rf krb5-1.11
untgz /usr/local/src/crypto/krb5-1.11.tar.gz
cd krb5-1.11/src
./configure --prefix=/usr/local \
--with-ldap \
--with-system-db \
--with-tcl=/usr/local \
--with-pkinit-crypto-impl=openssl \
--with-readline
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/policy_db.h
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/adb_openclose.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/kdb_db2.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/db2_exp.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_hdb.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_marshal.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_windc.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./kadmin/testing/util/bsddb_dump.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./include/Makefile
gmake
gmake install

ta,
Mark.

My /usr/local/include/db.h:
#define DB_VERSION_STRING "Berkeley DB 4.8.30: (April 9, 2010)"

# grep BTREE /usr/local/include/*
/usr/local/include/db.h:struct __db_bt_stat; typedef struct
__db_bt_stat DB_BTREE_STAT;
/usr/local/include/db.h: DB_BTREE=1,
/usr/local/include/db.h:#define DB_BTREEVERSION 9 /*
Current btree version. */
/usr/local/include/db.h:#define DB_BTREEOLDVER 8 /*
Oldest btree version supported. */
/usr/local/include/db.h:#define DB_BTREEMAGIC 0x053162
/usr/local/include/db.h:#define DB_OK_BTREE 0x01
/usr/local/include/db_185.h:#define R_LAST 6
/* seq (BTREE, RECNO) */
/usr/local/include/db_185.h:#define R_PREV 9
/* seq (BTREE, RECNO) */
/usr/local/include/db_185.h:typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
/usr/local/include/db_185.h:#define BTREEMAGIC 0x053162
/usr/local/include/db_185.h:#define BTREEVERSION 3
/usr/local/include/db_185.h:} BTREEINFO;
/usr/local/include/kdb.h:#define KRB5_KDB_CREATE_BTREE 0x00000001
/usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREEOID \
/usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREE
"x-searchedSubtree"
/usr/local/include/ldap.h:#define LDAP_SCOPE_SUBTREE
((ber_int_t) 0x0002)
/usr/local/include/ldap.h:#define LDAP_SCOPE_SUB
LDAP_SCOPE_SUBTREE


On Wed, Feb 20, 2013 at 5:06 PM, Greg Hudson via RT
<rt-comment@krbdev.mit.edu> wrote:
Show quoted text
> Your build was configured with --with-system-db, so plugins/kdb/db2/libdb2
> was not built, and <db.h> was taken from /usr/local/include or the system
> include path. If that system header does not defined BTREEINFO or
> HASHINFO, then the failure you observed is unsurprising. Those symbols
> are a documented part of the BDB interface at least as of 4.2.
From: Mark Ashley <mark@ibiblio.org>
Date: Thu, 21 Feb 2013 14:51:55 +1100
Subject: Re: [krbdev.mit.edu #7572] krb5 1.11 doesn't build on Solaris w/ Sun Studio, the first time. A re-make works
To: rt-comment@krbdev.mit.edu, rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 3.6KiB
Hey Greg,

Thanks for the follow up. It appears that Oracle has deprecated
BTREEINFO in its latest BDB versions.

Digging into the krb5 install guide:

--with-system-db
Use an installed version of the Berkeley DB package, which must
provide an API compatible with version 1.85. This option is
unsupported and untested. In particular, we do not know if the
database-rename code used in the dumpfile load operation will behave
properly. If this option is not given, a version supplied with the
Kerberos sources will be built and installed. (We are not updating
this version at this time because of licensing issues with newer
versions that we haven't investigated sufficiently yet.)

So it looks like the configure script could be enhanced to first hunt
for <db_185.h> when --with-system-db is used.

These perl replacement lines result in a full clean compile with what
I assume is the expected results.

cd /var/tmp
rm -rf krb5-1.11
untgz /usr/local/src/crypto/krb5-1.11.tar.gz
cd krb5-1.11/src
./configure --prefix=/usr/local \
--with-ldap \
--with-system-db \
--with-tcl=/usr/local \
--with-pkinit-crypto-impl=openssl \
--with-readline
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/policy_db.h
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/adb_openclose.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/kdb_db2.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/db2_exp.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_hdb.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_marshal.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_windc.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./kadmin/testing/util/bsddb_dump.c
/bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./include/Makefile
gmake
gmake install

ta,
Mark.

My /usr/local/include/db.h:
#define DB_VERSION_STRING "Berkeley DB 4.8.30: (April 9, 2010)"

# grep BTREE /usr/local/include/*
/usr/local/include/db.h:struct __db_bt_stat; typedef struct
__db_bt_stat DB_BTREE_STAT;
/usr/local/include/db.h: DB_BTREE=1,
/usr/local/include/db.h:#define DB_BTREEVERSION 9 /*
Current btree version. */
/usr/local/include/db.h:#define DB_BTREEOLDVER 8 /*
Oldest btree version supported. */
/usr/local/include/db.h:#define DB_BTREEMAGIC 0x053162
/usr/local/include/db.h:#define DB_OK_BTREE 0x01
/usr/local/include/db_185.h:#define R_LAST 6
/* seq (BTREE, RECNO) */
/usr/local/include/db_185.h:#define R_PREV 9
/* seq (BTREE, RECNO) */
/usr/local/include/db_185.h:typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
/usr/local/include/db_185.h:#define BTREEMAGIC 0x053162
/usr/local/include/db_185.h:#define BTREEVERSION 3
/usr/local/include/db_185.h:} BTREEINFO;
/usr/local/include/kdb.h:#define KRB5_KDB_CREATE_BTREE 0x00000001
/usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREEOID \
/usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREE
"x-searchedSubtree"
/usr/local/include/ldap.h:#define LDAP_SCOPE_SUBTREE
((ber_int_t) 0x0002)
/usr/local/include/ldap.h:#define LDAP_SCOPE_SUB
LDAP_SCOPE_SUBTREE


On Wed, Feb 20, 2013 at 5:06 PM, Greg Hudson via RT
<rt-comment@krbdev.mit.edu> wrote:
Show quoted text
> Your build was configured with --with-system-db, so plugins/kdb/db2/libdb2
> was not built, and <db.h> was taken from /usr/local/include or the system
> include path. If that system header does not defined BTREEINFO or
> HASHINFO, then the failure you observed is unsurprising. Those symbols
> are a documented part of the BDB interface at least as of 4.2.
From: Mark Ashley <mark@ibiblio.org>
Date: Thu, 21 Feb 2013 15:06:42 +1100
Subject: Re: [krbdev.mit.edu #7572] krb5 1.11 doesn't build on Solaris w/ Sun Studio, the first time. A re-make works
To: rt-comment@krbdev.mit.edu, rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 4.2KiB
Or simply: (per TFM =) )

cd /var/tmp
rm -rf /krb5 krb5-1.11
mkdir /krb5
untgz /usr/local/src/crypto/krb5-1.11.tar.gz
cd krb5-1.11/src
setenv DB_HEADER db_185.h
./configure --prefix=/krb5 \
--with-ldap \
--with-system-db \
--with-tcl=/usr/local \
--with-pkinit-crypto-impl=openssl \
--with-readline
gmake
gmake install

This compiles fine as well.

ta,
Mark.


On Thu, Feb 21, 2013 at 2:51 PM, Mark Ashley <mark@ibiblio.org> wrote:
Show quoted text
> Hey Greg,
>
> Thanks for the follow up. It appears that Oracle has deprecated
> BTREEINFO in its latest BDB versions.
>
> Digging into the krb5 install guide:
>
> --with-system-db
> Use an installed version of the Berkeley DB package, which must
> provide an API compatible with version 1.85. This option is
> unsupported and untested. In particular, we do not know if the
> database-rename code used in the dumpfile load operation will behave
> properly. If this option is not given, a version supplied with the
> Kerberos sources will be built and installed. (We are not updating
> this version at this time because of licensing issues with newer
> versions that we haven't investigated sufficiently yet.)
>
> So it looks like the configure script could be enhanced to first hunt
> for <db_185.h> when --with-system-db is used.
>
> These perl replacement lines result in a full clean compile with what
> I assume is the expected results.
>
> cd /var/tmp
> rm -rf krb5-1.11
> untgz /usr/local/src/crypto/krb5-1.11.tar.gz
> cd krb5-1.11/src
> ./configure --prefix=/usr/local \
> --with-ldap \
> --with-system-db \
> --with-tcl=/usr/local \
> --with-pkinit-crypto-impl=openssl \
> --with-readline
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/policy_db.h
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/adb_openclose.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/kdb_db2.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/db2_exp.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_hdb.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_marshal.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_windc.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./kadmin/testing/util/bsddb_dump.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./include/Makefile
> gmake
> gmake install
>
> ta,
> Mark.
>
> My /usr/local/include/db.h:
> #define DB_VERSION_STRING "Berkeley DB 4.8.30: (April 9, 2010)"
>
> # grep BTREE /usr/local/include/*
> /usr/local/include/db.h:struct __db_bt_stat; typedef struct
> __db_bt_stat DB_BTREE_STAT;
> /usr/local/include/db.h: DB_BTREE=1,
> /usr/local/include/db.h:#define DB_BTREEVERSION 9 /*
> Current btree version. */
> /usr/local/include/db.h:#define DB_BTREEOLDVER 8 /*
> Oldest btree version supported. */
> /usr/local/include/db.h:#define DB_BTREEMAGIC 0x053162
> /usr/local/include/db.h:#define DB_OK_BTREE 0x01
> /usr/local/include/db_185.h:#define R_LAST 6
> /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:#define R_PREV 9
> /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
> /usr/local/include/db_185.h:#define BTREEMAGIC 0x053162
> /usr/local/include/db_185.h:#define BTREEVERSION 3
> /usr/local/include/db_185.h:} BTREEINFO;
> /usr/local/include/kdb.h:#define KRB5_KDB_CREATE_BTREE 0x00000001
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREEOID \
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREE
> "x-searchedSubtree"
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUBTREE
> ((ber_int_t) 0x0002)
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUB
> LDAP_SCOPE_SUBTREE
>
>
> On Wed, Feb 20, 2013 at 5:06 PM, Greg Hudson via RT
> <rt-comment@krbdev.mit.edu> wrote:
>> Your build was configured with --with-system-db, so plugins/kdb/db2/libdb2
>> was not built, and <db.h> was taken from /usr/local/include or the system
>> include path. If that system header does not defined BTREEINFO or
>> HASHINFO, then the failure you observed is unsurprising. Those symbols
>> are a documented part of the BDB interface at least as of 4.2.
From: Mark Ashley <mark@ibiblio.org>
Date: Thu, 21 Feb 2013 15:06:42 +1100
Subject: Re: [krbdev.mit.edu #7572] krb5 1.11 doesn't build on Solaris w/ Sun Studio, the first time. A re-make works
To: rt-comment@krbdev.mit.edu, rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 4.2KiB
Or simply: (per TFM =) )

cd /var/tmp
rm -rf /krb5 krb5-1.11
mkdir /krb5
untgz /usr/local/src/crypto/krb5-1.11.tar.gz
cd krb5-1.11/src
setenv DB_HEADER db_185.h
./configure --prefix=/krb5 \
--with-ldap \
--with-system-db \
--with-tcl=/usr/local \
--with-pkinit-crypto-impl=openssl \
--with-readline
gmake
gmake install

This compiles fine as well.

ta,
Mark.


On Thu, Feb 21, 2013 at 2:51 PM, Mark Ashley <mark@ibiblio.org> wrote:
Show quoted text
> Hey Greg,
>
> Thanks for the follow up. It appears that Oracle has deprecated
> BTREEINFO in its latest BDB versions.
>
> Digging into the krb5 install guide:
>
> --with-system-db
> Use an installed version of the Berkeley DB package, which must
> provide an API compatible with version 1.85. This option is
> unsupported and untested. In particular, we do not know if the
> database-rename code used in the dumpfile load operation will behave
> properly. If this option is not given, a version supplied with the
> Kerberos sources will be built and installed. (We are not updating
> this version at this time because of licensing issues with newer
> versions that we haven't investigated sufficiently yet.)
>
> So it looks like the configure script could be enhanced to first hunt
> for <db_185.h> when --with-system-db is used.
>
> These perl replacement lines result in a full clean compile with what
> I assume is the expected results.
>
> cd /var/tmp
> rm -rf krb5-1.11
> untgz /usr/local/src/crypto/krb5-1.11.tar.gz
> cd krb5-1.11/src
> ./configure --prefix=/usr/local \
> --with-ldap \
> --with-system-db \
> --with-tcl=/usr/local \
> --with-pkinit-crypto-impl=openssl \
> --with-readline
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/policy_db.h
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/adb_openclose.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/kdb_db2.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/db2_exp.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_hdb.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_marshal.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_windc.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./kadmin/testing/util/bsddb_dump.c
> /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./include/Makefile
> gmake
> gmake install
>
> ta,
> Mark.
>
> My /usr/local/include/db.h:
> #define DB_VERSION_STRING "Berkeley DB 4.8.30: (April 9, 2010)"
>
> # grep BTREE /usr/local/include/*
> /usr/local/include/db.h:struct __db_bt_stat; typedef struct
> __db_bt_stat DB_BTREE_STAT;
> /usr/local/include/db.h: DB_BTREE=1,
> /usr/local/include/db.h:#define DB_BTREEVERSION 9 /*
> Current btree version. */
> /usr/local/include/db.h:#define DB_BTREEOLDVER 8 /*
> Oldest btree version supported. */
> /usr/local/include/db.h:#define DB_BTREEMAGIC 0x053162
> /usr/local/include/db.h:#define DB_OK_BTREE 0x01
> /usr/local/include/db_185.h:#define R_LAST 6
> /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:#define R_PREV 9
> /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
> /usr/local/include/db_185.h:#define BTREEMAGIC 0x053162
> /usr/local/include/db_185.h:#define BTREEVERSION 3
> /usr/local/include/db_185.h:} BTREEINFO;
> /usr/local/include/kdb.h:#define KRB5_KDB_CREATE_BTREE 0x00000001
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREEOID \
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREE
> "x-searchedSubtree"
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUBTREE
> ((ber_int_t) 0x0002)
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUB
> LDAP_SCOPE_SUBTREE
>
>
> On Wed, Feb 20, 2013 at 5:06 PM, Greg Hudson via RT
> <rt-comment@krbdev.mit.edu> wrote:
>> Your build was configured with --with-system-db, so plugins/kdb/db2/libdb2
>> was not built, and <db.h> was taken from /usr/local/include or the system
>> include path. If that system header does not defined BTREEINFO or
>> HASHINFO, then the failure you observed is unsurprising. Those symbols
>> are a documented part of the BDB interface at least as of 4.2.
Closing because documentation describes how to deal with the problem.
From: Mark Ashley <mark@ibiblio.org>
Date: Mon, 27 May 2013 16:58:12 +1000
Subject: Re: [krbdev.mit.edu #7572] krb5 1.11 doesn't build on Solaris w/ Sun Studio, the first time. A re-make works
To: rt-comment@krbdev.mit.edu, rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 6.1KiB

Following up, given the amount of new changes required...

To compile 1.11.2 on Solaris with Sun Studio 12.3 compiler:


    setenv CC "cc"
    setenv CXX "CC"
    setenv CC "cc -xtarget=ultra -m64 -xcode=pic32"
    setenv CXX "CC -xtarget=ultra -m64 -xcode=pic32"

    setenv LD_RUN_PATH "/usr/local/lib:/lib:/usr/lib"
    setenv LD_RUN_PATH "/usr/local/lib:/lib/64:/usr/lib/64:/lib:/usr/lib"

    setenv LDFLAGS "-I/usr/local/include -R/usr/local/lib -L/usr/local/lib -lintl"
    setenv CFLAGS "-I/usr/local/include -R/usr/local/lib -L/usr/local/lib"
    setenv CPPFLAGS "-I/usr/local/include -R/usr/local/lib -L/usr/local/lib"

    cd /var/tmp
    rm -rf /krb5 krb5-1.11.2
    untgz /usr/local/src/crypto/krb5-1.11.2.tar.gz
    cd krb5-1.11.2/src
    setenv DB_LIB "-L/usr/local/lib -ldb-4"
    setenv DB_HEADER db_185.h
    setenv CFLAGS "-DUSE_INTERP_RESULT"
    setenv LDAP_LIBS "-L/usr/local/lib -lldap -llber"
    /bin/perl -pe 's%^DB_LIB\s+=%DB_LIB=\@DB_LIB\@%' -i plugins/kdb/db2/Makefile.in
    /bin/perl -pe 's%^KDB5_DB_LIB\s+=%KDB5_DB_LIB=\@KDB5_DB_LIB\@%' -i plugins/kdb/db2/Makefile.in
    /bin/perl -pe 's%LDAP_LIBS=%LDAP_LIBS="-L/usr/local/lib -lldap -llber "%' -i configure
    /bin/perl -pe 's%"-lcrypto%"-L/usr/local/lib -lcrypto %' -i configure
    /bin/perl -pe 's%=-lcrypto%="-L/usr/local/lib -lcrypto" %' -i configure
    ./configure --prefix=/usr/local \
        --with-ldap \
        --with-system-db \
        --with-tcl=/usr/local \
        --with-pkinit-crypto-impl=openssl \
        --with-readline
    gmake
    gmake install

ta,
Mark.
http://www.ibiblio.org/pub/packages/solaris/sparc/




On Thu, Feb 21, 2013 at 3:06 PM, Mark Ashley <mark@ibiblio.org> wrote:
Show quoted text
Or simply: (per TFM =) )

    cd /var/tmp
    rm -rf /krb5 krb5-1.11
    mkdir /krb5
    untgz /usr/local/src/crypto/krb5-1.11.tar.gz
    cd krb5-1.11/src
    setenv DB_HEADER db_185.h
    ./configure --prefix=/krb5 \
        --with-ldap \
        --with-system-db \
        --with-tcl=/usr/local \
        --with-pkinit-crypto-impl=openssl \
        --with-readline
    gmake
    gmake install

This compiles fine as well.

ta,
Mark.


On Thu, Feb 21, 2013 at 2:51 PM, Mark Ashley <mark@ibiblio.org> wrote:
> Hey Greg,
>
> Thanks for the follow up. It appears that Oracle has deprecated
> BTREEINFO in its latest BDB versions.
>
> Digging into the krb5 install guide:
>
> --with-system-db
> Use an installed version of the Berkeley DB package, which must
> provide an API compatible with version 1.85. This option is
> unsupported and untested. In particular, we do not know if the
> database-rename code used in the dumpfile load operation will behave
> properly. If this option is not given, a version supplied with the
> Kerberos sources will be built and installed. (We are not updating
> this version at this time because of licensing issues with newer
> versions that we haven't investigated sufficiently yet.)
>
> So it looks like the configure script could be enhanced to first hunt
> for <db_185.h> when --with-system-db is used.
>
> These perl replacement lines result in a full clean compile with what
> I assume is the expected results.
>
>     cd /var/tmp
>     rm -rf krb5-1.11
>     untgz /usr/local/src/crypto/krb5-1.11.tar.gz
>     cd krb5-1.11/src
>     ./configure --prefix=/usr/local \
>         --with-ldap \
>         --with-system-db \
>         --with-tcl=/usr/local \
>         --with-pkinit-crypto-impl=openssl \
>         --with-readline
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/policy_db.h
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/adb_openclose.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/kdb_db2.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/db2_exp.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_hdb.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_marshal.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_windc.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./kadmin/testing/util/bsddb_dump.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./include/Makefile
>     gmake
>     gmake install
>
> ta,
> Mark.
>
> My /usr/local/include/db.h:
> #define DB_VERSION_STRING       "Berkeley DB 4.8.30: (April  9, 2010)"
>
> # grep BTREE /usr/local/include/*
> /usr/local/include/db.h:struct __db_bt_stat;    typedef struct
> __db_bt_stat DB_BTREE_STAT;
> /usr/local/include/db.h:        DB_BTREE=1,
> /usr/local/include/db.h:#define DB_BTREEVERSION 9               /*
> Current btree version. */
> /usr/local/include/db.h:#define DB_BTREEOLDVER  8               /*
> Oldest btree version supported. */
> /usr/local/include/db.h:#define DB_BTREEMAGIC   0x053162
> /usr/local/include/db.h:#define DB_OK_BTREE     0x01
> /usr/local/include/db_185.h:#define     R_LAST          6
>  /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:#define     R_PREV          9
>  /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
> /usr/local/include/db_185.h:#define     BTREEMAGIC      0x053162
> /usr/local/include/db_185.h:#define     BTREEVERSION    3
> /usr/local/include/db_185.h:} BTREEINFO;
> /usr/local/include/kdb.h:#define KRB5_KDB_CREATE_BTREE           0x00000001
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREEOID \
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREE
> "x-searchedSubtree"
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUBTREE
> ((ber_int_t) 0x0002)
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUB
>  LDAP_SCOPE_SUBTREE
>
>
> On Wed, Feb 20, 2013 at 5:06 PM, Greg Hudson via RT
> <rt-comment@krbdev.mit.edu> wrote:
>> Your build was configured with --with-system-db, so plugins/kdb/db2/libdb2
>> was not built, and <db.h> was taken from /usr/local/include or the system
>> include path.  If that system header does not defined BTREEINFO or
>> HASHINFO, then the failure you observed is unsurprising.  Those symbols
>> are a documented part of the BDB interface at least as of 4.2.

From: Mark Ashley <mark@ibiblio.org>
Date: Mon, 27 May 2013 16:58:12 +1000
Subject: Re: [krbdev.mit.edu #7572] krb5 1.11 doesn't build on Solaris w/ Sun Studio, the first time. A re-make works
To: rt-comment@krbdev.mit.edu, rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 6.1KiB

Following up, given the amount of new changes required...

To compile 1.11.2 on Solaris with Sun Studio 12.3 compiler:


    setenv CC "cc"
    setenv CXX "CC"
    setenv CC "cc -xtarget=ultra -m64 -xcode=pic32"
    setenv CXX "CC -xtarget=ultra -m64 -xcode=pic32"

    setenv LD_RUN_PATH "/usr/local/lib:/lib:/usr/lib"
    setenv LD_RUN_PATH "/usr/local/lib:/lib/64:/usr/lib/64:/lib:/usr/lib"

    setenv LDFLAGS "-I/usr/local/include -R/usr/local/lib -L/usr/local/lib -lintl"
    setenv CFLAGS "-I/usr/local/include -R/usr/local/lib -L/usr/local/lib"
    setenv CPPFLAGS "-I/usr/local/include -R/usr/local/lib -L/usr/local/lib"

    cd /var/tmp
    rm -rf /krb5 krb5-1.11.2
    untgz /usr/local/src/crypto/krb5-1.11.2.tar.gz
    cd krb5-1.11.2/src
    setenv DB_LIB "-L/usr/local/lib -ldb-4"
    setenv DB_HEADER db_185.h
    setenv CFLAGS "-DUSE_INTERP_RESULT"
    setenv LDAP_LIBS "-L/usr/local/lib -lldap -llber"
    /bin/perl -pe 's%^DB_LIB\s+=%DB_LIB=\@DB_LIB\@%' -i plugins/kdb/db2/Makefile.in
    /bin/perl -pe 's%^KDB5_DB_LIB\s+=%KDB5_DB_LIB=\@KDB5_DB_LIB\@%' -i plugins/kdb/db2/Makefile.in
    /bin/perl -pe 's%LDAP_LIBS=%LDAP_LIBS="-L/usr/local/lib -lldap -llber "%' -i configure
    /bin/perl -pe 's%"-lcrypto%"-L/usr/local/lib -lcrypto %' -i configure
    /bin/perl -pe 's%=-lcrypto%="-L/usr/local/lib -lcrypto" %' -i configure
    ./configure --prefix=/usr/local \
        --with-ldap \
        --with-system-db \
        --with-tcl=/usr/local \
        --with-pkinit-crypto-impl=openssl \
        --with-readline
    gmake
    gmake install

ta,
Mark.
http://www.ibiblio.org/pub/packages/solaris/sparc/




On Thu, Feb 21, 2013 at 3:06 PM, Mark Ashley <mark@ibiblio.org> wrote:
Show quoted text
Or simply: (per TFM =) )

    cd /var/tmp
    rm -rf /krb5 krb5-1.11
    mkdir /krb5
    untgz /usr/local/src/crypto/krb5-1.11.tar.gz
    cd krb5-1.11/src
    setenv DB_HEADER db_185.h
    ./configure --prefix=/krb5 \
        --with-ldap \
        --with-system-db \
        --with-tcl=/usr/local \
        --with-pkinit-crypto-impl=openssl \
        --with-readline
    gmake
    gmake install

This compiles fine as well.

ta,
Mark.


On Thu, Feb 21, 2013 at 2:51 PM, Mark Ashley <mark@ibiblio.org> wrote:
> Hey Greg,
>
> Thanks for the follow up. It appears that Oracle has deprecated
> BTREEINFO in its latest BDB versions.
>
> Digging into the krb5 install guide:
>
> --with-system-db
> Use an installed version of the Berkeley DB package, which must
> provide an API compatible with version 1.85. This option is
> unsupported and untested. In particular, we do not know if the
> database-rename code used in the dumpfile load operation will behave
> properly. If this option is not given, a version supplied with the
> Kerberos sources will be built and installed. (We are not updating
> this version at this time because of licensing issues with newer
> versions that we haven't investigated sufficiently yet.)
>
> So it looks like the configure script could be enhanced to first hunt
> for <db_185.h> when --with-system-db is used.
>
> These perl replacement lines result in a full clean compile with what
> I assume is the expected results.
>
>     cd /var/tmp
>     rm -rf krb5-1.11
>     untgz /usr/local/src/crypto/krb5-1.11.tar.gz
>     cd krb5-1.11/src
>     ./configure --prefix=/usr/local \
>         --with-ldap \
>         --with-system-db \
>         --with-tcl=/usr/local \
>         --with-pkinit-crypto-impl=openssl \
>         --with-readline
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/policy_db.h
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/adb_openclose.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/kdb_db2.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/db2/db2_exp.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_hdb.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_marshal.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./plugins/kdb/hdb/kdb_windc.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./kadmin/testing/util/bsddb_dump.c
>     /bin/perl -pe 's%<db.h>%<db_185.h>%' -i ./include/Makefile
>     gmake
>     gmake install
>
> ta,
> Mark.
>
> My /usr/local/include/db.h:
> #define DB_VERSION_STRING       "Berkeley DB 4.8.30: (April  9, 2010)"
>
> # grep BTREE /usr/local/include/*
> /usr/local/include/db.h:struct __db_bt_stat;    typedef struct
> __db_bt_stat DB_BTREE_STAT;
> /usr/local/include/db.h:        DB_BTREE=1,
> /usr/local/include/db.h:#define DB_BTREEVERSION 9               /*
> Current btree version. */
> /usr/local/include/db.h:#define DB_BTREEOLDVER  8               /*
> Oldest btree version supported. */
> /usr/local/include/db.h:#define DB_BTREEMAGIC   0x053162
> /usr/local/include/db.h:#define DB_OK_BTREE     0x01
> /usr/local/include/db_185.h:#define     R_LAST          6
>  /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:#define     R_PREV          9
>  /* seq (BTREE, RECNO) */
> /usr/local/include/db_185.h:typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
> /usr/local/include/db_185.h:#define     BTREEMAGIC      0x053162
> /usr/local/include/db_185.h:#define     BTREEVERSION    3
> /usr/local/include/db_185.h:} BTREEINFO;
> /usr/local/include/kdb.h:#define KRB5_KDB_CREATE_BTREE           0x00000001
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREEOID \
> /usr/local/include/ldap.h:#define LDAP_URLEXT_X_SEARCHEDSUBTREE
> "x-searchedSubtree"
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUBTREE
> ((ber_int_t) 0x0002)
> /usr/local/include/ldap.h:#define LDAP_SCOPE_SUB
>  LDAP_SCOPE_SUBTREE
>
>
> On Wed, Feb 20, 2013 at 5:06 PM, Greg Hudson via RT
> <rt-comment@krbdev.mit.edu> wrote:
>> Your build was configured with --with-system-db, so plugins/kdb/db2/libdb2
>> was not built, and <db.h> was taken from /usr/local/include or the system
>> include path.  If that system header does not defined BTREEINFO or
>> HASHINFO, then the failure you observed is unsurprising.  Those symbols
>> are a documented part of the BDB interface at least as of 4.2.