#1031189 libogre-dev: Does not automatically derive plugin path

#1031189#5
Date:
2023-02-12 23:10:07 UTC
From:
To:
Dear Maintainer,

libogre-1.12-dev installs Ogre plugins to /usr/lib/x86_64-linux-gnu/OGRE -
however, by default, Ogre is not searching in this directory when loading
plugins at run time.

matthew@matthew-laptop:~$ ls /usr/lib/x86_64-linux-gnu/OGRE/RenderSystem_GL.so.1.12.10
/usr/lib/x86_64-linux-gnu/OGRE/RenderSystem_GL.so.1.12.10

When I try and load RenderSystem_GL using:

root.getRenderSystemByName("OpenGL Rendering Subsystem");

I see that Ogre searches the following locations:

Loading library RenderSystem_GL.so.1.12.10
      8615:	find library=RenderSystem_GL.so.1.12.10 [0]; searching
      8615:	 search cache=/etc/ld.so.cache
      8615:	 search path=/lib/x86_64-linux-gnu/tls/haswell/x86_64:/lib/x86_64-linux-gnu/tls/haswell:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/haswell/x86_64:/lib/x86_64-linux-gnu/haswell:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/haswell/x86_64:/usr/lib/x86_64-linux-gnu/tls/haswell:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/haswell/x86_64:/usr/lib/x86_64-linux-gnu/haswell:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/haswell/x86_64:/lib/tls/haswell:/lib/tls/x86_64:/lib/tls:/lib/haswell/x86_64:/lib/haswell:/lib/x86_64:/lib:/usr/lib/tls/haswell/x86_64:/usr/lib/tls/haswell:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/haswell/x86_64:/usr/lib/haswell:/usr/lib/x86_64:/usr/lib		(system search path)
      8615:	  trying file=/lib/x86_64-linux-gnu/tls/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64-linux-gnu/tls/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64-linux-gnu/tls/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64-linux-gnu/tls/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64-linux-gnu/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64-linux-gnu/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64-linux-gnu/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64-linux-gnu/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/tls/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/tls/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/tls/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64-linux-gnu/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/tls/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/tls/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/tls/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/tls/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/lib/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/tls/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/tls/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/tls/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/tls/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/haswell/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/haswell/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/x86_64/RenderSystem_GL.so.1.12.10
      8615:	  trying file=/usr/lib/RenderSystem_GL.so.1.12.10
      8615:

But cannot find the library in any of these paths, and throws the following
exception:

C++ exception with description "InternalErrorException: Could not load dynamic
library RenderSystem_GL.  System Error: RenderSystem_GL.so.1.12.10: cannot open
shared object file: No such file or directory in DynLib::load at
./OgreMain/src/OgreDynLib.cpp (line 113)" thrown in the test body.

I can work around this by adding:

PluginFolder=/usr/lib/x86_64-linux-gnu/OGRE

to the top of my plugins.cfg file. But, I was wondering if it would be possible
for the package to allow Ogre to derive the correct search path automatically -
perhaps using rpath?

Thanks for maintaining this package.
Matthew

#1031189#14
Date:
2023-02-15 22:27:39 UTC
From:
To:
Sorry for wasting your time, I think I was wrong to raise this bug and it can be
closed.

I see that /usr/lib/x86_64-linux-gnu/OGRE/cmake/OGREConfig.cmake defines
OGRE_PLUGIN_DIR, and that this path contains a plugins.cfg file that includes
the correct PluginFolder filepath.

Therefore, no magic is required - I simply needed to pass this variable to my
application.

Thanks again for maintaining this package - and thanks also Andreas for
moving on my report to the correct list,
Matthew

#1031189#19
Date:
2024-02-25 18:02:40 UTC
From:
To:
Closing per request of the submitter.