Revolutionary-Games / Thrive

The main repository for the development of the evolution game Thrive.
https://revolutionarygamesstudio.com/
Other
2.83k stars 501 forks source link

Thrive CEGUI-9999 cmake configuration erros on Linux (Solus) #516

Closed SpencerCBrown closed 7 years ago

SpencerCBrown commented 7 years ago

I'm on an (unsupported) linux distribution with up to date packages. I've manually built and installed ogre and cegui-9999. Thrive has some errors detecting cegui. I tried with both the current cegui and then this commit https://gist.github.com/Clifspeare/1c7d70eb08cf1dc1c88fe375d3c6d99d

hhyyrylainen commented 7 years ago

CEGUIBase-9999_d Are you running cmake with cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo?

If you aren't that is probably the issue. You can reference SetupThrive.rb on how to set up thrive even if you don't want to run that script.

SpencerCBrown commented 7 years ago

I was, but I trashed my build dir/ cmake cache and did it again with release build type. This time it worked. Now getting this strange error:

CMake Error at CMakeLists.txt:644 (InstallFollowingSymlink):
  InstallFollowingSymlink Function invoked with incorrect arguments for
  function named: InstallFollowingSymlink

CMake Error at CMakeLists.txt:651 (InstallFollowingSymlink):
  InstallFollowingSymlink Function invoked with incorrect arguments for
  function named: InstallFollowingSymlink
hhyyrylainen commented 7 years ago

Did you build all the Ogre plugins (Plugin_ParticleFX, Plugin_CgProgramManager, RenderSystem_GL)? That piece of code goes through them all and probably fails like that if they don't exist

hhyyrylainen commented 7 years ago

I've written a better error message about this. I'll merge it once I finish working on my current branch

SpencerCBrown commented 7 years ago

That may indeed be the issue. I'll rebuild ogre and manually enable everything.

SpencerCBrown commented 7 years ago

I built ogre with the cmake args listed in the ruby script, but still have that error.
Complete cmake output

cmake --DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON -DOGRE_BUILD_RENDERSYSTEM_D3D9=OFF -DOGRE_BUILD_RENDERSYSTEM_D3D11=OFF -DOGRE_BUILD_COMPONENT_OVERLAY=OFF -DOGRE_BUILD_COMPONENT_PAGING=OFF -DOGRE_BUILD_COMPONENT_PROPERTY=OFF -DOGRE_BUILD_COMPONENT_TERRAIN=OFF -DOGRE_BUILD_COMPONENT_VOLUME=OFF -DOGRE_BUILD_PLUGIN_BSP=OFF -DOGRE_BUILD_PLUGIN_CG=ON -DOGRE_BUILD_PLUGIN_OCTREE=OFF -DOGRE_BUILD_PLUGIN_PCZ=OFF -DOGRE_BUILD_SAMPLES=OFF ..
hhyyrylainen commented 7 years ago

You might have to delete your current build folder (or just the cmake cache) in order for it to pickup the new ogre components.

hhyyrylainen commented 7 years ago

the log indicates that is actually found Found Ogre Xalafu (1.10.4). So you probably have installed that old version with a package manager and now it's conflicting with Ogre 2.0.

I don't know if it is possible to force cmake to only look for Ogre 2.0. So you might have to uninstall that

SpencerCBrown commented 7 years ago

My ignorance about mercurial is becoming evident. I thought I had checked out v2.1 but was apparently still building from default.

EDIT: Error still occurs, although now Ogre2.1 is found. I even tried using the script (just disabling the package dependency resolution), and it fails the same way.
newerror

EDIT2: Could this be because OpenAL package isn't found? I have it installed(the same implementation that e.g. thrive pulls in for Archlinux), but maybe its not the right version or something? I'll check in the thrive cmake to see if i can tell.

hhyyrylainen commented 7 years ago

We actually use Ogre v2-0.

But your error still seems to be caused by this:

        # Release
        InstallFollowingSymlink(
            ${OGRE_PLUGIN_LIB_REL}
            bin
            Release
            True
        )
        # Debug
        InstallFollowingSymlink(
            ${OGRE_PLUGIN_LIB_DBG}
            bin
            Debug
            True
        )

Which sets up all the ogre plugins to be installed. Are you sure you managed to compile all the Ogre plugins?

For me the Ogre plugins libraries are installed in /usr/local/lib/OGRE and the files are:

RenderSystem_GL3Plus.so
Plugin_CgProgramManager.so        RenderSystem_GL3Plus.so.2.0.0
Plugin_CgProgramManager.so.2.0.0  RenderSystem_GL.so
Plugin_ParticleFX.so              RenderSystem_GL.so.2.0.0
Plugin_ParticleFX.so.2.0.0

You can also add this piece of code above the snippet I posted above to get an error message about which library is missing:

        if(NOT EXISTS "${OGRE_PLUGIN_LIB_REL}" OR NOT EXISTS "${OGRE_PLUGIN_LIB_DBG}")
          message(SEND_ERROR "Ogre plugin file doesn't exist: ${OGRE_PLUGIN} . Did you build "
            "all the required Ogre plugins?")
        endif()

Of course if you don't plan on installing thrive globally (which isn't required, but you are probably missing required Ogre plugins so it probably won't run even if you get past this error) you could just erase that snippet starting at line 645.

SpencerCBrown commented 7 years ago

Ah, Plugin_CgProgramManager.so wasn't built for some reason. Everything working now. Thanks. I'm hoping to learn my way around the thrive codebase and start contributing.