undefined reference to `__db_ndbm_open'

The Doctor doctor at doctor.nl2k.ab.ca
Fri Aug 2 15:17:20 UTC 2013


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 doctor at nl2k.ab.ca Ici doctor at nl2k.ab.ca
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


More information about the inn-workers mailing list