* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Posts

Anyone still around? by Bing
[October 28, 2024, 11:23:32 PM]


2023 Check in by Gawerty
[March 28, 2023, 12:41:12 AM]


Holy crap my login worked. by Ez
[December 03, 2020, 08:56:26 AM]


Been a while. by Bing
[July 13, 2019, 04:47:06 AM]


Was Feeling Nostalgic (Pokemon Knights) by Monzta
[October 24, 2018, 07:37:00 AM]


Old Habits Die Hard by Miss Wednesday
[January 23, 2018, 12:35:35 AM]


WHY IS EVERYONE MISSING by Tickles
[September 16, 2017, 08:20:25 PM]


Been a long time. by Monzta
[August 27, 2017, 03:18:58 PM]


Author Topic: Compiling the source code?  (Read 9814 times)

Offline Eclipsor

  • New Trainer
  • Posts: 3
  • Karma: 0
    • View Profile
Compiling the source code?
« 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!

Offline Urmel

  • Founder/Developer
  • Administrator
  • Senior Trainer
  • ********
  • Posts: 9.087
  • Karma: 7
  • You are now blinking manually
    • View Profile
Re: Compiling the source code?
« Reply #1 on: April 24, 2011, 05:18:32 PM »
You have to compile/install (make install) all the Packages in trunk/Packages first :)

Offline Eclipsor

  • New Trainer
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Compiling the source code?
« Reply #2 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?

Offline Urmel

  • Founder/Developer
  • Administrator
  • Senior Trainer
  • ********
  • Posts: 9.087
  • Karma: 7
  • You are now blinking manually
    • View Profile
Re: Compiling the source code?
« Reply #3 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)?

Offline FireDarkGuy

  • Normal Trainer
  • **
  • Posts: 289
  • Karma: 0
  • Is this thing working?
    • View Profile
Re: Compiling the source code?
« Reply #4 on: April 26, 2011, 05:24:50 PM »
What is that thing?
I LOVE CHARIZARD AND UMBREON!

Offline Jerry

  • Global Moderator
  • Elite Trainer
  • ******
  • Posts: 2.737
  • Karma: 16
  • Busy busy busy again
    • View Profile
Re: Compiling the source code?
« Reply #5 on: April 26, 2011, 06:01:49 PM »
Computer stuff. Google has the answer that you're looking for.
No one can go back and change a bad beginning; but anyone can start now and create a successful ending.
If a problem can be solved, no need to worry about it. If it cannot be solved what is the use of worrying?

Currently playing Pokemon XY/ORAS/Shuffle and Clash of Clans and testing out PokemonRevolutionOnline and Dragonmon Hunter....
Also, forum notification emails are not getting in my inbox... again...

Offline Eclipsor

  • New Trainer
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Compiling the source code?
« Reply #6 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.

Offline Jerry

  • Global Moderator
  • Elite Trainer
  • ******
  • Posts: 2.737
  • Karma: 16
  • Busy busy busy again
    • View Profile
Re: Compiling the source code?
« Reply #7 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 :)
No one can go back and change a bad beginning; but anyone can start now and create a successful ending.
If a problem can be solved, no need to worry about it. If it cannot be solved what is the use of worrying?

Currently playing Pokemon XY/ORAS/Shuffle and Clash of Clans and testing out PokemonRevolutionOnline and Dragonmon Hunter....
Also, forum notification emails are not getting in my inbox... again...

Offline Urmel

  • Founder/Developer
  • Administrator
  • Senior Trainer
  • ********
  • Posts: 9.087
  • Karma: 7
  • You are now blinking manually
    • View Profile
Re: Compiling the source code?
« Reply #8 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 :)

Offline RM

  • New Trainer
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Compiling the source code?
« Reply #9 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
« Last Edit: May 01, 2011, 09:19:25 AM by RM »

Offline RM

  • New Trainer
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Compiling the source code?
« Reply #10 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

Offline Urmel

  • Founder/Developer
  • Administrator
  • Senior Trainer
  • ********
  • Posts: 9.087
  • Karma: 7
  • You are now blinking manually
    • View Profile
Re: Compiling the source code?
« Reply #11 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.

Offline RM

  • New Trainer
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Compiling the source code?
« Reply #12 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?

Offline zippoxer

  • New Trainer
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Compiling the source code?
« Reply #13 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 :)