Could not load dynamic library RenderSystem_GL_d (Linux Debian) Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Stauricus
Kobold
Posts: 30
Joined: Sat May 04, 2013 10:26 pm
x 1

Could not load dynamic library RenderSystem_GL_d (Linux Debian)

Post by Stauricus »

hello everybody

i'm unable to run a simple OGRE program. i'm using Debian Testing and installed OGRE 1.9 from apt-get. i get the following error:
Loading library RenderSystem_GL_d
terminate called after throwing an instance of 'Ogre::InternalErrorException'
what(): OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library RenderSystem_GL_d. System Error: RenderSystem_GL_d.so.1.9.0: cannot open shared object file: No such file or directory in DynLib::load at /build/ogre-1.9-3EFEDQ/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreDynLib.cpp (line 109)
Aborted
however, if i search this file, it apparently doesn't exists anywhere. if i run in the terminal find / -iname "*RenderSystem_GL_d*" , it returns nothing. :(

this is the code:

Code: Select all

#include <OGRE/OgreRoot.h>
#include <OGRE/OgreRenderWindow.h>
#include <OGRE/OgreWindowEventUtilities.h>

int main{
    // the root
	Ogre::Root *root = new Ogre::Root("", "");

	// load the rendersystem
    	root->loadPlugin("RenderSystem_GL_d");
	root->setRenderSystem(*(root->getAvailableRenderers().begin()));
	root->initialise(false);

	// the window
	Ogre::RenderWindow *window = root->createRenderWindow("Hello World!", 800, 600, false);
	window->setActive(true);
	window->setAutoUpdated(true);
	window->setDeactivateOnFocusChange(false);

	Ogre::SceneManager *sceneMgr = root->createSceneManager(Ogre::ST_GENERIC);

	// viewport and camera
	Ogre::Camera *camera = sceneMgr->createCamera("cam");
	Ogre::Viewport *viewport = window->addViewport(camera);
	viewport->setClearEveryFrame(true);
	// TODO: set-up your camera

	// TODO: set-up your resources

	// TODO: set-up your lighting

	// TODO: create your objects

	// main loop
	while (true)
	{
		// TODO: do your game logic here

		Ogre::WindowEventUtilities::messagePump();

		if (!root->renderOneFrame())
			break;
	}

	// clean up
	delete root;
	return 0;
}
any help is appreciated. thanks in advance :)
User avatar
Stauricus
Kobold
Posts: 30
Joined: Sat May 04, 2013 10:26 pm
x 1

Re: Could not load dynamic library RenderSystem_GL_d (Linux Debian)

Post by Stauricus »

ok, i solved it.

form some reason, root->loadPlugin("RenderSystem_GL_d"); tries to point to "/usr/lib/i386-linux-gnu/OGRE-1.9.0/RenderSystem_GL.d.so.1.9.0", which doesn't exists. so i changed the line to

Code: Select all

root->loadPlugin("/usr/lib/i386-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0");
and now it's working. i didn't found any of the debug files, tough. i don't know if that's right :?
User avatar
Ybalrid
Halfling
Posts: 89
Joined: Thu Jul 10, 2014 6:52 pm
Location: France
x 31
Contact:

Re: Could not load dynamic library RenderSystem_GL_d (Linux Debian)

Post by Ybalrid »

Stauricus wrote: Sat Jan 13, 2018 2:37 am ok, i solved it.

form some reason, root->loadPlugin("RenderSystem_GL_d"); tries to point to "/usr/lib/i386-linux-gnu/OGRE-1.9.0/RenderSystem_GL.d.so.1.9.0", which doesn't exists. so i changed the line to

Code: Select all

root->loadPlugin("/usr/lib/i386-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0");
and now it's working. i didn't found any of the debug files, tough. i don't know if that's right :?
Well, hard-coding the path to the library is not really "fixing" anything. Your code will only work on your computer.

The _d version of the libraries are the "debug" version of them, intended to be used in debug builds (compiled with -d if you are calling g++ by hand, or with -DCMAKE_BUILD_TYPE=Debug when configuring the cmake build)

I have a few pointer, depending on your Ogre installation, so that I can help you properly solve the problem :

Have you built and installed Ogre by hand, or did you install it via your package manager on Debian?

:arrow: If you have built it yourself, did you forgot to build and install a "debug" version of the lib? (create another folder, set the build type variable to "Debug" and do the same you did, this will create all the "_d" versions of the libraries)

:arrow: If you have installed it via your package manager, check of the availability of a "-debug" or "-dbg" package that would contains the debug libraries for Ogre (looks like in the Debian case it is called libogre-1.9.0v5-dbg) If you forgot to install this one, that's probably why you can't find the library with the "_d" appended to it's name on your file system ;-)

I hope this helps :-)
Ogre_glTF Ogre v2-1 GLTF2 loader : topic link github repo
BtOgre21 Fork of btOgre, for Ogre v2-1 : topic link github repo
OIS Current maintainer : Official repository
Annwvyn VR focused game engine using Ogre : https://github.com/Ybalrid/Annwvyn https://annwvyn.org/
User avatar
Stauricus
Kobold
Posts: 30
Joined: Sat May 04, 2013 10:26 pm
x 1

Re: Could not load dynamic library RenderSystem_GL_d (Linux Debian)

Post by Stauricus »

hi,

i installed OGRE via package manager. i tried to install "libogre-1.9.0v5-dbg", but it's not available (seems that it is obsolete)
User avatar
Ybalrid
Halfling
Posts: 89
Joined: Thu Jul 10, 2014 6:52 pm
Location: France
x 31
Contact:

Re: Could not load dynamic library RenderSystem_GL_d (Linux Debian)

Post by Ybalrid »

Stauricus wrote: Tue Jan 23, 2018 1:36 am hi,

i installed OGRE via package manager. i tried to install "libogre-1.9.0v5-dbg", but it's not available (seems that it is obsolete)
Indeed, when looking at this package in the current testing:
https://packages.debian.org/testing/libogre-1.9-dev

It suggest you to install the -dbg one, but says that it's not available...

Maybe they just forgot about it. You may want to contact the maintainers for the package by mail (pkg-games-devel@lists.alioth.debian.org mafm@debian.org) about the missing debug libraries...

Or, if you want to do something yourself, your best shot at having debugging symbols available would be to build OGRE yourself from the source code... It's not really hard to do, and probably the good thing to do anyway since 1.9 is not the latest stable release of Ogre (1.10.11). (Unless you have a specific reason you want to use OGRE 1.9)
Ogre_glTF Ogre v2-1 GLTF2 loader : topic link github repo
BtOgre21 Fork of btOgre, for Ogre v2-1 : topic link github repo
OIS Current maintainer : Official repository
Annwvyn VR focused game engine using Ogre : https://github.com/Ybalrid/Annwvyn https://annwvyn.org/
User avatar
Stauricus
Kobold
Posts: 30
Joined: Sat May 04, 2013 10:26 pm
x 1

Re: Could not load dynamic library RenderSystem_GL_d (Linux Debian)

Post by Stauricus »

good, i'll try to contact them.
i used to build OGRE from source, but sometimes when i updated some of the required packages to build it, it stopped working. i don't know if that's supposed to happen, but then i just started using the compiled version from package manager for easiness.
thanks for the help :)
Post Reply