Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

5 views
Skip to first unread message

zhangzq71

unread,
Oct 14, 2005, 11:38:32 AM10/14/05
to
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::open: Function not implemented


Regards,
ZhangZQ

michael...@gmail.com

unread,
Oct 17, 2005, 5:10:08 PM10/17/05
to
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.

zhangzq71

unread,
Oct 19, 2005, 1:30:54 AM10/19/05
to
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

0 new messages