Built on Linux

Post here about modding and contributing code to Goblin Camp

Moderator: Mods&Dev moderators

Re: Built on Linux

Postby Dent » 14 Sep 2010, 18:52

If you have Linux, it's pretty easy to check out the code and compile it yourself. It took me about 5 minutes to get it all set up.
Dent
 
Posts: 20
Joined: 12 Aug 2010, 08:19

Re: Built on Linux

Postby lolbroek » 14 Sep 2010, 23:21

Yes that's true. But if there is some windowsspecific code or library used, it wouldn't work. Just want to know if everything is and stay multiplatform.
lolbroek
 
Posts: 23
Joined: 26 Aug 2010, 16:37

Re: Built on Linux

Postby preevs » 15 Sep 2010, 03:15

I've been building it on OS X, so it's definitely multiplatform as far as that goes.
preevs
 
Posts: 11
Joined: 24 Jul 2010, 20:05

Re: Built on Linux

Postby Dent » 15 Sep 2010, 05:48

I regularly compile stuff for GC on Linux, and I've never had a problem except at the very beginning when I was in the wrong branch.
Dent
 
Posts: 20
Joined: 12 Aug 2010, 08:19

Re: Built on Linux

Postby PiotrLegnica » 15 Sep 2010, 13:50

Platform-specific bits are isolated, the rest of the codebase is platform agnostic.
PiotrLegnica/BasementCat on freenode. Visit #goblincamp!
The pie is a lie
User avatar
PiotrLegnica
 
Posts: 283
Joined: 06 Jul 2010, 15:27
Location: Poland, EU

Re: Built on Linux

Postby lolbroek » 29 Sep 2010, 12:40

Hi

I tried to look into it. But I don't get anywhere. :(
Have someone compiled the latest version of goblin camp in LInux? How have you done it?

I tried the windowsversion with wine but that only gives an error. :(

Hoping on anwers,
greetings
lolbroek
 
Posts: 23
Joined: 26 Aug 2010, 16:37

Re: Built on Linux

Postby snus-mumrik » 05 Nov 2010, 16:29

Time has come to try once again...

After updating all needed tools and fixing some errors from jam (why does gcc.jam look for fortran?), I finally got to cpp errors.

Some were trivial: #include "UI\lalala.hpp" should be: "UI\lalala.hpp", etc

But then I'm left with Serialization.cpp which gives many errors.
The most annoying:
src/data/Serialization.cpp:1167: error: too few template-parameter-lists
about the code:

Code: Select all
   template <size_t N> struct type { };
   #define DEFINE_TYPE(T) template <> struct type<sizeof(T)> { typedef T uint; }
   DEFINE_TYPE(boost::uint8_t);
   DEFINE_TYPE(boost::uint16_t);
   DEFINE_TYPE(boost::uint32_t);
   DEFINE_TYPE(boost::uint64_t);
   #undef DEFINE_TYPE
   
   // ReadUInt<boost::uint64_t> calls ReadUInt<boost::uint32_t> and ReadUInt<boost::uint32_t>
   // ReadUInt<boost::uint32_t> calls ReadUInt<boost::uint16_t> and ReadUInt<boost::uint16_t>
   // ReadUInt<boost::uint16_t> calls ReadUInt<boost::uint8_t>  and ReadUInt<boost::uint8_t>
   // ReadUInt<boost::uint8_t> reads single byte from the stream
   //
   // The result is then bitshifted and ORed to reconstruct the value.
   
   template <typename T>
   T ReadUInt(std::ifstream& stream) {
      typedef type<sizeof(T) / 2>::uint smaller; //// Line 1167 - the ERROR

      const boost::uint32_t smallerBits = sizeof(smaller) * 8;
      smaller a, b;
      a = ReadUInt<smaller>(stream);
      b = ReadUInt<smaller>(stream);
      return ((T)a << smallerBits) | (T)b;
   }


There are also some other errors (e.g. constructing exception from char array doesn't work), I think I can fix them. But in the quoted error I don't know what to do.

PS: I build from Piotr's revision 803:4145c8b76bd7, Gencontain's tip revision gave same errors.
PS2: build log attached
Attachments
jambuild.log.7z
build log with errors of Serialization
(1.99 KiB) Downloaded 1 time
User avatar
snus-mumrik
 
Posts: 150
Joined: 25 Jun 2010, 16:20

Re: Built on Linux

Postby PiotrLegnica » 05 Nov 2010, 16:54

About fortran.jam — didn't notice gcc.jam needs it when I was removing those, I'll re-add it.
Other errors — probably missing typename in there (e.g.
Code: Select all
typedef typename type<sizeof(T) / 2>::uint smaller;
).
PiotrLegnica/BasementCat on freenode. Visit #goblincamp!
The pie is a lie
User avatar
PiotrLegnica
 
Posts: 283
Joined: 06 Jul 2010, 15:27
Location: Poland, EU

Re: Built on Linux

Postby snus-mumrik » 05 Nov 2010, 23:59

Thanks! it works

Now I have an exception in python initialisation (Script::Init). It seems to come from
py::object modTB = py::import("traceback");

If I start python and perform "import traceback" it works alright. Do you know what could be the problem?
User avatar
snus-mumrik
 
Posts: 150
Joined: 25 Jun 2010, 16:20

Re: Built on Linux

Postby PiotrLegnica » 06 Nov 2010, 00:49

Game must be able to find the standard library, e.g. stdlib.zip file that's in Goblin Camp/lib. On Linux it will look in <directory containing the executable>/../share/goblin-camp/lib (you can verify it by looking into the logfile) — "bjam dist" should create correct directory structure in build/dist/debug-x86 (depends on build settings), and if not, could you post the result (i.e. ls -lR build/dist/debug-x86) and the logfile? I haven't had time to recreate my Linux VM lately.
PiotrLegnica/BasementCat on freenode. Visit #goblincamp!
The pie is a lie
User avatar
PiotrLegnica
 
Posts: 283
Joined: 06 Jul 2010, 15:27
Location: Poland, EU

PreviousNext

Return to Modding and Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron