Problems setting up PSPSDK

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Barts_706
Posts: 38
Joined: Tue Jan 24, 2006 2:21 pm
Contact:

Problems setting up PSPSDK

Post by Barts_706 »

Hi,

Some half year ago when I originally started playing with PSPDK, I have installed it on Linux using ./toolchain.sh and for the time it was good (meaning there were no problems).

In the meantime things have changed, I didn't use it all that much, started working in another company, got other laptop - to cut things short, recently I had to face installing PSPSDK yet again, this time on Windows XP, and I have encountered some problems.

Firstly, I tried to install Cygwin and then execute ,.toolchain.sh on my laptop. Installing Cygwin went fine, unfortunately I am behind proxy and firewall (corporate connection) and I couldn't get ./toolchain.sh to get internet access. If anyone can redirect me to any sites describing how to allow Cygwin to use proxies or how to set internet connection parameters for it, that might help.

Secondly, I removed Cygwin and tried other approach. PSPDev for Win32 sounded promising enough. It installed fine, no problems there. I can type "make" in cmd.exe window and it compiles SDK sample (say, 'cube.c') without problems. So far, so good. Still, I use FW1.50, so I would like it to directly compile to Kxploit canonical form (you know, % and all). When I type 'make kxploit' what I get is :
mkdir -p "cube"
psp-strip cube.elf - o cube/EBOOT.PBP
mkdir -p "cube%"
A subdirectory or file -p already exists.
Error occurred while processing: -p
make: *** [kxploit] Error 1
Now as far as I can say, there is something wrong with this '-p' parameter, but I have no idea how to change it. I know it doesn't sound too seriously, but I'm stuck because of that. Could anyone help me solve this issue?

I will be grateful.

Regards,

Barts
User avatar
Barts_706
Posts: 38
Joined: Tue Jan 24, 2006 2:21 pm
Contact:

Post by Barts_706 »

Additional clue I have just found. Please note :
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\pspdev>pspdev.bat

C:\pspdev>rem Run this from a command prompt to setup your pspdev settings

C:\pspdev>set PSPDEV=C:\pspdev

C:\pspdev>set PATH=C:\Program Files\CA\Dcs\DMScripting\;C:\Program Files\CA\DCS\
CAWIN\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Tngsd\BIN;c:\v
slick\win;C:\pspdev\bin

C:\pspdev>mkdir
The syntax of the command is incorrect.

C:\pspdev>c:\pspdev\bin\mkdir
/cygdrive/c/pspdev/bin/mkdir: missing operand
Try `/cygdrive/c/pspdev/bin/mkdir --help' for more information.


C:\pspdev>
It suggests that even though the batch file setting up the paths is run, in fact any call to mkdir is taking into account the Windows XP makedir, not the pspdev's makedir.

What did I set up wrong? Where can I correct it?
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

Hi!
The thing is that the "mkdir" command issued is the Windows XP mkdir. It doesn't accept any parameters, so if you want to solve this problem, just edit the build.mak file in X:\pspdev\psp\sdk\lib, so that the lines:

Code: Select all

kxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
	mkdir -p "$(TARGET)"
	$(STRIP) $(TARGET).elf -o $(TARGET)/$(PSP_EBOOT)
	mkdir -p "$(TARGET)%"
	$(PACK_PBP) "$(TARGET)%/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON)  \
		$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1)  \
		$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
get the -p parameter removed from them ;)

Good luck!

*Edit: Windows binaries overrule the cygwin's bins ;)
User avatar
Barts_706
Posts: 38
Joined: Tue Jan 24, 2006 2:21 pm
Contact:

Post by Barts_706 »

Thank you!

That was exactly what I needed. I should have searched for the file myself...

I actually read the documentation a little and took the liberty of substituting "mkdir" with "cyg-mkdir" and it works perfectly.

Like I thought, the issue was lame indeed. So many thanks for pushing me in the right direction.
*Edit: Windows binaries overrule the cygwin's bins ;)
Just ou of curiosity : is there any way of changing it the other way round?
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

I'm afraid not, since if you change the PATH variable to be null, the windows commands still execute :(

Code: Select all

C:\Documents and Settings\ig>PATH=""

C:\Documents and Settings\ig>set PATH
Path=""
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS

C:\Documents and Settings\ig>mkdir
The syntax of the command is incorrect.

C:\Documents and Settings\ig>
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

Just ou of curiosity : is there any way of changing it the other way round?
You can run inside of a bash shell, which is how all the toolchain stuff is meant to be run
Shoot Pixels Not People!
Makeshift Development
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

Drakonite wrote:
Just ou of curiosity : is there any way of changing it the other way round?
You can run inside of a bash shell, which is how all the toolchain stuff is meant to be run
Well, the pspdev for windows is actually made to run outside a bash shell, just in the command line. If you use cygwin with it, you might get into some problems with multiple cygwin1.dll's... By the way, how come there isn't a binary library repository? It is such a pain to compile some psp libs on windows, and it is such a pain to write code on linux :P
How about adding a binary section to the SVN for precompiled copy-paste libs?
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

no no.. the toolchain and sdk were created for running in a unixy environment with a bash compatible shell. The particular prepackaged files you downloaded were put together to allow using the toolchain without cygwin, however the various makefiles and such were still written with the expectation of unix like tools, so problems like this will arise when trying to use them in cmd.


There have been efforts in the past to keep some precompiled binaries available, however things change a lot and it's a LOT of work to even try to keep up. There have also been cases of people abusing the hosting of precompiled toolchains, which makes it so no one wants to bother with them at all anymore. (And putting binaries in SVN is a BAD idea for numerous reason... it just plain isn't going to happen.)

Not to be rude, but whether you consider it a PITA or not it can be considered a bit of a minimum bar for entrance. If you can't handle installing cygwin and building the toolchain then you are probably going to be over your head on a lot of stuff.

People here give a lot of help to people, however we don't hand hold people who have no idea what they are doing and don't even know how to program.

If you want to learn to program for the PSP or PS2, more power to you. We'd love to help you out, but we aren't going to hold your hand and teach you how to program or how to use a command line.

If you want to program for a console being able to install cygwin (or using *nix), running a script in cygwin(or *nix) to install a toolchain, and use a gnu toolchain should be required knowledge, as it's pretty much standard operating procedure.

</rant>

Sorry if I got a bit off topic, but I'm kinda tired of the whining I've been hearing lately...
and it is such a pain to write code on linux :P
I have no idea what you are talking about. I find programming in windows to be a huge PITA. After learning how to program in linux it was like a whole new world of power opening up to me.
Shoot Pixels Not People!
Makeshift Development
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

I have no idea what you are talking about. I find programming in windows to be a huge PITA. After learning how to program in linux it was like a whole new world of power opening up to me.
have to agree with that (and all the rest too :=P). people that keep whining about how hard it is to do things in linux simply dont have an idea of what they are talking about. there isnt really anything in that area that you can do in windows but cant do in linux, but there is a lot that works a lot worse in windows than in linux.

bah. sometimes i wish the elitist times back when noone would even listen to you unless you prove to be not a complete dumbass. *sigh*
User avatar
daurnimator
Posts: 38
Joined: Sun Dec 11, 2005 8:36 pm
Location: melbourne, australia

Post by daurnimator »

i don't like most linux editors (both ides & normal text editors) - windows apps ftw

/me waits patiently for ReactOS
User avatar
Barts_706
Posts: 38
Joined: Tue Jan 24, 2006 2:21 pm
Contact:

Post by Barts_706 »

Aren't you guys exagerating a little bit with this 'minimal bar' and 'whining' and so on?

I cannot install Linux on my laptop, becuase this is my company workstation. I have no problems with either programming nor *nix systems. I just don't know Cygwin, that's all.

I asked my questions precisely. I explained that I have problems configuring the way Cygwin handles connecting to internet, thus making me unable to install pspsdk via toolchain.sh. Is it really that lame?

And as for using this Win32 PSP Dev environment, I have chosen to use it as a temporary solution and as for now programs compile. Nothing wrong with it.

Adrahil's post was helpful. Drakonite's was not. So maybe you've just had a bad day and are overreacting a little bit?
Last edited by Barts_706 on Thu Jun 22, 2006 11:27 pm, edited 1 time in total.
User avatar
daurnimator
Posts: 38
Joined: Sun Dec 11, 2005 8:36 pm
Location: melbourne, australia

Post by daurnimator »

what questions are left? - didn't adrahil help you?
User avatar
Barts_706
Posts: 38
Joined: Tue Jan 24, 2006 2:21 pm
Contact:

Post by Barts_706 »

daurnimator wrote:what questions are left? - didn't adrahil help you?
No, actually adrahil reply was enough to solve my question, but it seems that the thread continues to live... I just didn't like the bit about 'whining' and 'minimal bar'.

Maybe if someone could also tell me why ./toolchain.sh was unable to connect to internet from Cygwin, just so that I learn how to do that, that would be nice.

But apart from that, I'm cool.
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

you probably didnt install wget or curl (whatever the script is using) correctly (or at all).
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

My reply was not directed at you. adrahil complained about compiling stuff on windows and asked why we don't keep binaries of the newest toolchain stuff, and I answered. If I may have seemed to have gone a little overboard, it's because pretty much every day, on the forums and on irc, people complain about how it's so hard to run the toolchain script and how they can't figure out how to compile things.
Shoot Pixels Not People!
Makeshift Development
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

I cannot install Linux on my laptop, becuase this is my company workstation
Download VirtualServer 2005 from Microsoft (free) and install SUSE or Ubuntu on there.
http://www.microsoft.com/windowsservers ... fault.mspx

Jim
User avatar
Barts_706
Posts: 38
Joined: Tue Jan 24, 2006 2:21 pm
Contact:

Post by Barts_706 »

Okay everyone, thanks for the answers.

As for our, err, little offtopic discussion concerning toolchain, no hard feelings folks.
Post Reply