[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpm, pthreads, and XScale
- From: Eli Carter <eli carter inet com>
- To: RPM Mailing List <rpm-list redhat com>
- Subject: rpm, pthreads, and XScale
- Date: Fri, 16 Jan 2004 14:44:40 -0600
All,
I'm still fighting with getting rpm to run on an ARM (XScale) system.
If anyone has any clues, I'd love to hear them...
# rpm -qa
rpmdb: /var/lib/rpm/__db.001: unable to initialize environment lock:
Function not implemented
error: db4 error(38) from dbenv->open: Function not implemented
error: cannot open Packages index using db3 - Function not implemented (38)
error: cannot open Packages database in /var/lib/rpm
no packages
"unable to initialize environment lock" appears to come from
rpm/db/env/env_region.c due to a call to __db_mutex_init() failing with
ENOSYS. __db_mutex_init appears to be a macro for
__db_pthread_mutex_init() which appears to be defined in
db/mutex/mut_pthread.c. __db_pthread_mutex_init() can return ENOSYS if
pthread_mutexattr_setpshared() or pthread_condattr_setpshared() returns
ENOSYS.
__pthread_mutexattr_setpshared() is a weak alias for
pthread_mutexattr_setpshared() and can be found in
glibc/linuxthreads/mutex.c where we find:
int __pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared)
{
if (pshared != PTHREAD_PROCESS_PRIVATE && pshared !=
PTHREAD_PROCESS_SHARED)
return EINVAL;
/* For now it is not possible to shared a conditional variable. */
if (pshared != PTHREAD_PROCESS_PRIVATE)
return ENOSYS;
return 0;
}
So, using PTHREAD_PROCESS_SHARED results in ENOSYS. Looking back at
__db_pthread_mutex_init() from db/mutex/mut_pthread.c, shows that rpm is
using PTHREAD_PROCESS_SHARED. This is the only function that uses
..._SHARED.
For my ARM work, I'm looking at rpm 4.1 and glibc 2.3.1 and cross
compiling with gcc 3.2.1+, but Fedora Core has the same code in these
places and it works just fine. How does the same code not generate
errors on my x86 box? The way I read the code, it should return ENOSYS.
I must be missing something. But I can't see what, so at this point I'm
prepared to believe it's something dumb. Anybody got a spare clue for me?
TIA,
Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------
------------------------------------------------------------------------
Confidentiality Notice: This e-mail transmission may contain
confidential and/or privileged information that is intended only for the
individual or entity named in the e-mail address. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution or reliance upon the contents of this e-mail
message is strictly prohibited. If you have received this e-mail
transmission in error, please reply to the sender, so that proper
delivery can be arranged, and please delete the message from your
computer. Thank you.
Inet Technologies, Inc.
------------------------------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]