About Store Forum Documentation Contact



Post Reply 
Changes needed to Compile/Run on Ubuntu 22.04
Author Message
Fex Offline
Gold Supporter

Post: #1
Changes needed to Compile/Run on Ubuntu 22.04
Ubuntu 22.04 LTS. Tried on both X11 and Wayland, Nvidia and AMD GPUs. glxgears and glmark2 all worked fine on the systems. glxinfo | grep -i opengl also said everything is good. But always would get:

"Couldn't find valid GL Config"

When trying to run the Engine Builder.

Needed to change Windows.cpp like this:

Code:
// GL Config
   int attribs[]=
   {
      GLX_X_RENDERABLE , true,
      GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
      GLX_RENDER_TYPE  , GLX_RGBA_BIT,
      GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR,
      GLX_RED_SIZE     , 8,
      GLX_GREEN_SIZE   , 8,
      GLX_BLUE_SIZE    , 8,
      GLX_ALPHA_SIZE   , 8,
   //#if SUPPORT_STENCIL
   //   GLX_DEPTH_SIZE   , 24,
    //  GLX_STENCIL_SIZE , 8,
   //#else
   //   GLX_DEPTH_SIZE   , 32,
    //  GLX_STENCIL_SIZE , 0,
   //#endif
      GLX_DOUBLEBUFFER , true,
   #if LINEAR_GAMMA && 0 // disable because this fails on Ubuntu 21.04
      GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, LINEAR_GAMMA,
   #endif
      NULL // end of list
   };
   int count=0; if(GLXFBConfig *fbc=glXChooseFBConfig(XDisplay, DefaultScreen(XDisplay), attribs, &count))
   {
      if(count>=1)GLConfig=fbc[0];
      XFree(fbc);
   }
   if(!GLConfig)Exit("Couldn't find valid GL Config");

Next, running the engine builder (all things checked, select "Do selected")

Get this error:

Code:
./../../../Editor/Bin/Engine/_/inline.h:1798:90: error: no member named 'cleanup' in 'Cache<TYPE>'; did you mean simply 'cleanup'?
T1(TYPE)  Cache<TYPE>&  Cache<TYPE>::cleanup       (               ) {                   super::cleanup       (         ); return T;}

Changed inline.h like this:

Code:
/******************************************************************************/
// CACHE
/******************************************************************************/
T1(TYPE)  Cache<TYPE>&  Cache<TYPE>::clear         (               ) {                   super::clear         (         ); return T;}
T1(TYPE)  Cache<TYPE>&  Cache<TYPE>::del           (               ) {                   super::del           (         ); return T;}
//T1(TYPE)  Cache<TYPE>&  Cache<TYPE>::cleanup       (               ) {                   super::cleanup       (         ); return T;}
T1(TYPE) Cache<TYPE>& Cache<TYPE>::cleanup() {
    _Cache::cleanup(); // Replace `super` with `_Cache`
    return *this;
}

And moved cleanup to "protected"

Code:
struct _Cache // Cache (base) - Do not use this class, use 'Cache' instead
{
   struct Desc
   {
      Str  file; // file name
      UInt flag, ptr_num;
   };
   struct Elm
   {
   };

   Int elms()C {return _elms;}

   void   lock()C;
   void unlock()C;

~_Cache() {del();}

protected:
   void cleanup(); // Now accessible to derived classes

Next got these errors during Editor building step:

Code:
./../../../Editor/Bin/Engine/File/Pak.h:369:9: error: no member named 'close' in 'EE::File'
      f.close(); return false;
      ~ ^
./../../../Editor/Bin/Engine/File/Pak.h:416:11: error: 'name' is a private member of 'EE::SPak'
      if(!name.is())return true;
          ^
./../../../Editor/Bin/Engine/File/Pak.h:322:9: note: declared private here
   Str  name;
        ^
./../../../Editor/Bin/Engine/File/Pak.h:417:22: error: 'name' is a private member of 'EE::SPak'
      Str  temp_name=name+"@new";
                     ^
./../../../Editor/Bin/Engine/File/Pak.h:322:9: note: declared private here
   Str  name;

Had to make these changes..

Moved void close() out of private in File.h:
Code:
struct File
{
    void close    (        ); // close the file without releasing helper memory
   // manage
#if EE_PRIVATE
   void zeroNoBuf(        );
   void zero     (        );
   void delBuf   (        );
   Bool setBuf   (Int size); // set the buffer to be at least of 'size', false on fail
  
#endif

Made this change in Pak.h:

Moved name out of private in the SPak struct
Code:
Str  name;
#if !EE_PRIVATE
private:
#endif
   File f;
   //Str  name;
   Memc<DataRangeAbs> used_file_ranges;
};

With these changes the Editor runs.
04-04-2024 05:49 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Changes needed to Compile/Run on Ubuntu 22.04
Thank you very much smile
I have fixed all problems.
Please check
04-04-2024 11:20 AM
Find all posts by this user Quote this message in a reply
Fex Offline
Gold Supporter

Post: #3
RE: Changes needed to Compile/Run on Ubuntu 22.04
Confirmed netbeans engine build + engine builder project + Titan editor all compile/run as expected on:
Ubuntu 22.04.4 LTS
OpenGL renderer string: AMD Radeon RX 6650 XT (navi23, LLVM 15.0.7, DRM 3.54, 6.5.0-26-generic)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2

With commit 06235fdd8ba82c1d190181389cc999bfe1612e16 thank you.
04-05-2024 06:21 PM
Find all posts by this user Quote this message in a reply
Post Reply