[366] in Pthreads mailing list archive
xforms and pthreads incompatibility
daemon@ATHENA.MIT.EDU (Tristan RAMBO Savatier)
Thu Jul 25 01:50:25 1996
Date: Wed, 24 Jul 1996 22:37:58 -0700
From: Tristan RAMBO Savatier <tristan@mpeg.org>
To: zhao@bragg.phys.uwm.edu, pthreads@MIT.EDU
Cc: dmg@research.att.com
I am trying to use xforms together with pthreads, and I ran into the
following problem:
libforms.a has a reference to the following symbol:
U __strtod_internal
I don't understand why libforms.a uses this internal routine
rather than strtod(), but this causes the following
problem at link time:
strtod.o(.text+0x4d60): multiple definition of `strtod'
strtod.o(.text+0xbc0): first defined here
Explanation:
The pthread library redefines some of the standard routine (probably to
make
them thread-safe). It does redefine strtod but not
__strtod_internal.
When linking with -lpthread, the references to
strtod are resolved, but the reference to __strtod_internal
(by the xforms library) is not.
It is finally resolved when linking with libc.a, but unfortunately
__strtod_internal and strtod are defined in the same module
(strtod.c), causing a link error.
I tried all possible ways to resolve this problem without
patching the pthread library, unsuccessfully!
How do you suggest to fix the problem ? There seems to be two ways:
1) make sure the pthread library redefines __strtod_internal
2) make sure the xforms library uses strtod() rather than
__strtod_internal
Note: the strtod() module used in pthread was written by David M. Gay
(dmg@research.att.com)
and it does not have any __strtod_internal.
PS I am using pthreads-1_60_beta5 and the latest xforms (I think 0.80)
downloaded last week.
--
Regards,
-- Tristan Savatier (mailto:tristan@mpeg.org - http://www.mpeg.org)
"My karma ran over my dogma"