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 

Wrong Compiler ???

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



Joined: 22 Nov 2004
Posts: 16

PostPosted: Wed Dec 01, 2004 9:47 am    Post subject: Wrong Compiler ??? Reply with quote

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
Back to top
View user's profile Send private message
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Wed Dec 01, 2004 10:34 am    Post subject: Reply with quote

I have successfully used this compiler on windows: http://www.lukasz.dk/ps2toolchain.html
Back to top
View user's profile Send private message
AngelSephiroth



Joined: 22 Nov 2004
Posts: 16

PostPosted: Wed Dec 01, 2004 11:19 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Wed Dec 01, 2004 12:09 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Wed Dec 01, 2004 1:48 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Wed Dec 01, 2004 1:58 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Wed Dec 01, 2004 7:07 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
AngelSephiroth



Joined: 22 Nov 2004
Posts: 16

PostPosted: Fri Dec 03, 2004 5:25 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Fri Dec 03, 2004 6:49 am    Post subject: Reply with quote

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, t_saveski@yahoo.com
#----------------------------------------------------------------------------
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
Back to top
View user's profile Send private message Visit poster's website
AngelSephiroth



Joined: 22 Nov 2004
Posts: 16

PostPosted: Fri Dec 03, 2004 8:07 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Fri Dec 03, 2004 9:01 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message Visit poster's website
AngelSephiroth



Joined: 22 Nov 2004
Posts: 16

PostPosted: Fri Dec 03, 2004 10:19 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
AngelSephiroth



Joined: 22 Nov 2004
Posts: 16

PostPosted: Fri Dec 03, 2004 10:29 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Fri Dec 03, 2004 10:57 am    Post subject: Reply with quote

Uhm. Try this:

chmod a+x toolchain.sh

Then run it.

(oi)
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Fri Dec 03, 2004 12:32 pm    Post subject: Reply with quote

In a private message to me:

Quote:
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.
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 -> PS2 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