[gccsdk] Problems running C++ programs compiled with GCC4

Lee Noar leenoar at sky.com
Wed Jul 30 04:25:34 PDT 2008

alan buckley wrote:
> I've checked in a game called tutris into the autobuilder.
> It needs libsdl1.2debian built first, but that is all.
> The Wimpslot in the !Run obey file needs increasing
> otherwise you just get a not enough memory error.
> The actual error reported varies. Lately I'm getting an
> error message that says "ite pool". Reporter however
> shows the same type of error that Wesnoth was
> reporting.
> Internal error: branch through zero at &03813584
> Tracing back via R14 gave the following code:
> 0000DFC4 LDR R3, &0000DFF4
> 0000DFC8 MOV R14, PC
> 0000DFCC MOV PC, R3
> Address 0000DFF4 contained 00000000
> I've tried to figure out what is going on by looking
> at the elfheader of the non converted to aif version,
> but really have no idea what to look for.

Thanks to John and Peter I can now build tutris.

So far, I can tell you that the function that makes the branch to 0 is
std::locale::_S_initialize() in libstdc++. I think that the function it 
is attempting (and failing) to call is gthread_once(), but I can't find 
a definition for it in the binary (although all the pthread ones are 
there). This should cause a build time linker error, however, if 
gthread_once is declared as weak, then that may explain why there was no 
error and a NULL value used instead. So it seems that __GTHREADS is 
defined, but there's no implementation to bind it to pthreads in 
UnixLib? Or perhaps __GTHREADS shouldn't be defined at all?


More information about the gcc mailing list