Mono buildfails on PPC

Tom Lane tgl at redhat.com
Sat Mar 21 18:53:59 UTC 2009


Paul <paul at all-the-johnsons.co.uk> writes:
>> They are all PPC64, I believe.  I ran into a similar problem with mysql
>> awhile back --- you really need to probe the page size at runtime rather
>> than assume you know what it is from the architecture.

> How do I do that? It's really annoying that the ppc versions are killing
> everything currently for mono as 2.4 has huge benefits over the other
> versions.

Well, you didn't say exactly what was dying in mono, but the problem
with mysql was a machine-independent value for the per-thread stack
space allocation.  The guard space (which is generally one hardware
page) comes out of that, and since PPC64 has so much bigger page size
it needs a different stack size setting.  The solution I'm using in
mysql is to use pthread_attr_getguardsize() to determine the guard
space and then add that to the stack size request passed to
pthread_attr_setstacksize -- see mysql/devel/mysql-stack-guard.patch
in our CVS.

If you need to know the page size for some purpose unrelated to
stack overflow guard space, I suppose you could still use
pthread_attr_getguardsize to find it out, but it'd seem a lot more
like a hack.  There might be some other syscall better suited to
your purpose though.

			regards, tom lane




More information about the fedora-devel-list mailing list