[solved] How to build MyGui with latest Ogre 1.13 on Debian

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

[solved] How to build MyGui with latest Ogre 1.13 on Debian

Post by Crystal Hammer »

Ogre Version: latest 1.13.4
Operating System: Debian 11
Render System: GL3+

Hi. I thought I'll just ask before I go again and fill all the OGRE_ paths again myself as before (I had this experience on Windows too).
Can someone please explaing how should I build MyGui, the easiest way, after building Ogre from sources?
I got latest Ogre 1.13 from git, into

Code: Select all

/home/ch/_sr/og13

and it has built fine in

Code: Select all

/home/ch/_sr/og13/bin

Now I want to set up MyGui in CMake to use that version, and not Ogre 1.9 that I have got from apt-get in Debian.
There are some env vars like

Code: Select all

OGRE_HOME
OGRE_SDK
OGRE_SOURCE
OGRE_BUILD

What should I set here to what path.
I tried setting them in FindOGRE.cmake to paths with /og13 and nothing really matters
Whatever I set, then MyGui CMake does this:

Code: Select all

Configuring MYGUI 3.4.2
Detected g++ 10

Enabling GCC visibility flags
Looking for OGRE...
Found Ogre  (..)
Found OGRE: /usr/lib/x86_64-linux-gnu/libOgreMain.so
Looking for OGRE_Paging...
Found OGRE_Paging: /usr/lib/x86_64-linux-gnu/libOgrePaging.so
Looking for OGRE_Terrain...

Finding something from /usr/lib/ which it should not.

Last edited by Crystal Hammer on Mon Aug 15, 2022 12:54 pm, edited 2 times in total.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by paroj »

you will have to set OGRE_DIR to the location of OGREConfig.cmake - see https://ogrecave.github.io/ogre/api/lat ... html#cmake

if FindOGRE.cmake is used, it is not working.

User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by Crystal Hammer »

Allright. I'm trying this again.
I got Ogre tag 1.13.4 and it has built fine.
I've added a line:

Code: Select all

export OGRE_DIR=/home/ch/_sr/og13n/bin/cmake

inside /home/ch/.bashrc and in .profile files and restarted (seems needed).
Now I'm trying to configure with cmake-gui MyGui, latest master and I get this:

Code: Select all

Configuring MYGUI 3.4.2
Detected g++ 10

Enabling GCC visibility flags
Looking for OGRE...
CMake Error at /usr/share/OGRE/cmake/modules/FindOGRE.cmake:78 (get_debug_names):
  Unknown CMake command "get_debug_names".
Call Stack (most recent call first):
  CMake/Packages/FindOGRE_Old.cmake:44 (FIND_PACKAGE)
  CMake/Dependencies.cmake:51 (find_package)
  CMakeLists.txt:188 (include)


Configuring incomplete, errors occurred!
See also "/home/ch/_sr/myg13/bin/CMakeFiles/CMakeOutput.log".

I have cmake version 3.18.4, any ideas what to do?

paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by paroj »

Crystal Hammer wrote: Sun Aug 14, 2022 9:18 am

Allright. I'm trying this again.
I got Ogre tag 1.13.4 and it has built fine.
I've added a line:

this did not work as you still end up with

CMake/Packages/FindOGRE_Old.cmake:44 (FIND_PACKAGE)

the correct call would be something like:

Code: Select all

mygui/build $ cmake -DOGRE_DIR=/usr/local/lib/OGRE/cmake/ ..

where /usr/local is the path where you installed Ogre to.

If that worked, you should not end up in any of the FindOGRE.cmake scripts.

User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by Crystal Hammer »

Okay. I got a couple of questions then.
Should I install this newly built Ogre 1.13.4? If so, how?

Code: Select all

make install

doesn't work.

So I'm starting

Code: Select all

mygui/build $ cmake -DOGRE_DIR=/usr/local/lib/OGRE/cmake/ ..

should this OGRE path be:

Code: Select all

/home/ch/_sr/og13n/bin/cmake/

where OGREConfig.cmake is
or

Code: Select all

/home/ch/_sr/og13n/CMake

where there are many other cmake files and subdirs.

sadly both give me the same error

Code: Select all

ch@deb11:~/_sr/myg13/bin2$ cmake -DOGRE_DIR=/home/ch/_sr/og13n/bin/cmake/ ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring MYGUI 3.4.2
-- Performing Test MYGUI_GCC_VISIBILITY
-- Performing Test MYGUI_GCC_VISIBILITY - Success
-- Detected g++ 10

-- Enabling GCC visibility flags
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.10.4") 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found SDL2: /usr/include/SDL2 (found version "2.0.14") 
-- Looking for OGRE...
CMake Error at /usr/share/OGRE/cmake/modules/FindOGRE.cmake:78 (get_debug_names):
  Unknown CMake command "get_debug_names".
Call Stack (most recent call first):
  CMake/Packages/FindOGRE_Old.cmake:44 (FIND_PACKAGE)
  CMake/Dependencies.cmake:51 (find_package)
  CMakeLists.txt:188 (include)


-- Configuring incomplete, errors occurred!
See also "/home/ch/_sr/myg13/bin2/CMakeFiles/CMakeOutput.log".
ch@deb11:~/_sr/myg13/bin2$ 
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by paroj »

Crystal Hammer wrote: Sun Aug 14, 2022 6:29 pm

Okay. I got a couple of questions then.
Should I install this newly built Ogre 1.13.4?

yes

Crystal Hammer wrote: Sun Aug 14, 2022 6:29 pm

If so, how?

Code: Select all

make install

doesn't work.

why not?

User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by Crystal Hammer »

Ah okay I needed

Code: Select all

ninja install
User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by Crystal Hammer »

Well I did ninja install (as su) in Ogre dir, worked fine, I see 1.13 binaries in /usr/local/lib/OGRE and cmake subdir. Restarted PC even.
Made a new folder for MyGui, cloned, started CMake Gui there and I get again the same error on configure.
I can't even, what on earth is happening on my setup.
I did run env to see env. vars and there is only this with OGRE in name:
OGRE_DIR=/home/ch/_sr/og13n/bin/cmake
also
PATH=/home/ch/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
IDK

User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

Re: How to build MyGui with latest Ogre 1.13

Post by Crystal Hammer »

Ok. I edited MyGui file in
/CMake/Packages/FindOGRE_Old.cmake
and replaced

Code: Select all

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} /usr/lib/OGRE/cmake/ /usr/local/lib/OGRE/cmake /usr/share/OGRE/cmake/modules /usr/local/share/OGRE/cmake/modules)

to

Code: Select all

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} /usr/local/lib/OGRE/cmake /usr/local/share/OGRE/cmake/modules)

and cmake succeded.
just got this

Code: Select all

Configuring done
CMake Error in Platforms/Ogre/OgrePlatform/CMakeLists.txt:
  Imported target "OgreBullet" includes non-existent path

"/usr/local/include/bullet"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

So I make an empty bullet dir there and it worked.

MyGui has built fine now too.
And binaries are starting now, after I edited plugins.cfg in /bin/bin subdir to:

Code: Select all

# Defines plugins to load

# Define plugin folder
PluginFolder=/usr/local/lib/OGRE/

# Define plugins
Plugin=RenderSystem_GL
Plugin=Codec_FreeImage
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: [solved] How to build MyGui with latest Ogre 1.13 on Debian

Post by paroj »

oof.. MyGUI is actually still using the old FindOGRE.cmake approach. I thought I contributed something like this at one point:
https://github.com/stuntrally/stuntrall ... xt#L86-L93

the CONFIG approach is much more robust when you have multiple versions of Ogre installed (you seem to have another install in /usr/).

Post Reply