Topic
  • 1 reply
  • Latest Post - ‏2010-05-23T20:54:01Z by RagingAvatar
RagingAvatar
RagingAvatar
11 Posts

Pinned topic Linking C++ HelloWorld for SPU error?

‏2010-05-23T20:50:10Z |
Hey guys,

I'd really appreciate some help.
I wrote a simple HelloWorld app:

#include <iostream>

int main()
{
std::cout << "HelloWorld!" << std::endl;
return 0;
}

Which is obviously the most simple c++ app ever written.
I try and compile/link this for spu and I get the following errors:

/usr/lib/gcc/spu/4.1.1/../../../../spu/bin/ld: .text exceeds local store range
/usr/lib/gcc/spu/4.1.1/crtbegin.o: In function `__do_global_dtors_aux':
+crtstuff.c:(.text+0xc): relocation truncated to fit: SPU_REL16 against `.bss'+
+crtstuff.c:(.text+0x34): relocation truncated to fit: SPU_REL16 against `.data'+
+crtstuff.c:(.text+0x3c): relocation truncated to fit: SPU_REL16 against `.data'+
+crtstuff.c:(.text+0x54): relocation truncated to fit: SPU_REL16 against `.bss'+
/usr/lib/gcc/spu/4.1.1/crtbegin.o: In function `frame_dummy':
+crtstuff.c:(.text+0x80): relocation truncated to fit: SPU_ADDR18 against `.jcr'+
+crtstuff.c:(.text+0x84): relocation truncated to fit: SPU_REL16 against `.jcr'+
+/usr/lib/gcc/spu/4.1.1/crtbegin.o:(.fini+0x0): relocation truncated to fit: SPU_REL16 against `__do_global_dtors_aux'+
/usr/lib/gcc/spu/4.1.1/crtend.o: In function `__do_global_ctors_aux':
+crtstuff.c:(.text+0x8): relocation truncated to fit: SPU_ADDR18 against `.ctors'+
+/usr/lib/gcc/spu/4.1.1/crtend.o:(.init+0x0): relocation truncated to fit: SPU_REL16 against `__do_global_ctors_aux'+
/usr/lib/gcc/spu/4.1.1/../../../../spu/lib/crt1.o: In function `_start':
+(.text+0x0): relocation truncated to fit: SPU_REL16 against symbol `__ea_local_store' defined in COMMON section in /usr/lib/gcc/spu/4.1.1/../../../../spu/lib/crt1.o+
/usr/lib/gcc/spu/4.1.1/../../../../spu/lib/crt1.o: In function `_start':
+(.text+0x28): additional relocation overflows omitted from the output+
+/usr/lib/gcc/spu/4.1.1/libstdc++.a(basic_file.o): In function `std::__basic_file<char>::sys_open(int, std::_Ios_Openmode)':+
+/home/sur/jordics/sdk3.1/src/redhat/BUILD/spu-gcc-4.1.1/obj-spu/spu/libstdc++-v3/src/basic_file.cc:212: undefined reference to `fdopen'+
collect2: ld returned 1 exit status

Now, I don't believe for a second that that app is going to exceed the local store.
What's going on? Any ideas?

I've been working my way through Scarpino's book, I'm running Fedora 9 on a PS3.
(I'm not some kid who is just using PS3 Linux for fun - I'm a Cell developer at work. I just don't get what is going on here!)
Updated on 2010-05-23T20:54:01Z at 2010-05-23T20:54:01Z by RagingAvatar
  • RagingAvatar
    RagingAvatar
    11 Posts

    Re: Linking C++ HelloWorld for SPU error?

    ‏2010-05-23T20:54:01Z  
    Apologies. Accidental double post. Please delete this post if possible.