Wrong Compiler ???

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
AngelSephiroth
Posts: 16
Joined: Mon Nov 22, 2004 10:25 am

Wrong Compiler ???

Post by AngelSephiroth »

Hello to all, i have seemed to have noticed that the compiler i downloaded from ps2dev.sourceforge.net can't compile any other sources from Ps2dev.org, do i have the wrong compiler?? i havent seemed to find any helpful source code for this compiler except the Pad source(which is very very comfusing...) I followed the steps from the hombrew setup TXT located on Loser's site(www.internalreality.com) because the toolchain.sh didnt seem to work... anyways does anyone know of other open source code for the compiler i have? i have some ps2 sources but how could i relate to them if they both have different compilers???? the name of the compiler i downloaded was "ps2-ee-dvp-iop-tools-win32", i installed it properly and it works fine, just that i cant seem to find anymore helpful sources for it....... I appreciate everyones help for taking their time out of there busy day to help me out... Thanks.........

- AngelSephiroth
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

I have successfully used this compiler on windows: http://www.lukasz.dk/ps2toolchain.html
AngelSephiroth
Posts: 16
Joined: Mon Nov 22, 2004 10:25 am

Post by AngelSephiroth »

So this will install the compiler which can work with the helpful sources located on ps2dev.org? also do i just download the files and then run the bat and it will do everything automatically?? Thanks for the help...



- AngelSephiroth
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

It wont do everything automatically. The executables are self-extracting archives. Just run them. The recommended directory is c:\ps2dev\gcc. Edit the batch file if you choose another directory.

You need to run the batch file everytime to setup your environment. To do this open a command prompt window. You then need to run the batch file from this command prompt. The environment is then setup for that process. That means that when you run make it must be from that command prompt also. This is also why you need to run it everytime you begin.

Alternatively it is possible to setup your computer so the batch file is not necessary.
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

The compilers you mentioned are very out of date... Even with a new prepackaged compiler there might be issues because of how much change has be done to the libraries lately.

"the toolchain.sh didnt seem to work..." Can you elaborate on that?
Shoot Pixels Not People!
Makeshift Development
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

I haven't come across any problems with the compilers I mentioned, not that I have done anything serious yet. Are there newer ones available somewhere?
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

the compiler is not much of a problem, but an outdated ps2lib or ps2sdk will cause problems when trying to compile ps2dev stuff straight from cvs ( although at this point you might aswell get the latest ps2sdk from cvs and compile it. )
Kung VU
AngelSephiroth
Posts: 16
Joined: Mon Nov 22, 2004 10:25 am

Post by AngelSephiroth »

Well when i say it doesant work, it means that i'm having trouble working it... i have installed cygwin, i open the cygwin dos-box and type wget for the toolchain.sh, i see some info that appears about the site, then i see a download speed, then it stops and goes to a new line where u can type another command... i doesant install the kit or anything, i got the newest PS2Lib, version 2.2. i replaced that with the old one.. i'm okay with the compiler i have, it was easy to install and directions were step by step, so far the only sources that seem to cimpile with this is the ee-samples that comes with the compiler, also on ps2dev.org i download the ps2 tutorials about loading a bmp file, making your own fonts (ps2tut_02a etc..). those have the correct makefile batch but i always get errors...These are the erros :
------------------------------------------------------------------------------------
ee-gcc -c -Wall -W -EL -G0 -O0 -mips3 -nostdlib -D
In file included from g2.c:8:
gs.h:154: parse error before `uint64'
gs.h:154: stray '\' in program
gs.h:155: stray '\' in program
gs.h:156: stray '\' in program
gs.h:157: stray '\' in program
gs.h:158: stray '\' in program
gs.h:235: stray '\' in program
gs.h:236: stray '\' in program
gs.h:237: stray '\' in program
gs.h:238: stray '\' in program
gs.h:247: stray '\' in program
In file included from g2.c:9:
gif.h:43: `NAME_cur' undeclared here (not in a fun
gif.h:43: warning: type defaults to `int' in decla
gif.h:43: variable `NAME' has initializer but inco
gif.h:43: `QSIZE' undeclared here (not in a functi
gif.h:43: warning: data definition has no type or
gif.h:43: `NAME_cur' undeclared here (not in a fun
gif.h:43: warning: type defaults to `int' in decla
gif.h:43: variable `NAME' has initializer but inco
gif.h:43: conflicting types for `NAME'
gif.h:43: previous declaration of `NAME'
gif.h:43: warning: data definition has no type or
gif.h:43: stray '\' in program
gif.h:44: parse error before `#'
gif.h:44: stray '\' in program
g2.c:32: parse error before `}'
g2.c:32: warning: type defaults to `int' in declar
g2.c:32: warning: data definition has no type or s
g2.c:34: parse error before `vmodes'
g2.c:34: warning: type defaults to `int' in declar
g2.c:35: warning: braces around scalar initializer
g2.c:35: warning: excess elements in scalar initia
g2.c:35: warning: excess elements in scalar initia
g2.c:35: warning: excess elements in scalar initia
g2.c:35: warning: excess elements in scalar initia
g2.c:35: warning: excess elements in scalar initia
g2.c:36: warning: braces around scalar initializer
g2.c:36: warning: excess elements in scalar initia
g2.c:36: warning: excess elements in scalar initia
g2.c:36: warning: excess elements in scalar initia
g2.c:36: warning: excess elements in scalar initia
g2.c:36: warning: excess elements in scalar initia
g2.c:37: warning: braces around scalar initializer
g2.c:37: warning: excess elements in scalar initia
g2.c:37: warning: excess elements in scalar initia
g2.c:37: warning: excess elements in scalar initia
g2.c:37: warning: excess elements in scalar initia
g2.c:37: warning: excess elements in scalar initia
g2.c:38: warning: braces around scalar initializer
g2.c:38: warning: excess elements in scalar initia
g2.c:38: warning: excess elements in scalar initia
g2.c:38: warning: excess elements in scalar initia
g2.c:38: warning: excess elements in scalar initia
g2.c:38: warning: excess elements in scalar initia
g2.c:39: warning: braces around scalar initializer
g2.c:39: warning: excess elements in scalar initia
g2.c:39: warning: excess elements in scalar initia
g2.c:39: warning: excess elements in scalar initia
g2.c:39: warning: excess elements in scalar initia
g2.c:39: warning: excess elements in scalar initia
g2.c:40: warning: data definition has no type or s
g2.c:42: parse error before `*'
g2.c:42: warning: type defaults to `int' in declar
g2.c:42: warning: data definition has no type or s
g2.c: In function `g2_init':
g2.c:67: `v' undeclared (first use in this functio
g2.c:67: (Each undeclared identifier is reported o
g2.c:67: for each function it appears in.)
g2.c:67: warning: statement with no effect
g2.c: In function `g2_put_image':
g2.c:301: stray '\' in program
g2.c:301: parse error before `;'
g2.c:306: stray '\' in program
g2.c:306: parse error before `;'
g2.c:312: stray '\' in program
g2.c:312: parse error before `;'
g2.c:313: stray '\' in program
g2.c:313: parse error before `;'
g2.c:327: stray '\' in program
g2.c:291: warning: unused parameter `x'
g2.c:291: warning: unused parameter `y'
make: *** [obj/g2.o] Error 1
//-----------------------------------------------------------------------------
i went through the source and i didnt see anything wrong with them.. this is for the ps2tut_02a source. it happens with the rest as well...., i want to learn everythig step by step in ps2 programming but everything is confusing, basically, first i would like to have some source of just a basic layout using the gslib and to print to the screen, and then as i learn that continue learning everything else step by step.....** ps2 coding sure is confusing **, ......Thanks you guys for your time....

- AngelSephiroth
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post by evilo »

Must be sthg you change inside ... or your environment

Maybe also the multi string literals in source code (which is full of them), that is deprecated in last version of GCC (3.2)

I have it compiling using the include makefile :
#----------------------------------------------------------------------------
# File: Makefile
# Author: Tony Saveski, [email protected]
#----------------------------------------------------------------------------
CC=ee-gcc
AS=ee-as
LD=ee-elf-ld
BMP2C=bmp2c

OBJ_DIR = obj
BMP_DIR = resources

CFLAGS = -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE

BMP_SRC = ff.c
C_SRC = g2.c demo2a.c $(BMP_SRC)
S_SRC = crt0.s ps2_asm.s dma_asm.s gs_asm.s

C_OBJ = $(addprefix $(OBJ_DIR)/, $(C_SRC:.c=.o))
S_OBJ = $(addprefix $(OBJ_DIR)/, $(S_SRC:.s=.o))

demo1.elf: $(C_OBJ) $(S_OBJ)
@echo "-------------------------------------------------"
$(CC) $(CFLAGS) -Tlinkfile -o demo2a.elf $(C_OBJ) $(S_OBJ) -Wl,-Map,demo2a.map

$(OBJ_DIR)/%.o: %.c
@echo "-------------------------------------------------"
$(CC) -c $(CFLAGS) $< -o $@

$(OBJ_DIR)/%.o: %.s
@echo "-------------------------------------------------"
$(CC) -xassembler-with-cpp -c $(CFLAGS) $< -o $@

%.c: $(BMP_DIR)/%.bmp
@echo "-------------------------------------------------"
$(BMP2C) $< $(*F) > $@

clean:
rm -f $(C_OBJ) $(S_OBJ) *.map *.elf $(BMP_SRC)

ff.c: $(BMP_DIR)/ff.bmp
AngelSephiroth
Posts: 16
Joined: Mon Nov 22, 2004 10:25 am

Post by AngelSephiroth »

I still get an error, ** missing seperator **.. Stop.
Thats the error i get when i try to compile it, geez...... i'm trying all i can to get something to compile :( and it doesant work, well thanks for your help.........maybe there is something wrong with the compiler..


- AngelSephiroth
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

You're right. Everyone else is just pretending to have it working... and you had to come along to spread the truth: THERE IS SOMETHING WRONG WITH THE COMPILER!

Sarcasm aside, generally when someone has problems like this it is something weird with their setup. People run out of disc space, don't follow installation instructions, have viruses or typos...

You mentioned problems running toolchain.sh. You were very vague about it. If you did indeed actually run toolchain.sh, it exits for two reasons: Its done, or because there's an error. On an error, it gives a message.

Can you tell us this message?
AngelSephiroth
Posts: 16
Joined: Mon Nov 22, 2004 10:25 am

Post by AngelSephiroth »

Sorry for getting everyone annoyed with these questions :(
------------------------------------------------------------------------
I type the command >>
wget http://www.oopo.net/consoledev/files/toolchain.sh
this is what i get after >>
--19:15:20-- http://www.oopo.net/consoledev/files/toolchain.sh
=> `toolchain.sh'
Resolving www.oopo.net... 24.222.98.236
Connecting to www.oopo.net[24.222.98.236]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8,703 [application/x-sh]

100%[====================================>] 8,703 37.94K/s

19:15:20 (37.94 KB/s) - `toolchain.sh' saved [8703/8703]
----------------------------------------------------------------------------------
I truly apologize for to you guys who have tried to help me out with this....

- AngelSephiroth
AngelSephiroth
Posts: 16
Joined: Mon Nov 22, 2004 10:25 am

Post by AngelSephiroth »

After its saved, on a new line in the cygwin-dos box i type toolchain.sh and i get >>

bash: ./toolchain.sh: Permission denied



- AngelSephiroth
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Uhm. Try this:

chmod a+x toolchain.sh

Then run it.

(oi)
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

In a private message to me:
Hey oopo, thanks for helping me out... listen i type in exactly what you had but nothing happened, after i pressed enter for it to execute the command it just went to new line in the cygwin-dos box..
Did you try running it again, as you were told, after you typed the chmod line?

The chmod line changes the mode of the file to +x, meaning it is now executable... like an exe file from windows. Once it is executable, you'll be able to run it. Like a program. So... run it. Run it now.

A book on unix or linux for beginners may be a wise purchase as well.
Post Reply