problems with latest toolchain / psplibraries builds

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

deniska
Posts: 71
Joined: Mon Oct 17, 2005 1:38 pm
Location: New York

problems with latest toolchain / psplibraries builds

Post by deniska »

I recently decided to upgrade the sdl and the libraries on 2 of my computers. The installation of the toolchain and the libraries went ok on both cygwin and ubuntu boxes. I have recompiled a couple of sdl game ports and that went ok too, but the resulting executables wont run on psp. I don't see any errors in psplinkusb's pspsh and it just shuts the psp down if ran from memory stick.
The tests were done on the slim, and the same code seems to work if compiled with 5month old sdk build.

Does anyone have any clues as to what changed or experience similar problems?
bykte
Posts: 3
Joined: Sun Jun 01, 2008 1:51 pm

Post by bykte »

I think I am having the same problem as you. I am currently using revision 2392. All the executables that I compiled with it cannot be executed on my SLIM, 390m33-3 PSP resulting the PSP to be shutdown within a few seconds of running it. Someone with an older revision of the SDK compiled the exact same copy and it ran on my PSP without the shutdown problem.
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

Same here, updated my sdk yesterday and same problem :x
There is a bug in the latest sdk.
MagerValp
Posts: 10
Joined: Fri Jul 20, 2007 12:12 am
Contact:

Post by MagerValp »

I'm having a possibly related problem, where psplink shuts down my 3.90M33-3 fat when I start usbhostfs_pc, as detailed here:

http://forums.ps2dev.org/viewtopic.php?t=10377

psplink compiled with an earlier sdk runs fine.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

I have updated my SDK this morning after reading this thread and I have the same issues too.
whistler
Posts: 39
Joined: Tue Mar 04, 2008 7:08 am

Post by whistler »

i'm using revison 2392 and i don't have any problems with either the psptoolchain or sdl and the support libraries. all my executables compile and run on my psp slim
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

whistler wrote:i'm using revison 2392 and i don't have any problems with either the psptoolchain or sdl and the support libraries. all my executables compile and run on my psp slim
Did you update the entire toolchain to revision 2392 or just the SDK (ie. via ./toolchain.sh 6)?

I did a full install of revision 2391 and that worked perfectly.

Revision 2392 seems broken.

I've commited a fix in revision 2393, I'm just running the toolchain script now to ensure it works.
whistler
Posts: 39
Joined: Tue Mar 04, 2008 7:08 am

Post by whistler »

Insert_witty_name wrote:
whistler wrote:i'm using revison 2392 and i don't have any problems with either the psptoolchain or sdl and the support libraries. all my executables compile and run on my psp slim
Did you update the entire toolchain to revision 2392 or just the SDK (ie. via ./toolchain.sh 6)?

I did a full install of revision 2391 and that worked perfectly.

Revision 2392 seems broken.

I've commited a fix in revision 2393, I'm just running the toolchain script now to ensure it works.
i was originally on 2390. to update to 2392 i ran ./toolchain.sh 6 and reran ./libraries.sh

btw i've just started a completely fresh installation of revision 2393, if i have any problems i'll post back here
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Seems that the problem still persists.

I'll revert the binutils patch back to the working version of 2391 until Oopo can take a proper look at it.

[EDIT] I've reverted the binutils patch back to the working revision from 2391.

Commited in revision 2394.
whistler
Posts: 39
Joined: Tue Mar 04, 2008 7:08 am

Post by whistler »

yes, i've just finished a fresh install of the toolchain (2393) and i'm experiencing the same problems as everyone else. its a good job i zipped the old pspdev folder before testing the update!
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Revision 2394 should fix any issues.
deniska
Posts: 71
Joined: Mon Oct 17, 2005 1:38 pm
Location: New York

Post by deniska »

Insert_witty_name wrote:Revision 2394 should fix any issues.
great, I'll update and report back!
hibbyware
Posts: 78
Joined: Wed Mar 28, 2007 10:29 am

Post by hibbyware »

~Report~

I have just finished updating to Revision 2394 and still have the same issues,
whistler
Posts: 39
Joined: Tue Mar 04, 2008 7:08 am

Post by whistler »

hibbyware wrote:~Report~

I have just finished updating to Revision 2394 and still have the same issues,
me too
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Apologies.

I have commited revision 2395, which should fix all the problems.

I have rerun toolchain.sh fully and am able to run binaries produced with the SDK.
hibbyware
Posts: 78
Joined: Wed Mar 28, 2007 10:29 am

Post by hibbyware »

Thanks Insert_witty_name,

I will try updating to 2395 now,



~edit~

I can confirm Revision 2395 is OK, Yay!

Once again thanks Insert_witty_name,
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Uh, so what was the problem and what was the fix? :)
deniska
Posts: 71
Joined: Mon Oct 17, 2005 1:38 pm
Location: New York

Post by deniska »

Insert_witty_name wrote:Apologies.

I have commited revision 2395, which should fix all the problems.

I have rerun toolchain.sh fully and am able to run binaries produced with the SDK.
yep, it work ok now.. thanks!
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

It work here too, but something have changed in the sony osk usage.

The default keyboard is always set to chinsee (or jap dunno). When i change the "language" param, only the "confirm exit" box is concerned by the setting.
Also i can't retrieve the input texte anymore :x

Does someone have a solution ?
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

I updated the OSK header and added a sample recently.

Check out the sample.
archeon
Posts: 4
Joined: Mon Jun 02, 2008 6:13 pm

revision check

Post by archeon »

<<<<edit: solved now, thanks>>>>>

sorry for the newbie question, but how do I check what SVN revision I built pspsdk/toolchain from? I am having this exact problem with 3.90 M33



Thanks!
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

ooPo wrote:Uh, so what was the problem and what was the fix? :)
I have no idea what actually broke, but it was broken by the changes introduced in revision 2392.

I didn't fix it as such, but reverted the toolchain.sh and binutils patch back to what they were in revision 2391.

Just for clarification Oopo, all I have to do to get the toolchain to compile on OSX is to change the last line of 001-binutils-2.16.1.sh from:

Code: Select all

 make clean && make -j 2 && make install && make clean || &#123; exit 1; &#125;
to

Code: Select all

 make clean && make -r -j 2 && make install && make clean || &#123; exit 1; &#125;
Maybe an update with a check using uname = Darwin?
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

So it compiles, but does it run? :)
-r, --no-builtin-rules
Eliminate use of the built-in implicit rules. Also clear out the default list of suffixes for suffix rules.
If that doesn't break anything then we can add it to all builds, otherwise a check would be fine. Can someone test building it on a non-OSX machine?
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Yes it compiles and runs on my OSX machine using the -r flag.

I also have a cygwin and linux setup so I'll test tonight if it works on both those too.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Ok, good. Thanks. :)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Tested under Ubuntu 8.04. Seems to be fine with the -r option. Had to change one more field for the OSK in Doom compared to the last time I updated the SDK. :) Not many unknowns left.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

So if its working fine under OSX and Linux, are there any complaints before I submit it to the repository?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

While you're doing that, how about submitting something we've been talking about for a while, but never got around to - being able to set the heap size to the max minus a variable amount. The code change is to _sbrk in libcglue.c in newlib.

You change

Code: Select all

		if &#40;heap_size == &#40;unsigned int&#41; -1&#41; &#123;
			heap_size = sceKernelMaxFreeMemSize&#40;&#41;;
		&#125; else &#123;
			heap_size *= 1024;
		&#125;
to

Code: Select all

		heap_size *= 1024;
		if &#40;&#40;int&#41;heap_size < 0&#41;
			heap_size += sceKernelMaxFreeMemSize&#40;&#41;;
PSP_HEAP_SIZE_MAX() is still the same, but you can now set the heap to be the max - x using PSP_HEAP_SIZE_KB(negative kb). For example,

Code: Select all

PSP_HEAP_SIZE_KB&#40;-1024&#41;;
sets the heap size to MAX - 1024 KB. Positive values work the same way as before. I've tested the code above, and it really works. In pspuae on my Slim, I get 38.53 MB free for -1024, and 37.50 MB free for -2048. Setting it to 20000, gives a smidgen over 13 MB free.

This change is great for programs designed to give maximum memory on both the Phat and Slim without having two different binaries. Just set "PSP_LARGE_MEMORY = 1" in the makefile, then use a negative value for the heap size. Note that this is for cases where MAX cannot be used - for example, in SDL or LTE where threads are used. Setting MAX prevents threads from being created, which was what got us to talking about this negative value in the first place.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Easy enough to add that change, the only problem I can see is if someone uses the old method (-1), it'll give them 1K less than before the change.

If that's acceptable, I have the patch made and can commit it anytime.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

ooPo wrote:Easy enough to add that change, the only problem I can see is if someone uses the old method (-1), it'll give them 1K less than before the change.

If that's acceptable, I have the patch made and can commit it anytime.
Yeah, I thought about making it more complex to check for -1 specifically, but come on! 1K? I can't envision it ever being an issue. :)

On the other hand, if your program is so close on memory that 1 KB less on the heap makes it fail, you probably need to do some more work on it in any case. :D
Post Reply