Pokemon Universe MMORPG

Pokémon Universe => Development => Topic started by: Eclipsor on April 24, 2011, 01:28:58 AM

Title: Compiling the source code?
Post by: Eclipsor on April 24, 2011, 01:28:58 AM
Hey guys, I just got around to downloading the source and I've been trying to compile it.

So far every time I try and make any of the files in Ubuntu it cannot find an import, I've also tried compiling in Windows with an emulated Unix base and a Go port for Windows, no luck.

For Ubuntu, I've tried Master, Client, and the Server folders, all fail because of a missing import in the main.go file.

If I try to compile the Client folder it says

Code: [Select]
go:19 can't find import: sdl
If I try to compile the Master folder it says

Code: [Select]
go: 25: can't find import: mysql
Now the main.go file is the one that has these imports, are these imports folders or files?

Where are they and where should they be to make this work right?

I think this would help development a lot if their was a source code compiling tutorial....

Any help is greatly appreciated!
Title: Re: Compiling the source code?
Post by: Urmel on April 24, 2011, 05:18:32 PM
You have to compile/install (make install) all the Packages in trunk/Packages first :)
Title: Re: Compiling the source code?
Post by: Eclipsor on April 24, 2011, 10:02:28 PM
You have to compile/install (make install) all the Packages in trunk/Packages first :)

Thank you very much for the reply, when I try to make the install in the Packages folder it says

Makefile:5 /src/Make.inc: No such file or directory
make: *** No rule to make target '/src/Make.inc'. Stop

Where should the Pokemon Universe folder be in relation to the Go folder?
Title: Re: Compiling the source code?
Post by: Urmel on April 24, 2011, 11:17:47 PM
The PU folder can be anywhere. Are you sure you have installed Go correctly with all the environment variables (GOROOT, GOBIN, PATH:GOBIN)?
Title: Re: Compiling the source code?
Post by: FireDarkGuy on April 26, 2011, 05:24:50 PM
What is that thing?
Title: Re: Compiling the source code?
Post by: Jerry on April 26, 2011, 06:01:49 PM
Computer stuff. Google has the answer that you're looking for.
Title: Re: Compiling the source code?
Post by: Eclipsor on April 26, 2011, 06:22:59 PM
The PU folder can be anywhere. Are you sure you have installed Go correctly with all the environment variables (GOROOT, GOBIN, PATH:GOBIN)?

I'm not 100% sure I installed Go correctly but this is the tutorial I followed.

http://unixlab.blogspot.com/2009/11/installing-googles-go-language-on.html

Computer stuff. Google has the answer that you're looking for.

Was that Google part directed at me lol? Because I've tried all ends of Google.
Title: Re: Compiling the source code?
Post by: Jerry on April 26, 2011, 06:33:13 PM
Lol, no sorry. If it were directed to you, I'd quote your post. I don't quote when I refer to the post directly over mine's :)
Title: Re: Compiling the source code?
Post by: Urmel on April 26, 2011, 06:41:02 PM
The PU folder can be anywhere. Are you sure you have installed Go correctly with all the environment variables (GOROOT, GOBIN, PATH:GOBIN)?

I'm not 100% sure I installed Go correctly but this is the tutorial I followed.

http://unixlab.blogspot.com/2009/11/installing-googles-go-language-on.html

Look me up on the chat. It's easier than doing this on the forum :)
Title: Re: Compiling the source code?
Post by: RM on May 01, 2011, 02:59:42 AM
I'm curious. If you're using SDL 1.3, how did you get SDL_ttf working? I got the latest svn snapshot to compile, but SDL_ttf isn't included.

Edit: I already have SDL_ttf for 1.2, but there doesn't seem to be a 1.3 specific version. In any case, when I try to compile the Packages/SDL it does not it.

Edit 2: Fixed the problem. I checked out the most recent version of SDL_ttf via svn and used that. Also, I got a missing argument error when I tried to compile gomysql on line 589. I think the Google Code automatically attached a patch to the issue.

Edit 3: Alright, so I thought I had it working, but with the client a panic occurs when it calls the SDL function for loading a font. It could possibly be related to there being both SDL 1.2 and 1.3 installed, but SDL_image is infatuated by SDL 1.2; I've tried to force SDL_image to use 1.3, but its just too deeply in love with 1.2
Title: Re: Compiling the source code?
Post by: RM on August 03, 2011, 10:31:56 PM
I think I narrowed down the problems I had before. Which versions of SDL_image and SDL_ttf does the project use? I'm currently using SDL_image 1.2.0, and SDL_ttf 2.0.0, and its giving me a sigpanic when it tried to call SDL_CreateTextureFromSurface. Its odd that no one else has that problem, so it must be a problem with my setup. Or maybe a required file is missing.

Here's the output I got when trying to run the client: http://pastebin.com/9wc20fFh
Title: Re: Compiling the source code?
Post by: Urmel on August 03, 2011, 11:02:03 PM
You have to be sure to compile SDL_ttf and SDL_image yourself, from the mercurial repositories. Especially SDL_ttf because the latest zipped version does not have a certain function that is being used in PU.
Title: Re: Compiling the source code?
Post by: RM on August 04, 2011, 02:32:41 AM
Yeah, I just rebuilt them fresh from the repo, still the same error. It only happens when it tries to call the SDL library, and as far as I can tell, its always when it tries to call the CreateTextureFromSurface method, never anything else. Of course I haven't tested any other methods, but it looks like it manages to create a window. Perhaps there's a problem with type casting on certain platforms?
Title: Re: Compiling the source code?
Post by: zippoxer on August 04, 2011, 07:14:27 AM
I think I will start creating a compiling tutorial, on ubuntu (or anywhere you have apt-get and it's friends).
On windows it required me to install so many things each in different stupid way, that I just forgot and will never try to remember.
Also the server was proven to run much faster on linux.

Okay, I just started writing one: http://code.google.com/p/pokemon-universe/wiki/Compiling
I will continue later :)