 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Waruwaru
Joined: 01 Aug 2004 Posts: 15
|
Posted: Tue Aug 03, 2004 8:28 am Post subject: Newbie PS2SDK build question |
|
|
Pardon for the newbie build question. I grabbed the PS2SDK v1.0 Alpha yesterday. Couldn't use the scr_printf() function, and the suggested fix in forum was to include debug.h (which is only available in the current CVS tree). So I just downloaded Cygwin (installed GCC 3.3.1-3) on my WinXP machine, synced down the sources from cvs.ps2dev.org. Set up my env variables as
| Code: |
PS2GCC=c:\ps2dev\gcc
PS2SDKSRC=c:\ps2sdksrc\ps2sdk
|
Attempted to make from %PS2SDKSRC% and got
| Code: |
make -C tools
make[1]: Entering directory `/cygdrive/c/ps2sdksrc/ps2sdk/tools'
make -C bin2s
make[2]: Entering directory `/cygdrive/c/ps2sdksrc/ps2sdk/tools/bin2s'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/cygdrive/c/ps2sdksrc/ps2sdk/tools/bin2s'
make[1]: Leaving directory `/cygdrive/c/ps2sdksrc/ps2sdk/tools'
make -C iop
make[1]: Entering directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop'
make -C kernel
make[2]: Entering directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop/kernel'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop/kernel'
make -C dev9
make[2]: Entering directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop/dev9'
make -C dev9
make[3]: Entering directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop/dev9/dev9'
iop-gcc -O2 -G0 -c -Ic:\ps2sdksrc\ps2sdk/iop/kernel/include -Ic:\ps2sdksrc\ps2sdk/common/include -Iinclude -Wall -fno-builtin-printf src/ps2dev9.c -o obj/ps2dev9.o
cpp: -lang-c: linker input file unused because linking not done
In file included from c:/ps2sdksrc/ps2sdk/iop/kernel/include/types.h:13,
from src/ps2dev9.c:13:
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/include/stddef.h:0: warning: unrecognized text at end of #line
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/include/stddef.h:157: warning: unrecognized text at end of #line
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/include/stddef.h:219: warning: unrecognized text at end of #line
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/include/stddef.h:331: warning: unrecognized text at end of #line
as: unrecognized option `-G0'
make[3]: *** [obj/ps2dev9.o] Error 1
make[3]: Leaving directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop/dev9/dev9'
make[2]: *** [all-dev9] Error 2
make[2]: Leaving directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop/dev9'
make[1]: *** [all-dev9] Error 2
make[1]: Leaving directory `/cygdrive/c/ps2sdksrc/ps2sdk/iop'
make: *** [all-iop] Error 2
|
Running a make from within C:\ps2sdksrc\ps2sdk\iop\dev9\dev9
| Code: |
mkdir obj/
mkdir bin/
iop-gcc -O2 -G0 -c -Ic:\ps2sdksrc\ps2sdk/iop/kernel/include -Ic:\ps2sdksrc\ps2sdk/common/include -Iinclude -Wall -fno-builtin-printf src/ps2dev9.c -o obj/ps2dev9.o
In file included from src/ps2dev9.c:13:
c:\ps2sdksrc\ps2sdk/iop/kernel/include/types.h:13: stddef.h: No such file or directory
make: *** [obj/ps2dev9.o] Error 1
|
Looking for stddef.h on in the ps2 related directory, I got
| Code: |
C:\ps2dev\gcc\ee\lib\gcc-lib\ee\3.2.2\include\stddef.h
C:\ps2dev\gcc\ee\lib\gcc-lib\ee\3.2.2\include\gcc\ginclude\stddef.h
C:\ps2dev\gcc\iop\lib\gcc-lib\iop\2.8.1-ps2dev\include\stddef.h
|
Does that mean, I need to add the C:\ps2dev\gcc\iop\lib\gcc-lib\iop\2.8.1-ps2dev\include to the C:\ps2sdksrc\ps2sdk\iop\Rules.make? Or my environment is still not set up properly? Thanks for any clues you can toss my way. |
|
| Back to top |
|
 |
Waruwaru
Joined: 01 Aug 2004 Posts: 15
|
Posted: Tue Aug 03, 2004 11:40 am Post subject: |
|
|
Alright, finally got it to work. I think I had a few problems:
1) cvs was converting LF/CF between *nix and DOS, so that was causing weird errors (stray '/'s)
2) the toolchain I grabed from Lukasz's site was conflicting with my installation of Cygwin.
3) Most developers are probably developing on *nix, so had to make a few changes to the makefiles (putting quotes around the param for mkdir, removing quotes from echo command)
Since I had conflicts with Cygwin, I was using DOS in WinXP only (not in a bash shell). First set up your env vars like
| Code: |
set PS2GCC=c:\ps2dev\gcc
set PS2SDK=c:/ps2sdk
set PS2SDKSRC=c:\ps2sdksrc\ps2sdk
|
Download WinCVS, sync out ps2sdk from cvs, make sure you have "Checkout text files with the Unix LF (0xa)" checked on. Now all files downloaded should be in Unix format. Loading into Notepad will look like one giant garble of mess. Make sure you edit things using an *nix friendly editor to make modifications. I was using CVS in Cygwin, and that was doing conversions. I guess if I mount the drive in binary mode, I would've been ok (untested theory).
While Cygwin's GCC is in the front of the path (before Lukasz's toolchain), build bin2s.exe in C:\ps2sdksrc\ps2sdk\tools\bin2s.
Here is my diff against the server, most of it can be wrapped in makefile OS testing, not sure if the new include path is correct.
| Code: |
Index: ee/Rules.make
===================================================================
RCS file: /home/ps2cvs/ps2sdk/ee/Rules.make,v
retrieving revision 1.7
diff -r1.7 Rules.make
43c43
< mkdir $(EE_LIB_DIR)
---
> mkdir "$(EE_LIB_DIR)"
46c46
< mkdir $(EE_BIN_DIR)
---
> mkdir "$(EE_BIN_DIR)"
49c49
< mkdir $(EE_OBJS_DIR)
---
> mkdir "$(EE_OBJS_DIR)"
cvs server: Diffing iop
Index: iop/Rules.make
===================================================================
RCS file: /home/ps2cvs/ps2sdk/iop/Rules.make,v
retrieving revision 1.3
diff -r1.3 Rules.make
20c20
< IOP_INCS := $(IOP_INCS) -I$(PS2SDKSRC)/iop/kernel/include -I$(PS2SDKSRC)/common/include -Iinclude
---
> IOP_INCS := $(IOP_INCS) -I$(PS2SDKSRC)/iop/kernel/include -I$(PS2SDKSRC)/common/include -I$(PS2GCC)\iop\lib\gcc-lib\iop\2.8.1-ps2dev\include -Iinclude
24c24
< IOP_LDFLAGS := $(LDFLAGS_TARGET) -nostdlib $(IOP_LDFLAGS)
---
> IOP_LDFLAGS := $(LDFLAGS_TARGET) -L $(PS2GCC)\iop\lib\gcc-lib\iop\2.8.1-ps2dev -nostdlib $(IOP_LDFLAGS)
36c36
< echo "#include \"irx_imports.h\"" > $(IOP_OBJS_DIR)build-imports.c
---
> echo #include "irx_imports.h" > $(IOP_OBJS_DIR)build-imports.c
43c43
< echo "#include \"irx.h\"" > $(IOP_OBJS_DIR)build-exports.c
---
> echo #include "irx.h" > $(IOP_OBJS_DIR)build-exports.c
49c49
< mkdir $(IOP_OBJS_DIR)
---
> mkdir "$(IOP_OBJS_DIR)"
52c52
< mkdir $(IOP_BIN_DIR)
---
> mkdir "$(IOP_BIN_DIR)"
55c55
< mkdir $(IOP_LIB_DIR)
---
> mkdir "$(IOP_LIB_DIR)"
cvs server: Diffing tools
Index: tools/Rules.make
===================================================================
RCS file: /home/ps2cvs/ps2sdk/tools/Rules.make,v
retrieving revision 1.1
diff -r1.1 Rules.make
42c42
< mkdir $(TOOLS_BIN_DIR)
---
> mkdir "$(TOOLS_BIN_DIR)"
45c45
< mkdir $(TOOLS_OBJS_DIR)
---
> mkdir "$(TOOLS_OBJS_DIR)"
|
Remove Cygwin/bin from your path (or put Lukasz toolchain in front), and go into iop and run make to build iop. After it succeeds, go into ee and run make to build ee.
After both succeeds, put Cygwin/bin back into the front of your path. You should be able to go to the ps2sdk root and run make release, which copies everything into %PS2SDK%. If you have problems, make sure env var PS2SDK has the proper slashes.[/url] |
|
| Back to top |
|
 |
|
|
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
|