dbTalk Databases Forums  

DB open fails with error Function not implemented

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss DB open fails with error Function not implemented in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
meenal_binwade@rediffmail.com
 
Posts: n/a

Default DB open fails with error Function not implemented - 01-20-2006 , 03:10 AM






I have complied a small program :

int main()
{
DB *dbp; /* DB structure handle */
u_int32_t flags; /* database open flags */
int ret; /* function return value */

ret = db_create(&dbp, NULL, 0);
if (ret != 0) {
fprintf(stderr,"BDB create error %s\n",db_strerror(ret));
}

flags = DB_CREATE | DB_THREAD |DB_TRUNCATE;
ret = dbp->open(dbp, NULL, "/var/vx/isis/swap/gridnode.__objectdb__",
NULL, DB_HASH, flags, 0700);

if (ret != 0) {
/* Error handling goes here */
fprintf(stderr,"BDB open error %s\n",db_strerror(ret));
}

return 0;
}


I compiled it using gcc version 3.2.3 20030502 ((Red Hat Linux
3.2.3-34)) on a i686 machine which has the following configuration:

Linux x3th2 2.4.21-15.EL #1 Thu Apr 22 00:27:41 EDT 2004 i686 i686 i386
GNU/Linux

It runs fine when i execute it on this machine.When i try to run it on
a AMD x86_64 redhat machine DB open is failing with the following
error:

Function not implemented

The configuration of the redhat machine where i am running it is :
Linux xtest 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64
x86_64 x86_64 GNU/Linux

Please help.


Reply With Quote
  #2  
Old   
Michael Cahill
 
Posts: n/a

Default Re: DB open fails with error Function not implemented - 01-20-2006 , 05:07 AM






Try checking for error output, with:

dbp->set_errfile(dbp, stderr);

before the DB->open call.

Also check this FAQ entry:

http://dev.sleepycat.com/resources/faq_show.html?id=96

Regards,
Michael.


Reply With Quote
  #3  
Old   
meenal_binwade@rediffmail.com
 
Posts: n/a

Default Re: DB open fails with error Function not implemented - 01-20-2006 , 05:37 AM




Michael Cahill wrote:
Quote:
Try checking for error output, with:

dbp->set_errfile(dbp, stderr);

before the DB->open call.

Also check this FAQ entry:

http://dev.sleepycat.com/resources/faq_show.html?id=96

Regards,
Michael.
Thanks Michael .
The error is now getting printed as :

unable to initialize mutex: Function not implemented
process-private: unable to initialize environment lock: Function not
implemented

What could be done to fix this?

I see that if i compile my program on this machine(x86_64) and then
everything works fine.
but the same problem compiled on i686 gives me the above errors



Reply With Quote
  #4  
Old   
meenal_binwade@rediffmail.com
 
Posts: n/a

Default Re: DB open fails with error Function not implemented - 01-20-2006 , 07:26 AM



got the problem !!

The machine had LD_ASSUME_KERNEL set to 2.4.19.This was causing the
program to pick up older versions of libpthread. which possibly did not
support pthread mutexes.
After i unset it things worked fine.

Thanks for the help


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.