Errors on porting berkeley db to vxworks 6.3 -
11-17-2007
, 07:49 AM
I use WorkBench 2.5, VxWorks 6.3 on Windows XP sp2. There are some
errors when porting berkeley db 4.5.20.
There are some Tornado project files in the berkeley db source code. I
use db-4.5.20\build_vxworks\BerkeleyDB22.wpj to import the project to
WorkBench 2.5. Some changes are made while compling the source code.
The most import change is: delete the code that invoke iosDevFind or
use open instead. Reasons are showed as follows:
1) iosDevFind is a kernel api
2) shared library must be used with Real Time Process
3) Real Time Process is a user space application, can't use kernel api
The compiling ends successfully. When I write a small test program, I
find a severe problem:
int rc;
DB_ENV* dbenv;
rc = db_env_create(&dbenv, 0);
dbenv->set_errfile(dbenv, stderr);
unsigned int flags = DB_CREATE | DB_INIT_LOCK | DB_INIT_MPOOL |
DB_THREAD;
int mode = 0;
rc = dbenv->open(dbenv, db_home, flags, mode);
fprintf(stdout, "after dbenv->open, retcode %d\n", rc);
if (rc != 0) fprintf(stderr, "dbenv->open failed: %s\n",
db_strerror(rc));
The fprintf result is:
after dbenv->open, retcode 11
dbenv->open failed: resource temporarily unavailable
I don't know whether it is caused by the deletion or exchange with
open.
I guess the porting process is totallly wrong, maybe. Please help me
port it better.
If you have the precompiled berkeley db 4.5.* on VxWorks 6.3 using
Workbench 2.5, please share it with me, thank you very much. |