Content

Cross Compiling

Cross compiling for the STI Cell BE on Fedora Core 7

This "how-to" is a very simple overview of how to get cross compiling to work for the Cell. A lot of the ideas come from Cross-compiling for PS3 Linux

  1. Install the following RPMs:
    • alf-cross-devel-3.0.0-9.noarch.rpm
    • blas-cross-devel-3.0-6.noarch.rpm
    • cell-buildutils-3.0-11.noarch.rpm
    • cell-compliance-tests-cross-3.0-6.noarch.rpm
    • cell-demos-cross-3.0-10.noarch.rpm
    • cell-examples-cross-3.0-11.noarch.rpm
    • cell-extras-documentation-3.0-5.noarch.rpm
    • cell-libs-cross-3.0-16.noarch.rpm
    • cell-libs-cross-devel-3.0-16.noarch.rpm
    • cell-spu-timing-3.0-2.i686.rpm
    • cell-tutorial-cross-3.0-6.noarch.rpm
    • dacs-cross-devel-3.0.0-19.noarch.rpm
    • libspe2-cross-devel-2.2.0-91.noarch.rpm
    • mass-cross-devel-4.5.0-10.noarch.rpm
    • pdt-cross-devel-3.0-38.noarch.rpm
    • ppu-binutils-2.17.50-32.i686.rpm
    • ppu-binutils-debuginfo-2.17.50-32.i686.rpm
    • ppu-gcc-4.1.1-57.i686.rpm
    • ppu-gcc-c++-4.1.1-57.i686.rpm
    • ppu-gcc-debuginfo-4.1.1-57.i686.rpm
    • ppu-gcc-gnat-4.1.1-57.i686.rpm
    • ppu-gdb-6.6.50-28.i686.rpm
    • ppu-gdb-debuginfo-6.6.50-28.i686.rpm
    • ppu-sysroot64-f7-2.noarch.rpm
    • ppu-sysroot-f7-2.noarch.rpm
    • simdmath-cross-devel-3.0-5.noarch.rpm
    • spu-binutils-2.17.50-33.i686.rpm
    • spu-binutils-debuginfo-2.17.50-33.i686.rpm
    • spu-gcc-4.1.1-107.i686.rpm
    • spu-gcc-c++-4.1.1-107.i686.rpm
    • spu-gcc-debuginfo-4.1.1-107.i686.rpm
    • spu-gdb-6.6.50-12.i686.rpm
    • spu-gdb-debuginfo-6.6.50-12.i686.rpm
    • spu-newlib-1.15.0-82.i686.rpm
    • spu-newlib-debuginfo-1.15.0-82.i686.rpm
    • trace-cross-devel-3.0-38.noarch.rpm
  2. Download my fancy cmake scripts (se the hello world for example usage, or ask me)
    • svn co svn+ssh://login.ifi.uio.no/ifi/fenris/t00/babrodtk/svn/cmake
    • You can ask me for access. This will hopefully be moved to a better place soon:)
    • Be ware that the cmake scripts are regularly changing for the better, and might not be backwards compatible at this moment:)
  3. Try to compile your programs, and transfer to the Cell machine
    • Neat hint: Mount a path on the Cell machine to a local mount point using sshfs
  4. Try running your program from the Cell machine
    • If you encounter "./<FOO>: error while loading shared libraries: lib<BAR>.so: cannot open shared object file: No such file or directory", try locating the lib (locate lib<BAR>.so), and set LD_LIBRARY_PATH accordingly (export LD_LIBRARY_PATH=/<BAZ>)
  5. If you have problems with the compiler not finding headers in /usr/include, remember that it is a cross compilation. Compiling with the wrong headers wouldn't make sense. Install the correct headers where the cross compiling compilator searches for them instead.
Log In Page last modified on February 27, 2008, at 12:32 PM