[fpc-pascal] Why is cthreads unit not included by default

Marco van de Voort marcov at stack.nl
Thu Aug 27 13:04:01 CEST 2009

In our previous episode, Graeme Geldenhuys said:
> >> Why is threading enabled by default under Windows and not under other
> >> platforms?
> > 
> > Because it creates a dependency on the C library, which 
> > is not always wanted. For Lazarus programs, the dependency exists
> > anyway, so it does not make a lot of sense to have the define.
> But surely that c library is available on all unix-type systems?

There is not one C library. There are several. And all these are separately
versioned, and can also be configured differently. (removing legacy
symbols, enabling alpha functionality).

The problem is that Linux distro's seem to assume that all binaries are
generated on the system they are used, and interpret the effective API of
the system from the available headers.

> To why is that dependency a bad thing?

It makes it very hard to longterm succesfully deploy a simple linux binary
over several systems.

OS X and FreeBSD have basically the same problem, however has some
mitigating factors (they change mostly only with major versions, and have
the ability to run older binaries using resp COMPAT and SDK system)

More information about the fpc-pascal mailing list