[fpc-devel]Problem with porting GMP library to FreePascal

Robert Osowiecki magic.robson at rassun.art.pl
Sun Jan 14 23:38:55 CET 2001


Hello

I've been trying to make an unit that implements FreePascal interface
to the GMP library (http://www.swox.com/gmp). My unit compiles OK,
but at runtime when I call some GMP funkctions (mpz_sub, for example),
the following error appears:

BUG IN DYNAMIC LINKER: ld.so: dl-minimal.c 105: realloc: Assertion
failed ptr = alloc_last_block

I've googled it and I found dl-minimal.c from glib.c:

void * weak_function realloc (void *ptr, size_t n);
{
  void *new;
  assert (ptr == alloc_last_block); // this produces error
  alloc_ptr = alloc_last_block;
  new = malloc (n);
  assert (new == ptr);
  return new;
}

I'm not experienced enough to make out if it's really ld.so error,
so I'm looking for advice. How can I see which one is responsible
for this error: linker, FreePascal, GMP, or me? Shuoud I submit
bug report to FreePascal or other developers? Last, but not least:
how can I solve it?

This happens on glibc2, FreePascal 1.00 (I'll try latest snapshot,
but I don't hope it helps).

This is quite urgent and important for me: this unit is part of 
my semester task on university. I'll greatly appreciate any
word of advice.

Yours

	Robert





More information about the fpc-devel mailing list