Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Developing for the Cell Architecture (ps3)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
tcostigl
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2004
Posts: 97

PostPosted: Fri Apr 27, 2007 5:23 pm    Post subject: Developing for the Cell Architecture (ps3) Reply with quote

By now there is plenty of good information on getting Gentoo up and running on the ps3. However, setting up a development environment to target the spe's (on the ps3 itself or any other computer) still seems to be in flux and I have not seen any related threads as of yet. So I am starting this thread...

This is as far as I got:
Code:

gauss ~ # CFLAGS=-O2 crossdev --l 1.15.0 --b 2.17.50.0.15 --g 4.3.0_alpha20070406 -s0 spu
----------------------------------------------------------------------------------------------------------
 * Host Portage ARCH:     ppc64
 * Target Portage ARCH:   ppc64
 * Target System:         spu-elf
 * Stage:                 3 (C compiler & libc)

 * binutils:              binutils-2.17.50.0.15
 * gcc:                   gcc-4.3.0_alpha20070406
 * libc:                  newlib-1.15.0

 * PORTDIR_OVERLAY:       /usr/local/portage
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/spu-elf
 * PORTAGE_TMPDIR:        /var/tmp/cross/spu-elf
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~
 * Forcing the latest versions of binutils-config/gcc-config ...                                    [ ok ]
 * Log: /var/log/portage/cross-spu-elf-binutils.log
 * Emerging cross-binutils ...

 * binutils failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-spu-elf-info.log
 * /var/log/portage/cross-spu-elf-binutils.log



The error was "C compiler can not create executables... check config.log"

the offending lines from config.log:

Code:
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
configure:3557: $? = 1
configure: failed program was:
| #ifndef __cplusplus
|   choke me
| #endif


and...

Code:
conftest.cc: In function 'int main()':
conftest.cc:13: error: 'exit' was not declared in this scope
configure:4009: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }


Are there any success stories!?
Back to top
View user's profile Send private message
rangerpb
Retired Dev
Retired Dev


Joined: 19 Jan 2005
Posts: 147

PostPosted: Sun May 13, 2007 2:01 am    Post subject: Success from people on IRC Reply with quote

If you are interested in this type of information, I suggest you join us on #gentoo-ppc64 on IRC. There are plenty of people working with the toolchain and applications based on that toolchain. I personally am trying to move towardsa a more optimized set of stages where we can eventually move to easy installs of the cell toolchains. We're getting there...
_________________
-->
rangerpb
<--
Back to top
View user's profile Send private message
kjuanlu
n00b
n00b


Joined: 24 Oct 2006
Posts: 15

PostPosted: Sun Jul 08, 2007 9:24 pm    Post subject: Reply with quote

Hello, im try to set up the toolchain using the layman overlay. Im not sure what I have to do, this is what i have done:

Code:

  emerge layman
  echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
  layman -f
  layman -a toolchain
  layman -a cell
  echo "sys-devel/gcc -*" >> /etc/portage/package.keywords
  echo "sys-devel/binutils -*" >> /etc/portage/package.keywords
  echo "sys-libs/newlib -*" >> /etc/portage/package.keywords
  echo "sys-libs/libspe2 ~ppc64 ~ppc" >> /etc/portage/package.keywords


my package.use:
Code:

=sys-devel/gcc-4.3.0_alpha20070629 -fortran


Next, I merged this pakcages(gcc not compile), but I noticed that I must use crossdev to merge the toolchain for spu.
I belive that I need two versions of toolchain, one for the ppu, another one for the spu. I suppose that the ppu toolchain can merge using portage(sys-devel/gcc etc...), but spu toolchain must merge with crossdev -t spu.

The error of sys-devel/gcc:

Code:

# emerge sys-devel/gcc
....
....
powerpc64-unknown-linux-gnu-gcc   -O -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/genattrtab \
            build/genattrtab.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/errors.o ../build-powerpc64-unknown-linux-gnu/libiberty/libiberty.a
build/genattrtab /var/tmp/portage/sys-devel/gcc-4.3.0_alpha20070629/work/gcc-4.3-20070629/gcc/config/rs6000/rs6000.md \
          insn-conditions.md > tmp-attrtab.c
/bin/sh: line 1:  5250 Killed                  build/genattrtab /var/tmp/portage/sys-devel/gcc-4.3.0_alpha20070629/work/gcc-4.3-20070629/gcc/config/rs6000/rs6000.md insn-conditions.md > tmp-attrtab.c
make[3]: *** [s-attrtab] Error 137
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.0_alpha20070629/work/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.0_alpha20070629/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.0_alpha20070629/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.3.0_alpha20070629 failed.
Call stack:
  ebuild.sh, line 1621:   Called dyn_compile
  ebuild.sh, line 973:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  ebuild.sh, line 1311:   Called toolchain_src_compile
  toolchain.eclass, line 26:   Called gcc_src_compile
  toolchain.eclass, line 1541:   Called gcc_do_make
  toolchain.eclass, line 1415:   Called die

!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.3.0_alpha20070629/temp/build.log'.

!!! This ebuild is from an overlay: '/usr/portage/local/layman/toolchain'



Knowing this, and knowing that sys-devel/gcc not compile, the next step I have done:
Code:

crossdev -t spu


But I get another error. The error of crossdev -t spu:
Code:

crossdev --b 2.15.94.0.2.2 --g 4.3.0_alpha20070629  --l 1.15.0 -s3 spu
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 * Host Portage ARCH:     ppc64
 * Target Portage ARCH:   ppc64
 * Target System:         spu-elf
 * Stage:                 3 (C compiler & libc)

 * binutils:              binutils-2.15.94.0.2.2
 * gcc:                   gcc-4.3.0_alpha20070629
 * libc:                  newlib-1.15.0

 * PORTDIR_OVERLAY:       /usr/portage/local/layman/toolchain
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/spu-elf
 * PORTAGE_TMPDIR:        /var/tmp/cross/spu-elf
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -
 * Using sys-devel/binutils from /usr/portage/local/layman/toolchain instead of /usr/portage
 * Using sys-devel/gcc from /usr/portage/local/layman/toolchain instead of /usr/portage
 * Using sys-devel/gdb from /usr/portage/local/layman/toolchain instead of /usr/portage
 * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ...                                                                                                         [ ok ]
 * Log: /var/log/portage/cross-spu-elf-binutils.log
 * Emerging cross-binutils ...

 * binutils failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-spu-elf-info.log
 * /var/log/portage/cross-spu-elf-binutils.log




---------------------------------------------------------






localhost ~ # cat /var/log/portage/cross-spu-elf-binutils.log
....
....
checking whether free must be declared... no
checking whether getenv must be declared... no
*** BFD does not support target spu-unknown-elf.
*** Look in bfd/config.bfd for supported targets.
make: *** [configure-bfd] Error 1

!!! ERROR: cross-spu-elf/binutils-2.15.94.0.2.2 failed.
Call stack:
  ebuild.sh, line 1621:   Called dyn_compile
  ebuild.sh, line 973:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  ebuild.sh, line 1311:   Called toolchain-binutils_src_compile
  toolchain-binutils.eclass, line 223:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/cross/spu-elf/portage/cross-spu-elf/binutils-2.15.94.0.2.2/temp/build.log'.

!!! This ebuild is from an overlay: '/usr/portage/local/layman/toolchain'






I am spanish, and this is the first time that I post in english, so sorry for my bad english. How are the state of the toolchain? It compile?
Back to top
View user's profile Send private message
CNLohr
n00b
n00b


Joined: 06 Mar 2007
Posts: 9

PostPosted: Thu Jul 19, 2007 4:44 pm    Post subject: Similar Problem Reply with quote

I'm having a weird problem -- I've had this working for ages, I even have a ray tracer running on the SPUs ( http://sf.net/projects/hdcellrt ) but, I recently tried updating. I am getting the following error:

Code:

checking for struct tms... yes
checking for clock_t... yes
checking for .preinit_array/.init_array/.fini_array support... yes
checking if mkdir takes one argument... no
*** Configuration spu-unknown-elf not supported
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory `/var/tmp/portage/cross-spu-elf/gcc-4.1.2/work/build'
make: *** [all] Error 2

!!! ERROR: cross-spu-elf/gcc-4.1.2 failed.
Call stack:
  ebuild.sh, line 1621:   Called dyn_compile
  ebuild.sh, line 973:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  ebuild.sh, line 1311:   Called toolchain_src_compile
  toolchain.eclass, line 26:   Called gcc_src_compile
  toolchain.eclass, line 1541:   Called gcc_do_make
  toolchain.eclass, line 1415:   Called die

!!! emake failed with all
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/cross-spu-elf/gcc-4.1.2/temp/build.log'.

!!! This ebuild is from an overlay: '/usr/local/overlays/lu_zero'


I was wondering if anyone else had a problem like this or knew what to do?
Back to top
View user's profile Send private message
CNLohr
n00b
n00b


Joined: 06 Mar 2007
Posts: 9

PostPosted: Thu Jul 19, 2007 5:15 pm    Post subject: Good Link Reply with quote

Hmm -- I guess it would help if I said where I found how to do all this:

http://www.daniel.jp/joomla/info/ps3/creating-ps3-toolchains-on-gentoo.html

shows how to get up and started.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum