Author Topic: Building PS on AMD64 Linux  (Read 707 times)

okeuday

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
Building PS on AMD64 Linux
« on: March 12, 2006, 06:12:22 am »
I don\'t know if this is the right way to submit this info.  However, I was trying to get PS working and fixed a few code problems in the process which may not be getting caught otherwise.

I was compiling with gcc 3.4 on an AMD64 Linux (SUSE) machine.  
The same problems exist in the current CVS version as of 2006/03/11 13:04 and the patch still applied without problems.
The problems are summarized here:

 a) I needed to change #include to #include in
   src/common/effects/pseffectobjspire.cpp:29:#include
   src/common/effects/pseffectobjtext.cpp:34:#include
   src/common/effects/pseffectobjquad.cpp:30:#include
   src/common/effects/pseffectobjstar.cpp:28:#include
   src/common/effects/pseffectobjtrail.cpp:30:#include
   src/common/effects/pseffectobjparticles.cpp:32:#include
   src/common/effects/pseffectobjsimpmesh.cpp:29:#include
   src/common/effects/pseffectobjmesh.cpp:29:#include
   src/common/psbehave/psworld.cpp:34:#include
   src/npcclient/walkpoly.cpp:25:#include
   src/server/gem.cpp:33:#include
   (erased in src/server/entitymanager.cpp:31:#include )
 b) I needed to change #include to #include in
   src/client/entitylabels.cpp
 c) planeshift/src/server/progressionmanager.cpp at line 2925
    has \"csString ProgressionEvent::ToString(bool topLevel) const\"
    which can not be const, or sequence member variable needs to become
    mutable since the \"sequence\" array is not treated as const but is
    forced to grab a ConstIterator of the sequence
    (csArray type).  I modified the code to work with
    a ConstIterator and made sure all ToString functions in the inheritance
    hierarchy are const.

okeuday

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
Here is the patch: (it may be better to email this)
« Reply #1 on: March 12, 2006, 06:13:01 am »
diff -ur planeshift-200603010000/src/client/entitylabels.cpp planeshift/src/client/entitylabels.cpp
--- planeshift-200603010000/src/client/entitylabels.cpp 2006-02-03 18:00:55.000000000 -0500
+++ planeshift/src/client/entitylabels.cpp      2006-03-11 20:25:52.000000000 -0500
@@ -29,7 +29,7 @@
 #include
 #include
 #include
-#include
+#include

 // CEL INCLUDES
 #include
diff -ur planeshift-200603010000/src/common/effects/pseffectobjmesh.cpp planeshift/src/common/effects/pseffectobjmesh.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjmesh.cpp      2005-12-11 20:47:38.000000000 -0500
+++ planeshift/src/common/effects/pseffectobjmesh.cpp   2006-03-11 20:00:13.000000000 -0500
@@ -26,7 +26,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 #include

diff -ur planeshift-200603010000/src/common/effects/pseffectobjparticles.cpp planeshift/src/common/effects/pseffectobjparticles.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjparticles.cpp 2005-07-28 07:39:33.000000000 -0400
+++ planeshift/src/common/effects/pseffectobjparticles.cpp      2006-03-11 20:00:13.000000000 -0500
@@ -29,7 +29,7 @@
 #include
 #include
 #include
-#include
+#include
 #include

 #include \"effects/pseffectobjparticles.h\"
diff -ur planeshift-200603010000/src/common/effects/pseffectobjquad.cpp planeshift/src/common/effects/pseffectobjquad.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjquad.cpp      2005-07-28 07:39:33.000000000 -0400
+++ planeshift/src/common/effects/pseffectobjquad.cpp   2006-03-11 20:00:13.000000000 -0500
@@ -27,7 +27,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 #include

diff -ur planeshift-200603010000/src/common/effects/pseffectobjsimpmesh.cpp planeshift/src/common/effects/pseffectobjsimpmesh.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjsimpmesh.cpp  2005-07-28 07:39:33.000000000 -0400
+++ planeshift/src/common/effects/pseffectobjsimpmesh.cpp       2006-03-11 20:00:13.000000000 -0500
@@ -26,7 +26,7 @@
 #include
 #include
 #include
-#include
+#include
 #include

 #include \"effects/pseffectobjsimpmesh.h\"
diff -ur planeshift-200603010000/src/common/effects/pseffectobjspire.cpp planeshift/src/common/effects/pseffectobjspire.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjspire.cpp     2006-02-18 16:54:08.000000000 -0500
+++ planeshift/src/common/effects/pseffectobjspire.cpp  2006-03-11 20:00:13.000000000 -0500
@@ -26,7 +26,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 #include
 #include
diff -ur planeshift-200603010000/src/common/effects/pseffectobjstar.cpp planeshift/src/common/effects/pseffectobjstar.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjstar.cpp      2006-02-18 16:54:08.000000000 -0500
+++ planeshift/src/common/effects/pseffectobjstar.cpp   2006-03-11 20:00:13.000000000 -0500
@@ -25,7 +25,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 #include
 #include
diff -ur planeshift-200603010000/src/common/effects/pseffectobjtext.cpp planeshift/src/common/effects/pseffectobjtext.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjtext.cpp      2005-12-17 02:38:27.000000000 -0500
+++ planeshift/src/common/effects/pseffectobjtext.cpp   2006-03-11 20:00:13.000000000 -0500
@@ -31,7 +31,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 
 #include \"effects/pseffectobjtext.h\"
diff -ur planeshift-200603010000/src/common/effects/pseffectobjtrail.cpp planeshift/src/common/effects/pseffectobjtrail.cpp
--- planeshift-200603010000/src/common/effects/pseffectobjtrail.cpp     2005-12-01 17:09:32.000000000 -0500
+++ planeshift/src/common/effects/pseffectobjtrail.cpp  2006-03-11 20:00:13.000000000 -0500
@@ -27,7 +27,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 #include
 #include
diff -ur planeshift-200603010000/src/common/psbehave/psworld.cpp planeshift/src/common/psbehave/psworld.cpp
--- planeshift-200603010000/src/common/psbehave/psworld.cpp     2006-02-18 16:54:08.000000000 -0500
+++ planeshift/src/common/psbehave/psworld.cpp  2006-03-11 20:00:02.000000000 -0500
@@ -31,7 +31,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 #include
 #include
diff -ur planeshift-200603010000/src/npcclient/walkpoly.cpp planeshift/src/npcclient/walkpoly.cpp
--- planeshift-200603010000/src/npcclient/walkpoly.cpp  2006-02-02 10:42:48.000000000 -0500
+++ planeshift/src/npcclient/walkpoly.cpp       2006-03-11 20:00:34.000000000 -0500
@@ -22,7 +22,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 #include
 #include
diff -ur planeshift-200603010000/src/server/entitymanager.cpp planeshift/src/server/entitymanager.cpp
--- planeshift-200603010000/src/server/entitymanager.cpp        2006-03-08 17:24:48.000000000 -0500
+++ planeshift/src/server/entitymanager.cpp     2006-03-11 20:06:31.000000000 -0500
@@ -28,7 +28,6 @@
 #include

 #include
-#include
 #include
 #include

diff -ur planeshift-200603010000/src/server/gem.cpp planeshift/src/server/gem.cpp
--- planeshift-200603010000/src/server/gem.cpp  2006-03-08 17:24:48.000000000 -0500
+++ planeshift/src/server/gem.cpp       2006-03-11 20:00:34.000000000 -0500
@@ -30,7 +30,7 @@
 #include

 #include
-#include
+#include
 #include
 #include
 #include \"imesh/object.h\"
diff -ur planeshift-200603010000/src/server/progressionmanager.cpp planeshift/src/server/progressionmanager.cpp
--- planeshift-200603010000/src/server/progressionmanager.cpp   2006-03-01 13:27:50.000000000 -0500
+++ planeshift/src/server/progressionmanager.cpp        2006-03-11 20:53:18.000000000 -0500
@@ -107,7 +107,7 @@
     virtual ~ProgressionOperation() {if (value_script) delete value_script; if (delay_script) delete delay_script; }
     virtual bool Run(gemActor * actor, gemObject *target, ProgressionManager *mgr, bool inverse)=0;
     virtual bool Load(iDocumentNode *node, ProgressionManager *mgr,ProgressionEvent *script)=0;
-    virtual csString ToString()=0;
+    virtual csString ToString() const =0;
     MathScript *GetMathScript() { return value_script; }
     virtual void LoadVariables(csArray & variables);
     virtual float GetResult() { return result; };
@@ -252,7 +252,7 @@
         return LoadValue( node, mgr, script );
     }
     
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         csString xml;
         xml.Format(\"\", traitID );
@@ -305,7 +305,7 @@
         return LoadValue(node,mgr,script);    
     }
 
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         csString xml;
         xml.Format(\"\",type.GetData(),script_text.GetData() );
@@ -472,7 +472,7 @@
         return LoadValue(node,mgr,script);
     }
 
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
         xml.Format(\"@@ -574,7 +574,7 @@
         return LoadValue(node,mgr,script)  &&  LoadDelay(node,mgr,script);
     }
     
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
         psString adjustStr, delayStr;
@@ -946,7 +946,7 @@
     }
 
         
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
         psSkillInfo * info = CacheManager::GetSingleton().GetSkillByID(skill);
@@ -1062,7 +1062,7 @@
         return true;
     }

-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
         xml.Format(\"@@ -1176,7 +1176,7 @@
         return LoadDelay(node,mgr,script);;
     }

-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
     csString escpxml = EscpXML(operationToString[operation]);
@@ -1278,7 +1278,7 @@
         return LoadDelay(node,mgr,script);
     }

-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
         xml.Format(\"@@ -1360,7 +1360,7 @@
         return true;
     }

-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
         xml.Format(\"@@ -1417,7 +1417,7 @@
         return true;
     }

-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
         xml.Format(\"@@ -1478,7 +1478,7 @@
         return true;
     }

-    virtual csString ToString()
+    virtual csString ToString() const
     {
         csString xml;
         csString script_str = script.ToString(false);
@@ -1529,7 +1529,7 @@
         return true;
     }
     
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         psString xml;
     csString escpxml = EscpXML(name);
@@ -1694,7 +1694,7 @@
         return true;
     }
     
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         csString xml ;
         csString glyphUIDStr;
@@ -1827,7 +1827,7 @@
         return LoadValue(node,mgr,script);
     }
     
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         return \"\";
     }
@@ -1879,7 +1879,7 @@
     {
         return true;
     }
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         return \"\";
     }
@@ -1989,7 +1989,7 @@
         return true;
     }
     
-    virtual csString ToString()
+    virtual csString ToString() const
     {
         return \"\";
     }
@@ -2922,10 +2922,10 @@
 {
     csString xml;
     if (topLevel) xml.Append(\"\");
-    csArray::Iterator seq = sequence.GetIterator();
+    csArray::ConstIterator seq = sequence.GetIterator();
     while (seq.HasNext())
     {
-        ProgressionOperation * po = seq.Next();
+        const ProgressionOperation * po = seq.Next();
         xml.Append(po->ToString());
     }
     if (topLevel) xml.Append(\"
\");

okeuday

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
And here are the errors that were logged originally
« Reply #2 on: March 12, 2006, 06:15:25 am »
src/common/psbehave/psworld.cpp:622: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjspire.cpp:136: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjtext.cpp:214: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjquad.cpp:116: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjstar.cpp:125: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjtrail.cpp:146: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjparticles.cpp:112: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjsimpmesh.cpp:123: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/common/effects/pseffectobjmesh.cpp:100: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/server/progressionmanager.cpp:2925: error: conversion from `csArray, csArrayMemoryAllocator >::ConstIterator\' to non-scalar type `csArray, csArrayMemoryAllocator >::Iterator\' requested
src/server/gem.cpp:2080: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/client/entitylabels.cpp:323: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'
src/npcclient/walkpoly.cpp:756: error: invalid use of undefined type `struct iObjectModel\'
/home/george/organized/work/video_games/planeshift/src/CS/include/imesh/object.h:40: error: forward declaration of `struct iObjectModel\'

DaveG

  • Forum Addict
  • *
  • Posts: 2058
    • View Profile
(No subject)
« Reply #3 on: March 12, 2006, 07:17:40 am »
We are well aware of all changes required in the PS code for latest CS.  I have had them in mine for a while now.  (Though, the consting of the ToStrings is excessive.)

Use the dates listed in the topic of #planeshift-build and in the build guides on CVS.

You are the second person to post to this very forum on this exact topic...

We do not use HEAD in CS.  We\'d be vulnerable to bugs from every whim in there.  We update the freeze date ever so often, when we\'re confident in the stability of CS at a certain time.  We\'ll put out an update at some point, and it\'ll either have just the patched CS sound files, or a full CS date bump.

If you want to use latest, that\'s fine by me, but you don\'t need to flood here... of course we know about this.  :rolleyes:
« Last Edit: March 12, 2006, 07:19:51 am by DaveG »

::  PlaneShift Team Programmer  ::