[Cbe-oss-dev] elfspe/elfspe2 source code (SRPMS)?

Sebastian Siewior cbe-oss-dev at ml.breakpoint.cc
Mon Aug 6 18:36:38 EST 2007


* Wang, Baojun | 2007-08-06 15:40:19 [+0800]:

>I've installed gentoo 2007.0 (ppc64, 64bit userland) on ps3 successfully, and 
>I'm trying to build the spu toolchain on ps3, the toolchain has been built 
>successfully, which is including:
>
>spu-binutils, spu-gcc, spu-gcc-c++, libspe, libspe2, spu-newlib and spu-gdb. 
>
>spu-gcc can generate executable, the problem is I can't got it (the standalone 
>spu program) run on the gentoo/ps3 box. however, the executable (hello, 
>spu-gcc -o hello hello.c, hello world example.) can run on systemsim (SDK 
>2.1) and yellowdog Linux (5.04) on ps3. I have follow all instructions from 
>the documentation (althrough not for gentoo) including:
>
>1) build all above packages (spu-binutils, spu-gcc, ...) via src.rpm on ps3.
>
>     rpm -Uvh xxx.src.rpm
>     rpmbuild -ba --nodeps --target=ppc64 /usr/src/rpms/SPECS/xxx.spec
>     rpm -Uvh --nodeps /usr/src/rpms/RPMS/ppc64/xxx.rpm
>
>2) install elfspe2-xxx.ppc.rpm, elfspe/elfspe2 package is ONLY BINARY 
>AVALIABLE (which I think cause problem in my example):
>
>     rpm -Uvh --nodeps elfspe2-xxx.ppc.rpm
>     
Until here I can't really follow. It seems that you compiled everything
from rpms except the elfspe2 library.

>  a) standalone spu program is not working:
>
>     spu-gcc hello.c -o hello-spu
>
>  when I ran:
>
>     ./hello-spu
>
>  I got the following error message:
>
>     bash: ./hello: Accessing a corrupted shared library
>
>  b) mixed spu/ppu program is working:

Did you compile the mixed spu+ppu on your own or did you use the
precompiled ones? Anyway, which arch is it (ppc32 or ppc64)

>Is there any thing wrong in my configuration? Is elfspe/elfspe2 source 
>avaliable ( I can't found it and I've googled many times) so I can build it 
>from source, or is it possible elfspe/elfspe2 source code being avialiable 
>later?

I guess the problem is your 64bit userland. Do a 
 ldd /usr/bin/elfspe

It may point to a 32bit libspe2 which you may not run. I *assume* that
your elfspe binary is 64bit while the libspe2 library is 32bit.
Yellow dog ships 32bit user land and a few libs in order to run 64bit
apps (like gdb).
If you want to continue using 64bit userland you should recompile
libspe2 which is available on sf [1].


[1] http://sourceforge.net/project/showfiles.php?group_id=189201&package_id=221530&release_id=503161

>Thanks in advance!
>
>  Regards,
>
>Wang

Sebastian



More information about the cbe-oss-dev mailing list