Page 1 of 1

gsKit troubles...

Posted: Fri Feb 06, 2009 4:55 pm
by Turkey
Hi, I've recently gotten into the side of PS2 development. My environment is Ubuntu 8.04 32bit edition. The problem I am facing is with install gsKit. Whenever I try to install I get the following error messages.

../Makefile.global:12: /ee/Rules.make: No such file or directory
make: *** No rule to make target `/ee/Rules.make'. Stop.

I don't understand what the problem is here. Everything else has compiled and installed without fault thus far, so why this crappy message. I've been searching the web like mad for the last 4 hours trying to figure this out, so I apologies in advance if it is a trivial error.

Regards,
C. Anderson

Posted: Sat Feb 07, 2009 9:17 am
by radad
By using the information in the error you posted look at Makefile.global line 12 and you see this:

Code: Select all

include $(GSKITSRC)/ee/Rules.make
So it looks like GSKITSRC isnt defined. GSKITSRC is defined in the Makefile in the main gsKit folder like this:

Code: Select all

ifeq (x$(GSKITSRC), x)
GSKITSRC=`pwd`
endif
In your error message it references Makefile.global like this: ../Makefile.global. This implies it is a make invoked in the ee subdirectory. Did you invoke it from their yourself or was it invoked their by the Makefile in the main gsKit folder?

If you invoked it their yourself then it wouldnt pick up the definition of GSKITSRC in the main Makefile.

Searching the web probably isnt the best way to understand this. You just need to be able to follow what the error is telling you.

Posted: Sat Feb 07, 2009 10:32 am
by Turkey
Alright I went back and did the make install in the top directory. This is what I have now. I've tried tracking the error to see if I could draw any reason out of it however I can't. It claims that there is no Rules.make in the ee subdir but there clearly is!

Code: Select all

craig@U32-Sweep:~/Desktop/gsKit-0.2$ make install
GSKITSRC=`pwd` make -C ee install
make[1]: Entering directory `/home/craig/.local/share/Trash/files/gsKit-0.2/ee'
GSKITSRC=/home/craig/.local/share/Trash/files/gsKit-0.2 make -C gs install
make[2]: Entering directory `/home/craig/.local/share/Trash/files/gsKit-0.2/ee/gs'
GSKITSRC=/home/craig/.local/share/Trash/files/gsKit-0.2 make -C src install
make[3]: Entering directory `/home/craig/.local/share/Trash/files/gsKit-0.2/ee/gs/src'
../../../Makefile.global:31: /usr/local/ps2dev/gsKit/ee/Rules.make: No such file or directory
make[3]: *** No rule to make target `/usr/local/ps2dev/gsKit/ee/Rules.make'.  Stop.
make[3]: Leaving directory `/home/craig/.local/share/Trash/files/gsKit-0.2/ee/gs/src'
make[2]: *** [install-src] Error 2
make[2]: Leaving directory `/home/craig/.local/share/Trash/files/gsKit-0.2/ee/gs'
make[1]: *** [install-gs] Error 2
make[1]: Leaving directory `/home/craig/.local/share/Trash/files/gsKit-0.2/ee'
make: *** [install-ee] Error 2

Posted: Sat Feb 07, 2009 10:48 am
by radad
Where did this directory come from: /home/craig/.local/share/Trash/files/gsKit-0.2
Thats not where you invoked the make from.

Also the `pwd` wasnt expanded initially but was later. What shell are you using?

Then later in `/home/craig/.local/share/Trash/files/gsKit-0.2/ee/gs/src'
you get this error:
../../../Makefile.global:31: /usr/local/ps2dev/gsKit/ee/Rules.make: No such file or directory

Those directories arent making sense, are you using symbolic links?

Posted: Sat Feb 07, 2009 10:57 am
by Turkey
Sorry, I deleted a folder of it and replaced it with a new one. I didn't realise terminal had followed it to the trash bin. What I've been doing is building it and then trying to install it. I use sudo so I don't get those access denied crap. Here's the up to date dilemma. No errors this time round, but did it install. Lots of messages saying nothing to be done for install!

Code: Select all

sudo make install
GSKITSRC=`pwd` make -C ee install
make[1]: Entering directory `/home/craig/Desktop/gsKit-0.2/ee'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C gs install
make[2]: Entering directory `/home/craig/Desktop/gsKit-0.2/ee/gs'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C src install
make[3]: Entering directory `/home/craig/Desktop/gsKit-0.2/ee/gs/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/gs/src'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C include install
make[3]: Entering directory `/home/craig/Desktop/gsKit-0.2/ee/gs/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make[3]: Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/gs/include'
make[2]: Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/gs'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C dma install
make[2]: Entering directory `/home/craig/Desktop/gsKit-0.2/ee/dma'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C src install
make[3]: Entering directory `/home/craig/Desktop/gsKit-0.2/ee/dma/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/dma/src'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C include install
make[3]: Entering directory `/home/craig/Desktop/gsKit-0.2/ee/dma/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make[3]: Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/dma/include'
make[2]: Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/dma'
make[1]: Leaving directory `/home/craig/Desktop/gsKit-0.2/ee'
GSKITSRC=`pwd` make -C examples install
make[1]: Entering directory `/home/craig/Desktop/gsKit-0.2/examples'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C basic install
make[2]: Entering directory `/home/craig/Desktop/gsKit-0.2/examples/basic'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/basic'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C textures install
make[2]: Entering directory `/home/craig/Desktop/gsKit-0.2/examples/textures'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/textures'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C linuz-texture install
make[2]: Entering directory `/home/craig/Desktop/gsKit-0.2/examples/linuz-texture'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/linuz-texture'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C font install
make[2]: Entering directory `/home/craig/Desktop/gsKit-0.2/examples/font'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/font'
make[1]: Leaving directory `/home/craig/Desktop/gsKit-0.2/examples'
GSKITSRC=`pwd` make -C lib install
make[1]: Entering directory `/home/craig/Desktop/gsKit-0.2/lib'
mkdir -p /usr/local/ps2dev/gsKit/lib
cp libgskit.a libdmakit.a /usr/local/ps2dev/gsKit/lib
make[1]: Leaving directory `/home/craig/Desktop/gsKit-0.2/lib'

Posted: Sat Feb 07, 2009 11:09 am
by radad
Well, again, looking at /home/craig/Desktop/gsKit-0.2/Makefile.pref line 16 is this:

Code: Select all

include $(PS2SDK)/Defs.make
So it looks like you dont have PS2SDK defined.

You should be able to build ok without using sudo but it is needed to do the install. I am not quite sure of the sematics of sudo. Most process inherit environment variables from their parent process. Because sudo is running as a different user is might clear the environment.

Looking at the sudo manual page it says the '-E' option is to preserve the environment, so try this:

Code: Select all

sudo -E make install

Posted: Sat Feb 07, 2009 11:19 am
by Turkey
Again no error messages. I've checked by ps2dev directory and gsKit has found its way in. It contains two subdirectories called lib and include. The include seems to have all the headers. However I still can't include the <gsKit.h> without the compiler saying,
core.h:5:19: gsKit.h: No such file or directory

Code: Select all

craig@U32-Sweep&#58;~/Desktop/gsKit-0.2$ sudo -E make install
&#91;sudo&#93; password for craig&#58; 
GSKITSRC=`pwd` make -C ee install
make&#91;1&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/ee'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C gs install
make&#91;2&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/ee/gs'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C src install
make&#91;3&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/ee/gs/src'
make&#91;3&#93;&#58; Nothing to be done for `install'.
make&#91;3&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/gs/src'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C include install
make&#91;3&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/ee/gs/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make&#91;3&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/gs/include'
make&#91;2&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/gs'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C dma install
make&#91;2&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/ee/dma'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C src install
make&#91;3&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/ee/dma/src'
make&#91;3&#93;&#58; Nothing to be done for `install'.
make&#91;3&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/dma/src'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C include install
make&#91;3&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/ee/dma/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make&#91;3&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/dma/include'
make&#91;2&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/ee/dma'
make&#91;1&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/ee'
GSKITSRC=`pwd` make -C examples install
make&#91;1&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/examples'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C basic install
make&#91;2&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/examples/basic'
make&#91;2&#93;&#58; Nothing to be done for `install'.
make&#91;2&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/basic'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C textures install
make&#91;2&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/examples/textures'
make&#91;2&#93;&#58; Nothing to be done for `install'.
make&#91;2&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/textures'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C linuz-texture install
make&#91;2&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/examples/linuz-texture'
make&#91;2&#93;&#58; Nothing to be done for `install'.
make&#91;2&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/linuz-texture'
GSKITSRC=/home/craig/Desktop/gsKit-0.2 make -C font install
make&#91;2&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/examples/font'
make&#91;2&#93;&#58; Nothing to be done for `install'.
make&#91;2&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/examples/font'
make&#91;1&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/examples'
GSKITSRC=`pwd` make -C lib install
make&#91;1&#93;&#58; Entering directory `/home/craig/Desktop/gsKit-0.2/lib'
mkdir -p /usr/local/ps2dev/gsKit/lib
cp libgskit.a libdmakit.a /usr/local/ps2dev/gsKit/lib
make&#91;1&#93;&#58; Leaving directory `/home/craig/Desktop/gsKit-0.2/lib'

Posted: Sat Feb 07, 2009 11:22 am
by radad
It looks like gsKit is installed correctly now.

So now you are trying to compile something else. You need to have the installed gsKit location included on its compile line.

Posted: Sat Feb 07, 2009 11:39 am
by Turkey
In my Makefile.eeglobal and Makefile.eeglobal_cpp makefile located in the samples folder which currently builds all my programs, I've altered the following line so that ee-gcc and ee-g++ know where to find gsKit.

Code: Select all

EE_INCS &#58;= -I$&#40;PS2SDK&#41;/ee/include -I$&#40;PS2DEV&#41;/gsKit/include -I$&#40;PS2SDK&#41;/common/include -I. $&#40;EE_INCS&#41;
It would seem the next problem is with linking.

Code: Select all

basic.o&#40;.text+0x30&#41;&#58; In function `main'&#58;
basic.c&#58; undefined reference to `gsKit_init_global'
basic.o&#40;.text+0x1fc&#41;&#58;basic.c&#58; undefined reference to `dmaKit_init'
basic.o&#40;.text+0x20c&#41;&#58;basic.c&#58; undefined reference to `dmaKit_chan_init'
basic.o&#40;.text+0x220&#41;&#58;basic.c&#58; undefined reference to `gsKit_init_screen'
basic.o&#40;.text+0x230&#41;&#58;basic.c&#58; undefined reference to `gsKit_clear'
basic.o&#40;.text+0x23c&#41;&#58;basic.c&#58; undefined reference to `gsKit_set_test'
basic.o&#40;.text+0x254&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_line_strip'
basic.o&#40;.text+0x26c&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_triangle_strip'
basic.o&#40;.text+0x2a4&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_line_3d'
basic.o&#40;.text+0x2dc&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_line_3d'
basic.o&#40;.text+0x300&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_point'
basic.o&#40;.text+0x320&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_point'
basic.o&#40;.text+0x344&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_point'
basic.o&#40;.text+0x38c&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_quad_3d'
basic.o&#40;.text+0x398&#41;&#58;basic.c&#58; undefined reference to `gsKit_set_test'
basic.o&#40;.text+0x3b0&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_triangle_fan'
basic.o&#40;.text+0x404&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_quad_gouraud_3d'
basic.o&#40;.text+0x450&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_triangle_gouraud_3d'
basic.o&#40;.text+0x494&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_triangle_3d'
basic.o&#40;.text+0x4c4&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_sprite'
basic.o&#40;.text+0x544&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_sprite'
basic.o&#40;.text+0x574&#41;&#58;basic.c&#58; undefined reference to `gsKit_prim_sprite'
basic.o&#40;.text+0x57c&#41;&#58;basic.c&#58; undefined reference to `gsKit_sync_flip'
I'm really not sure what I'm supposed to link to. Would it be as simple as types -l(INSERT OBJECT FILE HERE)?

Posted: Sat Feb 07, 2009 11:47 am
by radad
Thats right, include gskit and dmakit on your link line.

I usually use this:

Code: Select all

EE_INCS += -I$&#40;GSKIT&#41;/include
EE_LDFLAGS += -L$&#40;GSKIT&#41;/lib
EE_LIBS += -lgskit -ldmakit

Posted: Sat Feb 07, 2009 11:54 am
by Turkey
Awesome, compiled with no whining. Thank you very much for all your help.

Regards,
C. Anderson.