The first working ps3toolchain release!

Technical discussion on the newly released and hard to find PS3.

Moderators: cheriff, emoon

chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

Don't forget to install the -dev packages for the corresponding dependencies since it will need to build code depending on them.
GE Dominator
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

just "apt-get install libgmp3-dev"
no "apt-get source" required.
Vincent_M
Posts: 73
Joined: Tue Apr 03, 2007 4:16 am

Post by Vincent_M »

Got it ;)! I noticed that this only runs C++ code on the processor cores. I didn't find any type of graphics functions, which I didn't expect to find seeing that the new update stated that we can now run 'C++ code on the SPUs and PPUs'. Good to know, but I was wondering (if I'm allowed to ask), do you think we'll ever see a ps3sdk that'll have use of the graphics hardware using the sce* functions like the PSP? Also, I have v1.7 on my PS3, will I be able to run homebrew on it, and if so, how would I do that? I was thinking of sticking on a memorystick, but I'm not sure if it has to be in a certain directory (kinda like the PSP's ms0:/PSP/GAME folder). I've never worked on the PS2 before by the way.
ouasse
Posts: 80
Joined: Mon Jul 30, 2007 5:58 am
Location: Paris, France

Post by ouasse »

hi,

I managed to install the ps3toolchain on a amd64 Debian GNU/Linux box.

Can the PS3 toolchain compile binaries for ps3/linux, ie can it be used as a replacement for the IBM Cell BE devkit ?

when I compile this sample hello.c program :

Code: Select all

#include <stdio.h>

int main&#40; int argc, char **argv &#41;
&#123;
        printf&#40; "hello !\n" &#41;;
        return 0;
&#125;
I get this error :

Code: Select all

ouasse@dionysos&#58;/home/nfs/ouasse/projet/ps3 >ppu-gcc -o hello hello.c 
/usr/local/ps3dev/ppu/lib/gcc/ppu/4.2.0/../../../../ppu/bin/ld&#58; crt1.o&#58; No such file&#58; No such file or directory
collect2&#58; ld returned 1 exit status
however, compiling a kernel or the otheros demo example works.
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

Vincent_M wrote:Got it ;)! I noticed that this only runs C++ code on the processor cores. I didn't find any type of graphics functions, which I didn't expect to find seeing that the new update stated that we can now run 'C++ code on the SPUs and PPUs'. Good to know, but I was wondering (if I'm allowed to ask), do you think we'll ever see a ps3sdk that'll have use of the graphics hardware using the sce* functions like the PSP? Also, I have v1.7 on my PS3, will I be able to run homebrew on it, and if so, how would I do that? I was thinking of sticking on a memorystick, but I'm not sure if it has to be in a certain directory (kinda like the PSP's ms0:/PSP/GAME folder). I've never worked on the PS2 before by the way.
Wow the only Sony game console you didn't mention there was the PSOne :P

To answer your question about the sce* functions, the PS3 architecture for homebrew is vastly different than the PSP and as such we don't have access to the libraries in the FW. Right now all homebrew development for the PS3 is done through Linux and is mostly similar to doing normal Linux development except for the SPUs that you have access to.

There are some people here working on a PS3SDK that will allow people to run homebrew / develop without having to do so in a Linux environment but it will still run inside of the same environment that Linux does (under a hypervisor). What does this mean? We have to write all of our own drivers and libraries to do things. Blitting to the screen, disk IO and Network are fairly easy but don't look for full on 3D support anytime soon. Expect USB and Bluetooth to take a good long while to make it into PS3SDK with audio falling somewhere in the middle.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

ouasse wrote:Can the PS3 toolchain compile binaries for ps3/linux, ie can it be used as a replacement for the IBM Cell BE devkit ?
Technically it could, but since newlib is compiled for powerpc64-unknown-none it doesn't know anything about linux. In fact, it doesn't know anything about any particular OS.

You could edit the ppu entry in config.sub and change it to powerpc64-unknown-linux if you want to build linux binaries.
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

any idea how to fix this error trying to build using Cygwin?

Code: Select all

make&#91;3&#93;&#58; Nothing to be done for `install'.
make&#91;3&#93;&#58; Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss/doc'
make&#91;3&#93;&#58; Entering directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build
-spu/spu/libgloss/libnosys'
make&#91;3&#93;&#58; Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss/libnosys'
make&#91;3&#93;&#58; Entering directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build
-spu/spu/libgloss/spu'
for outputs in libgloss.a crti.o crtn.o crt1.o crt2.o; do\
         /usr/bin/install -c -m 644 $&#123;outputs&#125; //usr/local/ps3dev//spu/spu/lib/$
&#123;outputs&#125;; \
        done
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev//spu/spu/lib/li
bgloss.a'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
ti.o'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
tn.o'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
t1.o'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
t2.o'&#58; No such host or network path
make&#91;3&#93;&#58; *** &#91;install&#93; Error 1
make&#91;3&#93;&#58; Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss/spu'
make&#91;2&#93;&#58; *** &#91;install&#93; Error 2
make&#91;2&#93;&#58; Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss'
make&#91;1&#93;&#58; *** &#91;install-target-libgloss&#93; Error 2
make&#91;1&#93;&#58; Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu'
make&#58; *** &#91;install&#93; Error 2

ive tried this
Jim wrote:I'm trying to build the ps3 toolchain on cygwin.
At step 5 (binutils-2.17.50 spu) it's failing building bin2c.c because there are 2 prototypes missing and it's built with -Wmissing-prototypes and -Werror.
I had to add

Code: Select all

int __cdecl	_fileno &#40;FILE*&#41;;
int __cdecl	_setmode&#40;int, int&#41;;
after the includes to get the step to complete. I know this isn't a good solution though.

<edit>
At step 7 (newlib-1.15.0 spu) it fails at 'make install'.
I had to change the install rule in Makefile
newlib-1.15.0\build-spu\spu\libgloss\spu

Code: Select all

install&#58;
	for outputs in $&#123;OUTPUTS&#125;; do\
	 $&#123;INSTALL_DATA&#125; $$&#123;outputs&#125; $&#40;DESTDIR&#41;$&#123;tooldir&#125;/lib$&#123;MULTISUBDIR&#125;/$$&#123;outputs&#125;; \
	done
I've removed the / between $(DESTDIR) and ${tooldir}, since my ${tooldir} ends up as /usr/local/ps3dev/spu and that expands to //usr/local/ps3dev/spu.

Jim
but it just rewrites over the makefile when it builds
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Correct, because if you just run 007- again, it'll run configure again and that's where it's broken.
Check out the script file. In mine, after configure all it does is

Code: Select all

make clean && make && make install 
So, fix the Makefile like I showed, and then just run make/make install

Jim
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

thanks for the quick reply

ok so i edit the make file as shown

sorry excuse my ignorance but how do i just run

make clean && make && make install

do i just do that from within the newlib-1.15.0 dir?

edit:

i removed that line from the script file and get the following error

newlib-1.15.0/config.guess
newlib-1.15.0/config.rpath
newlib-1.15.0/config.sub
newlib-1.15.0/configure
newlib-1.15.0/configure.in
newlib-1.15.0/depcomp
newlib-1.15.0/install-sh
newlib-1.15.0/libtool.m4
newlib-1.15.0/ltcf-c.sh
newlib-1.15.0/ltcf-cxx.sh
newlib-1.15.0/ltcf-gcj.sh
newlib-1.15.0/ltconfig
newlib-1.15.0/ltmain.sh
newlib-1.15.0/makefile.vms
newlib-1.15.0/missing
newlib-1.15.0/mkdep
newlib-1.15.0/mkinstalldirs
newlib-1.15.0/move-if-change
newlib-1.15.0/setup.com
newlib-1.15.0/src-release
newlib-1.15.0/symlink-tree
newlib-1.15.0/ylwrap
make: *** No rule to make target `clean'. Stop.
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

OK, go back to the start and just run the 007 script to put everything back the way it was.
Then, change the Makefile. (you've managed this far already!)
Then, in the same folder the Makefile is in, type
make clean
wait for it to finish, type
make
wait for it to finish, type
make install

Jim
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

cool just waiting for it to rebuild.

so if i just make it just from that folder does it continue building the rest of the library?, wont i be missing out some elements?
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

There's only one stage left, and you can build it like this
./toolchain.sh 8
You can re-do multiple stages by doing
./toolchain.sh 7 8
for instance.

Jim
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

i get the following error running clean

Mike@mike-c15e9068e7 ~/ps3toolchain/scripts/newlib-1.15.0/build-spu/spu/libgloss
/spu
$ make clean
Makefile:139: *** missing separator. Stop.

Mike@mike-c15e9068e7 ~/ps3toolchain/scripts/newlib-1.15.0/build-spu/spu/libgloss
/spu
$

edit appears to be this line

for outputs in ${OUTPUTS}; do\
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Just try 'make', 'make install'. If that doesn't work, I don't know what else the problem is.
Jim
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

i think ive sorted it by changing this line

prefix = /usr/local/ps3dev//spu

to this

prefix = usr/local/ps3dev/spu

it said it worked anyway, so i dont need to build anything else from the newlib-1.15.0 part? or was this file the very last thing that the script did? and can go onto doing 008 now?

thanks for your help
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Yup. Glad you got it working.
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

excellent, ive finished every script now, is there any documentation to go with this? and maybe some example apps like hello world just to test it compiles correctly etc

edit i noticed the otheros_demo in another thread
but that doesnt seem to compille, i get the following error

Code: Select all

Mike@mike-c15e9068e7 ~/ps3toolchain/otheros_demo/source
$ make
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o start.o start.S
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o hv.o hv.S
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o mmu.o mmu.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o time.o time.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o vuart.o vuart.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o sysmgr.o sysmgr.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o av.o av.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o flash.o flash.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o fb.o fb.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o font_8x8.o font_8x8.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o debug.o debug.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o demo.o demo.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o gpuinit.o gpuinit.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
 -c -o utils.o utils.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector -s
tatic -nostdlib -Wl,-T,script.lds -o demo.elf start.o hv.o mmu.o time.o vuart.o
sysmgr.o av.o flash.o fb.o font_8x8.o debug.o demo.o gpuinit.o utils.o -lm
objcopy -O binary demo.elf demo.bin
objcopy&#58; demo.elf&#58; File format not recognized
make&#58; *** &#91;demo.bin&#93; Error 1
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

It's running the wrong version of objcopy (should be ppu-objcopy) so your paths haven't been set up right.

Jim
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

ahh right, the only paths i could see that where supposed to be set where these

export PS3DEV=/usr/local/ps3dev/
export PATH=$PATH:$PS3DEV/bin/
export PATH=$PATH:$PS3DEV/ppu/bin/
export PATH=$PATH:$PS3DEV/spu/bin/

just looking through my folders now and i definitly have these

export PATH=$PATH:$PS3DEV/ppu/bin/
export PATH=$PATH:$PS3DEV/spu/bin/

but is no

export PATH=$PATH:$PS3DEV/bin/

folder


sorry for all this, im fairly new to linux / cygwin



EDIT: seem to have got it to build by changing the make file to

demo.bin : demo.elf
ppu-objcopy -O binary $^ $@



with the following output

Code: Select all

ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector -s
tatic -nostdlib -Wl,-T,script.lds -o demo.elf start.o hv.o mmu.o time.o vuart.o
sysmgr.o av.o flash.o fb.o font_8x8.o debug.o demo.o gpuinit.o utils.o -lm
ppu-objcopy -O binary demo.elf demo.bin
gzip -c9v demo.bin > otheros.bld
demo.bin&#58;        80.4%
is this correct? will be getting my ps3 this weekend to test it out.

im assuming theres an app similar to ps2 link isnt there?
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

ps3sdk and ps3link is still being worked on and no public release has been made.

You can run the demo.elf from kboot or similar or install the otheros.bld as an otheros and run it.
IronAvatar
Posts: 23
Joined: Sat Nov 25, 2006 5:53 am

Post by IronAvatar »

ooPo wrote: You could edit the ppu entry in config.sub and change it to powerpc64-unknown-linux if you want to build linux binaries.
Sorry to seem dumb, but does this need to be changed in the build scripts for the toolchain or somewhere else?
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

It needs to be changed in the config.sub file after patching each of binutils, gcc and newlib. You'll have to manually unpack, patch, modify and build each package.
IronAvatar
Posts: 23
Joined: Sat Nov 25, 2006 5:53 am

Post by IronAvatar »

ooPo wrote:It needs to be changed in the config.sub file after patching each of binutils, gcc and newlib. You'll have to manually unpack, patch, modify and build each package.
Oh, right. Bollocks, I guess I'm going to be busy learning how to do all this tonight then by looking at the scripts (still a bit of a newbie when it comes to Linux) :p Thanks ooPo.
rapso
Posts: 140
Joined: Mon Mar 28, 2005 6:35 am

Post by rapso »

hi,

I've followed Jim's tips to solve the issues in stage 5 and 7 (THX!@Jim) and it builds everything so far (at least there were no errors).

now building stage 8
$ scripts/008-gcc-4.3-20070608-spu-stage2.sh
I got the following error and i'm not sure what it means, nor how to solve that :( (i'm a make-n00b)
checking whether -lc should be explicitly linked in... yes
checking size of int... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
4
checking for uintptr_t... make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: *** Waiting for unfinished jobs....
yes
checking for a 64-bit type... uint64_t
checking for pid_t... yes
checking for working strncmp... no
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
Adding multilib support to Makefile in ../../../libiberty
multidirs=
with_multisubdir=
make[1]: Leaving directory `PS3Dev/ps3toolchain/gcc-4.3-20070608/build-spu-stage2'
make: *** [all] Error 2
has anyone an idea what it means and how to solve that issue? :/
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Either it can't find the C compiler (paths wrong) or some libs are missing, usually libc (paths wrong, or libc or something else didn't build).

Jim
fungus
Posts: 6
Joined: Thu Jun 09, 2005 2:53 pm

Post by fungus »

hi

I'm having trouble building the toolchain under cygwin - I'm currently trying to build stage 6 (./006-gcc-4.3-20070608-spu-stage1.sh) and get the "checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile" errors others had reported:

Code: Select all

$ cd /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1

$ make

I get:

Code: Select all

checking whether ln -s works... yes
checking for spu-gcc... /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include

checking for suffix of object files... configure&#58; error&#58; cannot compute suffix of object files&#58; cannot compile
See `config.log' for more details.
make&#91;1&#93;&#58; *** &#91;configure-target-libgcc&#93; Error 1
make&#91;1&#93;&#58; Leaving directory `/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1'
make&#58; *** &#91;all&#93; Error 2

I've tried changing the makefile prefix line from

Code: Select all

prefix = /usr/local/ps3dev/spu
to

Code: Select all

prefix = usr/local/ps3dev/spu

but still get the same issue

'config.log' in scripts/gcc-4.3-20070608/build-spu-stage1/spu/libgcc contains the following block:


Code: Select all

gcc version 4.3.0 20070608 &#40;experimental&#41;
configure&#58;2373&#58; $? = 0
configure&#58;2375&#58; /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -V </dev/null >&5
xgcc&#58; '-V' must come at the start of the command line
configure&#58;2378&#58; $? = 1
configure&#58;2397&#58; /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -o conftest -O2 -g -O2    conftest.c  >&5
/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as&#58; line 60&#58; exec&#58; &#58; not found
configure&#58;2400&#58; $? = 1
configure&#58;2566&#58; checking for suffix of object files
configure&#58;2587&#58; /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -c -O2 -g -O2   conftest.c >&5
/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as&#58; line 60&#58; exec&#58; &#58; not found
configure&#58;2590&#58; $? = 1
configure&#58; failed program was&#58;
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main &#40;&#41;
| &#123;
| 
|   ;
|   return 0;
| &#125;
configure&#58;2604&#58; error&#58; cannot compute suffix of object files&#58; cannot compile

is the 'xgcc: '-V' must come at the start of the command line' line important ?


'/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as: line 60: exec: : not found'

is this telling me that it can't find 'as' ? - I do have this file:

/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as


thanks for any help - I feel I'm pretty close!

-j
fungus
Posts: 6
Joined: Thu Jun 09, 2005 2:53 pm

Post by fungus »

so

Code: Select all

ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/gcc/as
had empty paths for as and ld:

Code: Select all

ORIGINAL_AS_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/as"
ORIGINAL_LD_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/ld"
ORIGINAL_NM_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/nm"
exeext=.exe
and indeed, I only have ar, nm, objcopy, objdump, ranlib and strip in

Code: Select all

/usr/local/ps3dev/spu/spu/bin/
so presumably spu binutils didn't build properly ?

-j
fungus
Posts: 6
Joined: Thu Jun 09, 2005 2:53 pm

Post by fungus »

ugh, I'd pasted the version of as I'd modified before I realized the actual exes weren't there - here's the original:

Code: Select all

ORIGINAL_AS_FOR_TARGET=""
ORIGINAL_LD_FOR_TARGET=""
ORIGINAL_NM_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/nm"
exeext=.exe
fungus
Posts: 6
Joined: Thu Jun 09, 2005 2:53 pm

Post by fungus »

I'm having quite the conversation with myself!

- I did have a partial binutils build - once I sorted that, everything else worked (with a nudge here and there as described previously)

thanks!

-j
sopordave
Posts: 10
Joined: Thu May 15, 2008 9:06 am

Post by sopordave »

I've been playing around with otheros v1.0, making small changes and drawing new geometry. I would like to use math.h, but I can't figure out how to link the library. I've tried -lm and -L/usr/local/ps3dev/ppu/ppu/lib/libm.a, but both still give me undefined reference errors.

Any tips?
Post Reply