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 

gsKit troubles...

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



Joined: 06 Feb 2009
Posts: 6
Location: Wollongong, Australia

PostPosted: Fri Feb 06, 2009 4:55 pm    Post subject: gsKit troubles... Reply with quote

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



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

PostPosted: Sat Feb 07, 2009 9:17 am    Post subject: Reply with quote

By using the information in the error you posted look at Makefile.global line 12 and you see this:
Code:
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:
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.
Back to top
View user's profile Send private message
Turkey



Joined: 06 Feb 2009
Posts: 6
Location: Wollongong, Australia

PostPosted: Sat Feb 07, 2009 10:32 am    Post subject: Reply with quote

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



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

PostPosted: Sat Feb 07, 2009 10:48 am    Post subject: Reply with quote

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



Joined: 06 Feb 2009
Posts: 6
Location: Wollongong, Australia

PostPosted: Sat Feb 07, 2009 10:57 am    Post subject: Reply with quote

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



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

PostPosted: Sat Feb 07, 2009 11:09 am    Post subject: Reply with quote

Well, again, looking at /home/craig/Desktop/gsKit-0.2/Makefile.pref line 16 is this:
Code:
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:
sudo -E make install
Back to top
View user's profile Send private message
Turkey



Joined: 06 Feb 2009
Posts: 6
Location: Wollongong, Australia

PostPosted: Sat Feb 07, 2009 11:19 am    Post subject: Reply with quote

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:
craig@U32-Sweep:~/Desktop/gsKit-0.2$ sudo -E make install
[sudo] password for craig:
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'
Back to top
View user's profile Send private message Send e-mail Visit poster's website
radad



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

PostPosted: Sat Feb 07, 2009 11:22 am    Post subject: Reply with quote

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



Joined: 06 Feb 2009
Posts: 6
Location: Wollongong, Australia

PostPosted: Sat Feb 07, 2009 11:39 am    Post subject: Reply with quote

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:
EE_INCS := -I$(PS2SDK)/ee/include -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/common/include -I. $(EE_INCS)


It would seem the next problem is with linking.

Code:
basic.o(.text+0x30): In function `main':
basic.c: undefined reference to `gsKit_init_global'
basic.o(.text+0x1fc):basic.c: undefined reference to `dmaKit_init'
basic.o(.text+0x20c):basic.c: undefined reference to `dmaKit_chan_init'
basic.o(.text+0x220):basic.c: undefined reference to `gsKit_init_screen'
basic.o(.text+0x230):basic.c: undefined reference to `gsKit_clear'
basic.o(.text+0x23c):basic.c: undefined reference to `gsKit_set_test'
basic.o(.text+0x254):basic.c: undefined reference to `gsKit_prim_line_strip'
basic.o(.text+0x26c):basic.c: undefined reference to `gsKit_prim_triangle_strip'
basic.o(.text+0x2a4):basic.c: undefined reference to `gsKit_prim_line_3d'
basic.o(.text+0x2dc):basic.c: undefined reference to `gsKit_prim_line_3d'
basic.o(.text+0x300):basic.c: undefined reference to `gsKit_prim_point'
basic.o(.text+0x320):basic.c: undefined reference to `gsKit_prim_point'
basic.o(.text+0x344):basic.c: undefined reference to `gsKit_prim_point'
basic.o(.text+0x38c):basic.c: undefined reference to `gsKit_prim_quad_3d'
basic.o(.text+0x398):basic.c: undefined reference to `gsKit_set_test'
basic.o(.text+0x3b0):basic.c: undefined reference to `gsKit_prim_triangle_fan'
basic.o(.text+0x404):basic.c: undefined reference to `gsKit_prim_quad_gouraud_3d'
basic.o(.text+0x450):basic.c: undefined reference to `gsKit_prim_triangle_gouraud_3d'
basic.o(.text+0x494):basic.c: undefined reference to `gsKit_prim_triangle_3d'
basic.o(.text+0x4c4):basic.c: undefined reference to `gsKit_prim_sprite'
basic.o(.text+0x544):basic.c: undefined reference to `gsKit_prim_sprite'
basic.o(.text+0x574):basic.c: undefined reference to `gsKit_prim_sprite'
basic.o(.text+0x57c):basic.c: 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)?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
radad



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

PostPosted: Sat Feb 07, 2009 11:47 am    Post subject: Reply with quote

Thats right, include gskit and dmakit on your link line.

I usually use this:
Code:
EE_INCS += -I$(GSKIT)/include
EE_LDFLAGS += -L$(GSKIT)/lib
EE_LIBS += -lgskit -ldmakit
Back to top
View user's profile Send private message
Turkey



Joined: 06 Feb 2009
Posts: 6
Location: Wollongong, Australia

PostPosted: Sat Feb 07, 2009 11:54 am    Post subject: Reply with quote

Awesome, compiled with no whining. Thank you very much for all your help.

Regards,
C. Anderson.
Back to top
View user's profile Send private message Send e-mail 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