Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2010-07-29T10:47:44Z by veervicky
veervicky
veervicky
3 Posts
ACCEPTED ANSWER

Pinned topic How to compile a c++ code??

‏2010-07-28T06:00:10Z |
the error on compiling a spu c++ code is as follows:-

make: getcwd: No such file or directory
/usr/bin/ccache /usr/bin/spu-g++ -W -Wall -Winline -I. -I /opt/cell/sdk/usr/spu/include -O3 -fno-exceptions -fno-rtti -c need-wunch.cpp
/usr/bin/ccache /usr/bin/spu-g++ -o need-wunch need-wunch.o -Wl,-N
/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
make: *** need-wunch Error 1

makefile reads like this:
PROGRAM_spu := spu_main
LIBRARY_embed := spu_main.a
include $(CELL_TOP)/buildutils/make.footer
Updated on 2010-07-29T10:47:44Z at 2010-07-29T10:47:44Z by veervicky
  • kenws
    kenws
    49 Posts
    ACCEPTED ANSWER

    Re: How to compile a c++ code??

    ‏2010-07-28T06:45:22Z  in response to veervicky
    Are you using iostream or similar? According to section 8.1.2 of the [C/C++ Language Extensions for Cell Broadband Engine Architecture|
    https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/30B3520C93F437AB87257060006FFE5E/$file/Language_Extensions_for_CBEA_2.6.pdf] document those are not available on the SPU. You may also watch your code size due to the limited amount of local store.
    • veervicky
      veervicky
      3 Posts
      ACCEPTED ANSWER

      Re: How to compile a c++ code??

      ‏2010-07-29T10:47:44Z  in response to kenws
      Thanks a lot....!!!!
      Actually I was using iostream file which is no longer available. :)