ruby1.8: fails to build on ppc under 2.6.15 kernel
Bug #61861 reported by
Jonathan Riddell
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
ruby1.8 (Ubuntu) |
Fix Released
|
Medium
|
Matthias Klose |
Bug Description
Build segfaults on ppc, but only on the machines in the datacentre so far (that are running 64bit kernels)
description: | updated |
Changed in linux-source-2.6.15: | |
importance: | Undecided → Low |
status: | Unconfirmed → Confirmed |
To post a comment you must log in.
This is a threading bug. While applying gdb to the problem, I noticed that (a) the thing that was NULL was prot_tag and (b) prot_tag was fiddled with in some rb_thread_* functions, so I tried building with threading disabled, and it built fine (at least 'debian/rules build'; 'debian/rules binary' failed because Ruby/Tk doesn't work when Ruby is built without pthreads but Tk is built with pthreads).
Obviously this isn't actually a viable workaround due to the Ruby/Tk problem and the fact that building without pthreads almost certainly changes libruby's ABI, but it does indicate where to start looking. mono had a similar problem, and we worked around it for a while with something along the lines of:
#ifdef __powerpc__
#include <sched.h>
#endif
#ifdef __powerpc__ ZERO(&cpuset) ; setaffinity( 0, sizeof(cpuset), &cpuset);
cpu_set_t cpuset;
CPU_
CPU_SET(0, &cpuset);
sched_
#endif