Send inn-workers mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."


Today's Topics:

   1. undefined reference to  `__db_ndbm_open' (The Doctor)
   2. Re: undefined reference to  `__db_ndbm_open' (Julien ?LIE)
   3. Re: undefined reference to  `__db_ndbm_open' (The Doctor)


----------------------------------------------------------------------

Message: 1
Date: Fri, 2 Aug 2013 07:37:42 -0600
From: The Doctor <[email protected]>
To: [email protected]
Subject: undefined reference to  `__db_ndbm_open'
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

All right

This morning from inn-CURRENT-20130802

I got

ckpasswd.o: In function `password_dbm':
/usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:170: undefined reference 
to `__db_ndbm_open'
/usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:175: undefined reference 
to `__db_ndbm_fetch'
/usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:177: undefined reference 
to `__db_ndbm_close'
/usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:182: undefined reference 
to `__db_ndbm_close' 

Code in question

#if !(defined(HAVE_DBM) || defined(HAVE_BDB_DBM))
static char *
password_dbm(char *user UNUSED, const char *file UNUSED)
{
    return NULL;
}
#else
static char *
password_dbm(char *name, const char *file)
{
    datum key, value;
    DBM *database;
    char *password;

    database = dbm_open(file, O_RDONLY, 0600);
    if (database == NULL)
        return NULL;
    key.dptr = name;
    key.dsize = strlen(name);
    value = dbm_fetch(database, key);
    if (value.dptr == NULL) {
        dbm_close(database);
        return NULL;
    }
    password = xmalloc(value.dsize + 1);
    strlcpy(password, value.dptr, value.dsize + 1);
    dbm_close(database);
    return password;
}
#endif /* HAVE_DBM || HAVE_BDB_DBM */

I am running Berkerley 5.3 on this system.

Please look into this.
                                            
-- 
Member - Liberal International  This is [email protected] Ici [email protected]
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising! 
http://www.fullyfollow.me/rootnl2k  Look at Psalms 14 and 53 on Atheism
The false churches will conform themselves to this world's demands, seeing as 
they do not fear and thus do not obey God. - anon


------------------------------

Message: 2
Date: Fri, 02 Aug 2013 16:49:27 +0200
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: undefined reference to  `__db_ndbm_open'
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
        format="flowed"

Hi The Doctor,

> This morning from inn-CURRENT-20130802
>
> I got
>
> ckpasswd.o: In function `password_dbm':
> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:170: undefined  
> reference to `__db_ndbm_open'
> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:175: undefined  
> reference to `__db_ndbm_fetch'
> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:177: undefined  
> reference to `__db_ndbm_close'
> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:182: undefined  
> reference to `__db_ndbm_close'

Thanks for the report!
I indeed changed the order of inclusion of DBM headers yesterday.

Could you please tell me the answer of:
   grep DBM config.h
in the include directory?


On the system where I tried to fix a bug, I had:

#define HAVE_BDB_DBM 1
/* #undef HAVE_DB1_NDBM_H */
/* #undef HAVE_DBM */
/* #undef HAVE_GDBM_NDBM_H */
#define HAVE_NDBM_H 1

and similar errors as those you are currently seeing:

/home/iulius/autobuild/inn/authprogs/ckpasswd.c:165: undefined  
reference to `dbm_open'
[...]




I changed:

#if defined(HAVE_DBM) || defined(HAVE_BDB_DBM)
# if HAVE_NDBM_H
#  include <ndbm.h>
# elif HAVE_BDB_DBM
#  define DB_DBM_HSEARCH 1
#  include <db.h>
# elif HAVE_GDBM_NDBM_H
#  include <gdbm-ndbm.h>
# elif HAVE_DB1_NDBM_H
#  include <db1/ndbm.h>
# endif
# define OPT_DBM "d:"
#else
# define OPT_DBM ""
#endif

to:

#if defined(HAVE_DBM) || defined(HAVE_BDB_DBM)
# if HAVE_BDB_DBM
#  define DB_DBM_HSEARCH 1
#  include <db.h>
# elif HAVE_NDBM_H
#  include <ndbm.h>
# elif HAVE_GDBM_NDBM_H
#  include <gdbm-ndbm.h>
# elif HAVE_DB1_NDBM_H
#  include <db1/ndbm.h>
# endif
# define OPT_DBM "d:"
#else
# define OPT_DBM ""
#endif




It looks as though it should be changed to something else, separating  
the initial check for defined(HAVE_DBM) and defined(HAVE_BDB_DBM).

-- 
Julien



------------------------------

Message: 3
Date: Fri, 2 Aug 2013 09:17:20 -0600
From: The Doctor <[email protected]>
To: Julien ?LIE <[email protected]>
Cc: [email protected]
Subject: Re: undefined reference to  `__db_ndbm_open'
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1

On Fri, Aug 02, 2013 at 04:49:27PM +0200, Julien ?LIE wrote:
> Hi The Doctor,
>
>> This morning from inn-CURRENT-20130802
>>
>> I got
>>
>> ckpasswd.o: In function `password_dbm':
>> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:170: undefined  
>> reference to `__db_ndbm_open'
>> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:175: undefined  
>> reference to `__db_ndbm_fetch'
>> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:177: undefined  
>> reference to `__db_ndbm_close'
>> /usr/source/inn-CURRENT-20130802/authprogs/ckpasswd.c:182: undefined  
>> reference to `__db_ndbm_close'
>
> Thanks for the report!
> I indeed changed the order of inclusion of DBM headers yesterday.
>
> Could you please tell me the answer of:
>   grep DBM config.h
> in the include directory?
>
>
> On the system where I tried to fix a bug, I had:
>
> #define HAVE_BDB_DBM 1
> /* #undef HAVE_DB1_NDBM_H */
> /* #undef HAVE_DBM */
> /* #undef HAVE_GDBM_NDBM_H */
> #define HAVE_NDBM_H 1
>
> and similar errors as those you are currently seeing:
>
> /home/iulius/autobuild/inn/authprogs/ckpasswd.c:165: undefined reference 
> to `dbm_open'
> [...]
>
>
>
>
> I changed:
>
> #if defined(HAVE_DBM) || defined(HAVE_BDB_DBM)
> # if HAVE_NDBM_H
> #  include <ndbm.h>
> # elif HAVE_BDB_DBM
> #  define DB_DBM_HSEARCH 1
> #  include <db.h>
> # elif HAVE_GDBM_NDBM_H
> #  include <gdbm-ndbm.h>
> # elif HAVE_DB1_NDBM_H
> #  include <db1/ndbm.h>
> # endif
> # define OPT_DBM "d:"
> #else
> # define OPT_DBM ""
> #endif
>
> to:
>
> #if defined(HAVE_DBM) || defined(HAVE_BDB_DBM)
> # if HAVE_BDB_DBM
> #  define DB_DBM_HSEARCH 1
> #  include <db.h>
> # elif HAVE_NDBM_H
> #  include <ndbm.h>
> # elif HAVE_GDBM_NDBM_H
> #  include <gdbm-ndbm.h>
> # elif HAVE_DB1_NDBM_H
> #  include <db1/ndbm.h>
> # endif
> # define OPT_DBM "d:"
> #else
> # define OPT_DBM ""
> #endif
>


#define HAVE_BDB_DBM 1
/* #undef HAVE_DB1_NDBM_H */
/* #undef HAVE_DBM */
/* #undef HAVE_GDBM_NDBM_H */
#define HAVE_NDBM_H 1  

The above might work

>
>
>
> It looks as though it should be changed to something else, separating  
> the initial check for defined(HAVE_DBM) and defined(HAVE_BDB_DBM).
>
> -- 
> Julien
>

-- 
Member - Liberal International  This is [email protected] Ici [email protected]
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising! 
http://www.fullyfollow.me/rootnl2k  Look at Psalms 14 and 53 on Atheism
The false churches will conform themselves to this world's demands, seeing as 
they do not fear and thus do not obey God. - anon


------------------------------

_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers

End of inn-workers Digest, Vol 54, Issue 2
******************************************

Reply via email to