[fpc-devel] gdb: "Cannot find new threads: generic error"
Jonas Maebe
jonas.maebe at elis.ugent.be
Fri Oct 9 16:43:08 CEST 2009
On 09 Oct 2009, at 16:22, Martin Schreiber wrote:
> On Friday 09 October 2009 14:18:37 Jonas Maebe wrote:
>> On 09 Oct 2009, at 14:11, Martin Schreiber wrote:
>>>
>>> That means the linker removes libpthread.so and gdb can't work
>>> without?
>>
>> There is nothing to remove by the linker in case of your FPC program,
>> because the cthreads unit does not explicitly link to libpthread. It
>> tries to dynamically load the library at run time.
>>
>
> Then I don't understand the problem.
The problem appears to be that something goes wrong with dynamically
loading libpthread in case the program has not been linked to it at
compile time. That would explain why it works when you use msethread,
because that one explicitly links to libpthread at compile time (via
the imports in mselibc, I guess).
Why dynamically loading libpthread causes problems is another
question. Maybe somehow the cthreads unit loads a different ("wrong")
copy of libpthread than the one the static linker uses when linking
the program. Or, alternatively, maybe the static linker selects a
different version of libc to link against if libpthread is also used
(libc and libpthread are quite interwoven on GNU systems, even though
they are separate libraries).
> It was not caused by a bug in binutils but the new binutils with the
> bugfix
With which bugfix? And are you certain that only binutils was updated?
Jonas
More information about the fpc-devel
mailing list