dbTalk Databases Forums  

Some problem in porting db-4.3.27.NC to S3C2410 (ARM920T) CPU

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


Discuss Some problem in porting db-4.3.27.NC to S3C2410 (ARM920T) CPU in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zhangzq71
 
Posts: n/a

Default Some problem in porting db-4.3.27.NC to S3C2410 (ARM920T) CPU - 10-14-2005 , 10:38 AM






I tried to port db-4.3.27.NC to S3C2410 using the cross-compiler
toolchain, arm-linux-gcc 3.4.1, the glibc is 2.3.5.

There is no problem in porting, but there is some problem in DbEnv

here is the code from BerkeleyDB documentation,

DbEnv myEnv(0);
try {
myEnv.open(envHome.c_str(), env_flags, 0);
} catch(DbException &e) {
std::cerr << "Error opening database environment: " << envHome <<
std::endl;
std::cerr << e.what() << std::endl;
exit( -1 );
} catch(std::exception &e) {
std::cerr << "Error opening database environment: " << envHome <<
std::endl;
std::cerr << e.what() << std::endl;
exit( -1 );
}

I compiled the above code and make it runs in my S3C2410 board, but got
the following error, do you know what is the problem?

Error opening database environment: ./testEnv
DbEnv:pen: Function not implemented


Regards,
ZhangZQ


Reply With Quote
  #2  
Old   
michael.cahill@gmail.com
 
Posts: n/a

Default Re: Some problem in porting db-4.3.27.NC to S3C2410 (ARM920T) CPU - 10-17-2005 , 04:10 PM






Hi,

The first thing to do is to set up the Berkeley DB error stream:

myEnv.set_error_stream(&std::cerr);

That should give you more information about what is failing.

My hunch is that you have configured Berkeley DB to use POSIX mutexes
but that this system does not support having POSIX mutexes shared
between processes. If that is the issue, adding DB_PRIVATE to
env_flags should allow you to open an environment. However, if you
need to have multiple processes sharing data, you'll need to find an
appropriate mutex implementation. Berkeley DB has a "ARM/gcc-assembly"
mutexes, which should do what you need in that case.

Regards,
Michael.


Reply With Quote
  #3  
Old   
zhangzq71
 
Posts: n/a

Default Re: Some problem in porting db-4.3.27.NC to S3C2410 (ARM920T) CPU - 10-19-2005 , 12:30 AM



Michael,

Thank you very much! That is the problem, now I rebuild the Berkeley DB
by
"configure --enable-cxx -with-mutex=ARM/gcc-assembly --host=arm-linux"
to fixed that problem!


Regards,
ZhangZQ


michael.cahill (AT) gmail (DOT) com wrote:
Quote:
Hi,

The first thing to do is to set up the Berkeley DB error stream:

myEnv.set_error_stream(&std::cerr);

That should give you more information about what is failing.

My hunch is that you have configured Berkeley DB to use POSIX mutexes
but that this system does not support having POSIX mutexes shared
between processes. If that is the issue, adding DB_PRIVATE to
env_flags should allow you to open an environment. However, if you
need to have multiple processes sharing data, you'll need to find an
appropriate mutex implementation. Berkeley DB has a "ARM/gcc-assembly"
mutexes, which should do what you need in that case.

Regards,
Michael.


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.