Page 1 of 1

error compilation

Posted: Sun Apr 20, 2008 10:31 pm
by pikajuju
Hello,

I'm french, so sorry for my english.

I have a problem when i want to compile the hello world who is in ps2dev/ps2sdk/samples/hello.

I get this message :

Code: Select all

ee-gcc -D_EE -02 -G0 -Wall -IC:/ps2dev/ps2sdk/ee/include -IC:ps2dev/ps2sdk/common/include -I.  -c -hello.c -o hello.o
make: ee-gcc: Command not found
make: *** [hello.o] Error 127
What is the problem ??

Thanks for your help.

Posted: Mon Apr 21, 2008 1:49 am
by cosmito
Hello,

Have you done what's described at the readme of the ps2toolchain ?

Code: Select all

 2) Add the following to your login script:

  export PS2DEV=/usr/local/ps2dev
  export PATH=$PATH:$PS2DEV/bin
  export PATH=$PATH:$PS2DEV/ee/bin
  export PATH=$PATH:$PS2DEV/iop/bin
  export PATH=$PATH:$PS2DEV/dvp/bin
  export PS2SDK=$PS2DEV/ps2sdk
  export PATH=$PATH:$PS2SDK/bin

Posted: Mon Apr 21, 2008 2:05 am
by pikajuju
I don't have this in my readme...

Where to put that you have written?

EDIT : i have this in my ps2dev.bat :

Code: Select all

set PS2DEV=C:/ps2dev
set PS2SDK=%PS2DEV%/ps2sdk
set PATH=%PATH%;%PS2DEV%/bin;%PS2DEV%/ee/bin;%PS2DEV%/iop/bin;%PS2DEV%/dvp/bin;%PS2SDK%/bin
That's this which you talk ?

Posted: Mon Apr 21, 2008 7:13 am
by cosmito
It seems you're using a pre-compiled sdk for windows... I was refering to the "you compile" toolchain for cygwin/linux.

Then in your case, yes, you should run this bat file at the command line and it should work.

Posted: Mon Apr 21, 2008 8:24 pm
by pikajuju
But it not work ! I have always the same error...

Posted: Mon Apr 21, 2008 10:36 pm
by ttguy
pikajuju wrote:But it not work ! I have always the same error...
My suggestion is to try the "You Compile the toolchain" option from
http://lukasz.dk/playstation-2-programm ... -tutorial/ - Option 1:

I have just recently succeeded in doing this and have got the Hello World code to compile and run. Eg I got \local\ps2dev\ps2sdk\samples\cube to compile after running the instal described on the tutorial above without much trouble.

Posted: Tue Apr 22, 2008 3:17 am
by pikajuju
ttguy wrote:
pikajuju wrote:But it not work ! I have always the same error...
My suggestion is to try the "You Compile the toolchain" option from
http://lukasz.dk/playstation-2-programm ... -tutorial/ - Option 1:

I have just recently succeeded in doing this and have got the Hello World code to compile and run. Eg I got \local\ps2dev\ps2sdk\samples\cube to compile after running the instal described on the tutorial above without much trouble.
He still displays the same error...

Posted: Tue Apr 22, 2008 9:28 pm
by pikajuju
Nobody to help me ?

Posted: Wed Apr 23, 2008 5:56 am
by J.F.
You need to describe what you're doing, not just the results. The results are clear: you haven't set the environment variables for the toolchain. Now tell us what OS you're using, and how you are trying to run the toolchain.

Posted: Thu Apr 24, 2008 2:40 am
by pikajuju
J.F. wrote:You need to describe what you're doing, not just the results. The results are clear: you haven't set the environment variables for the toolchain. Now tell us what OS you're using, and how you are trying to run the toolchain.
I have Windows XP.
I run cmd, i type "ps2dev.bat", then "make", and i get this :

Code: Select all

ee-gcc -D_EE -02 -G0 -Wall -IC:/ps2dev/ps2sdk/ee/include -IC:ps2dev/ps2sdk/common/include -I.  -c -hello.c -o hello.o 
make: ee-gcc: Command not found 
make: *** [hello.o] Error 127

Posted: Thu Apr 24, 2008 5:45 am
by Lukasz
What would help greatly in locating your problem would be if you could search your file system for ee-gcc.exe and see if its located in C:\ps2dev\ee\bin.

I noticed that you have slash '/' instead for backslash '\' in the paths in your ps2dev.bat, you might want to try changing the slashes to backslashes.

Posted: Thu Apr 24, 2008 6:23 am
by J.F.
You can't just enter the envvar commands into the Windows command shell. As the linked tutorial says, msys requires you to add them to the msys login.
First thing you need to do is to add the PS2Dev enviroment variables your MSYS login script. This is done by adding the following to etc/profile in the MSYS directory. Use an editor which supports Unix file format like Crimson Editor (Preferences -> File -> Save in Unix format) to edit the file.

export PS2DEV=/usr/local/ps2dev
export PATH=$PATH:$PS2DEV/bin
export PATH=$PATH:$PS2DEV/ee/bin
export PATH=$PATH:$PS2DEV/iop/bin
export PATH=$PATH:$PS2DEV/dvp/bin
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2SDK/bin
I THINK that you can just use the exports in the cygwin shell if you use cygwin, but I'm not 100% certain on that.

Posted: Fri Apr 25, 2008 1:12 am
by pikajuju
Lukasz wrote:What would help greatly in locating your problem would be if you could search your file system for ee-gcc.exe and see if its located in C:\ps2dev\ee\bin.

I noticed that you have slash '/' instead for backslash '\' in the paths in your ps2dev.bat, you might want to try changing the slashes to backslashes.
Yes, i have ee-gcc.exe in C:\ps2dev\ee\bin

I type just "make" in ps2dev.bat ! so i can't change '/' in '\'

J.F. wrote:You can't just enter the envvar commands into the Windows command shell. As the linked tutorial says, msys requires you to add them to the msys login.
First thing you need to do is to add the PS2Dev enviroment variables your MSYS login script. This is done by adding the following to etc/profile in the MSYS directory. Use an editor which supports Unix file format like Crimson Editor (Preferences -> File -> Save in Unix format) to edit the file.

export PS2DEV=/usr/local/ps2dev
export PATH=$PATH:$PS2DEV/bin
export PATH=$PATH:$PS2DEV/ee/bin
export PATH=$PATH:$PS2DEV/iop/bin
export PATH=$PATH:$PS2DEV/dvp/bin
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2SDK/bin

I THINK that you can just use the exports in the cygwin shell if you use cygwin, but I'm not 100% certain on that.
I have already do this. But it not work, i get the same error.