forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Toolchain Build Error

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
remleduff



Joined: 24 Jul 2005
Posts: 11

PostPosted: Sat Aug 13, 2005 11:29 am    Post subject: Reply with quote

I just rebuilt my toolchain and have been getting errors when I try to make the samples/debug/exception sample.

Known regression?

Code:
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/ pspdev/psp/sdk/lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspuser -lpspkernel -o exception.elf
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(exit.o): In function `exit':
../../../../../newlib/libc/stdlib/exit.c:65: undefined reference to `_exit'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(sbrkr.o): In function `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `_sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(makebuf.o): In function `__smakebuf':
../../../../../newlib/libc/stdio/makebuf.c:96: undefined reference to `isatty'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(writer.o): In function `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `_write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(closer.o): In function `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `_close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(fstatr.o): In function `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `_fstat'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(lseekr.o): In function `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `_lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(readr.o): In function `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `_read'
collect2: ld returned 1 exit status
Back to top
View user's profile Send private message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Sat Aug 13, 2005 11:34 am    Post subject: Reply with quote

Split and moved... How was that related to the debugging thread?

Anyways, remove your old toolchain and SDK and then update the toolchain from svn and run it.
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
remleduff



Joined: 24 Jul 2005
Posts: 11

PostPosted: Sat Aug 13, 2005 11:47 am    Post subject: Reply with quote

Ok, I've been using the psptoolchain script to rebuild my toolchain but I guess it had gotten old and needed to be checked out again.

Shouldn't the first thing the script does be to make sure it's up-to-date? :)
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sat Aug 13, 2005 4:13 pm    Post subject: Reply with quote

A script that automatically updates itself is a tricky thing to do as strange things can happen if a script changes while it is running.

Also, there's no easy way to pull fresh patches for binutils/gcc/newlib from the svn server so it really can't update those automatically either. However, we really make an effort to keep the psptoolchain package as up to date as possible. This isn't so bad as they don't change as often as pspsdk has been lately.

Luckily, a fresh version of pspsdk can be easily checked out of svn. This is why you can just type './toolchain.sh -p' to grab the latest version and install it. Most of the time this will be all you'll have to do.

Still, when in doubt... check for a newer version of the psptoolchain package. If you're running the latest then you're probably ok.
Back to top
View user's profile Send private message Visit poster's website
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun Aug 14, 2005 9:53 am    Post subject: Reply with quote

ooPo wrote:
A script that automatically updates itself is a tricky thing to do as strange things can happen if a script changes while it is running.


Like what?
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sun Aug 14, 2005 11:14 am    Post subject: Reply with quote

Shell scripts aren't read entirely into ram before being parsed.

If you add or remove a few characters in the middle of a script while its running then its pointer shifts. It may start parsing the next line halfway through and die - or worse.
Back to top
View user's profile Send private message Visit poster's website
remleduff



Joined: 24 Jul 2005
Posts: 11

PostPosted: Sun Aug 14, 2005 2:06 pm    Post subject: Reply with quote

How about if toolchain.sh never changes and all it does is pull down the newest do_toolchain.sh (where do_toolchain.sh would be the actual script that does the work) and run it?

Like this tc.sh:

Code:
#!/usr/bin/sh
svn update
./toolchain.sh $*
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sun Aug 14, 2005 3:14 pm    Post subject: Reply with quote

Yeah, that's a great workaround. Way to go!

Or, people could type 'svn update' themselves or even just grab the latest version from my website.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group