berkeleydb 5.X compilation with cyrus-sasl

Brett @Google brett.maxfield at gmail.com
Wed Jul 13 22:30:58 EDT 2011


Hello,
I'm compiling on solaris : SunOS 5.10 Generic_144488-06 sun4v sparc
SUNW,Sun-Blade-T6320

Using the sun studio 12.2 compiler, in 64 bit mode.

Compilation of 2.2.24RC1 (and presumable all previous releases) against bdb
5.2 fails, with the following :
cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include
-I/usr/local/server-libs/include -m64 -xtarget=ultraT2 -O3
-I/usr/local/openldap/include -I/usr/local/server-libs/include
-I/usr/local/server-libs/include -I/usr/local/server-libs/include
-I/usr/local/openldap/include -g -c db_berkeley.c  -KPIC -DPIC -o
db_berkeley.lo

"db_berkeley.c", line 107: warning: argument #2 is incompatible with
prototype:

        prototype: pointer to struct __db_txn {pointer to struct __db_txnmgr
{..} mgrp, pointer to struct __db_txn {..} parent, pointer to struct
__db_thread_info {..} thread_info, unsigned int txnid, pointer to char name,
pointer to struct __db_locker {..} locker, pointer to void td, unsigned int
lock_timeout, pointer to void txn_list, struct  {..} links, struct  {..}
xa_links, struct __kids {..} kids, struct  {..} events, struct  {..} logs,
struct  {..} klinks, struct __my_cursors {..} my_cursors, struct __femfs
{..} femfs, pointer to struct __db_txn_token {..} token_buffer, pointer to
void api_internal, pointer to void xml_internal, unsigned int cursors,
pointer to function(pointer to struct __db_txn {..}) returning int abort,
pointer to function(pointer to struct __db_txn {..}, unsigned int) returning
int commit, pointer to function(pointer to struct __db_txn {..}, unsigned
int) returning int discard, pointer to function(pointer to struct __db_txn
{..}, pointer to pointer to const char) returning int get_name, pointer to
function(pointer to struct __db_txn {..}, pointer to unsigned int) returning
int get_priority, pointer to function(pointer to struct __db_txn {..})
returning unsigned int id, pointer to function(pointer to struct __db_txn
{..}, pointer to unsigned char) returning int prepare, pointer to
function(pointer to struct __db_txn {..}, pointer to struct __db_txn_token
{..}) returning int set_commit_token, pointer to function(pointer to struct
__db_txn {..}, pointer to const char) returning int set_name, pointer to
function(pointer to struct __db_txn {..}, unsigned int) returning int
set_priority, pointer to function(pointer to struct __db_txn {..}, unsigned
int, unsigned int) returning int set_timeout, pointer to function(pointer to
struct __db_txn {..}, pointer to pointer to struct __db_lsn {..}, pointer to
pointer to struct __db_lsn {..}) returning void set_txn_lsnp, unsigned int
xa_thr_status, unsigned int flags} : "unknown", line 0

        argument : pointer to const char

"db_berkeley.c", line 107: warning: improper pointer/integer combination:
arg #4

"db_berkeley.c", line 107: prototype mismatch: 6 args passed, 7 expected

"db_berkeley.c", line 448: warning:  attribute "unused" is unknown, ignored

cc: acomp failed for db_berkeley.c

gmake[2]: *** [db_berkeley.lo] Error 1

gmake[2]: Leaving directory `/home/govops/build/cyrus-sasl-2.1.24/sasldb'

gmake[1]: *** [all-recursive] Error 1

gmake[1]: Leaving directory `/home/govops/build/cyrus-sasl-2.1.24'

gmake: *** [all] Error 2

The compilation fix for berkeley db 5.x is :

diff -r cyrus-sasl-2.1.24/plugins/ldapdb.c
cyrus-sasl-2.1.24_db5x/plugins/ldapdb.c
252c252
<       case LDAP_PROXY_AUTHZ_FAILURE:
---
>       case LDAP_X_PROXY_AUTHZ_FAILURE:

diff -r cyrus-sasl-2.1.24/sasldb/db_berkeley.c
cyrus-sasl-2.1.24_db5x/sasldb/db_berkeley.c
104c104
< #if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
---
> #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1

diff -r cyrus-sasl-2.1.24/plugins/ldapdb.c
cyrus-sasl-2.1.24_db5x/plugins/ldapdb
.c
252c252
<       case LDAP_PROXY_AUTHZ_FAILURE:
---
>       case LDAP_X_PROXY_AUTHZ_FAILURE:

I'd imagine the last difference should be conditional in configure etc., as
some platforms use LDAP_PROXY_AUTHZ_FAILURE and others (newer ? ones) use
LDAP_X_PROXY_AUTHZ_FAILURE, depending on the vintage of thier ldap library.

Above compiles OK for me, still with some integer/pointer warnings but the
sun cc is a bit noisy.

Cheers
Brett

-- 
*The only thing that interferes with my learning is my education.*
*
Albert Einstein*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/attachments/20110714/816f4b04/attachment.html 


More information about the Cyrus-sasl mailing list