Robotics StackExchange | Archived questions

No rule to make target libOgreMain.so when building ign-rendering under Debian 10

I'm attempting to get Ignition Citadel built under Debian 10 and feel I'm pretty close. I'm getting the following make error while building ign-rendering:

make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libOgreMain.so', needed by 'lib/libignition-rendering3-ogre.so.3.0.0'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:2642: ogre/src/CMakeFiles/ignition-rendering3-ogre.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

My CMake output for ign-rendering is:

ignition/build/ignition-rendering3$ cmake ../../src/ign-rendering/
-- ignition-rendering3 version 3.0.0
-- Operating system is Linux
-- Found CPack generators: DEB
-- Looking for ignition-math6 -- found version 6.4.0
-- Searching for dependencies of ignition-math6
-- Looking for ignition-math6 - found

-- Looking for ignition-common3 -- found version 3.3.0
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Checking for module 'uuid'
--   Found uuid, version 2.33.1
-- Searching for <ignition-common3> component [graphics]
-- Looking for ignition-common3-graphics -- found version 3.3.0
-- Searching for dependencies of ignition-common3-graphics
-- Looking for ignition-math6 -- found version 6.4.0
-- Searching for <ignition-common3> component [events]
-- Looking for ignition-common3-events -- found version 3.3.0
-- Searching for dependencies of ignition-common3-events
-- Looking for ignition-math6 -- found version 6.4.0
-- Looking for ignition-common3 - found

-- Looking for ignition-plugin1 -- found version 1.1.0
-- Searching for dependencies of ignition-plugin1
-- Searching for <ignition-plugin1> component [all]
-- Looking for all libraries of ignition-plugin1 -- found version 1.1.0
-- Looking for ignition-plugin1 -- found version 1.1.0
-- Looking for ignition-plugin1-loader -- found version 1.1.0
-- Searching for dependencies of ignition-plugin1-loader
-- Looking for ignition-plugin1-register -- found version 1.1.0
-- Searching for dependencies of ignition-plugin1-register
-- Looking for ignition-plugin1 - found

-- Looking for FreeImage - found

CMake Warning (dev) at /usr/share/cmake-3.13/Modules/FindOpenGL.cmake:270 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  /home/code/ignition/install/ignition-cmake2/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:188 (find_package)
  CMakeLists.txt:52 (ign_find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for OpenGL - found

-- Checking for module 'OGRE-RTShaderSystem >= 1.8'
--   Found OGRE-RTShaderSystem , version 1.9.0
-- Checking for module 'OGRE-Terrain >= 1.8'
--   Found OGRE-Terrain , version 1.9.0
-- Checking for module 'OGRE-Overlay >= 1.8'
--   Found OGRE-Overlay , version 1.9.0
-- Looking for IgnOGRE - found

-- Boost version: 1.67.0
-- Looking for IgnOGRE2 - found

CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) 
-- optix library not found.  Please locate before proceeding.
-- OptiX headers (optix.h and friends) not found.  Please locate before proceeding.
-- optix Prime library not found.  Please locate before proceeding.
-- Could NOT find OptiX (missing: OptiX_FOUND) (Required is at least version "3.8.0")
-- Looking for OptiX - not found

-- BUILD WARNINGS
--  Cannot build component [optix] - Missing: OptiX
-- END BUILD WARNINGS

-- 
-- Searching for host SSE information
-- SSE2 found
-- SSE3 found
-- SSE4.1 found
-- SSE4.2 found
-- Configuring library: ignition-rendering3
-- Adding 23 UNIT tests
-- Adding 7 INTEGRATION tests
-- Adding 1 PERFORMANCE tests
-- No tests have been specified for REGRESSION
-- Configuring library: ignition-rendering3-ogre
CMake Warning (dev) at /home/code/ignition/install/ignition-cmake2/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:1241 (target_link_libraries):
  Policy CMP0079 is not set: target_link_libraries allows use with targets in
  other directories.  Run "cmake --help-policy CMP0079" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target

    ignition-rendering3-all

  is not created in this directory.  For compatibility with older versions of
  CMake, link library

    ignition-rendering3-ogre

  will be looked up in the directory in which the target was created rather
  than in this calling directory.
Call Stack (most recent call first):
  ogre/src/CMakeLists.txt:5 (ign_add_component)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- No tests have been specified for UNIT
-- Configuring library: ignition-rendering3-ogre2
CMake Warning (dev) at /home/code/ignition/install/ignition-cmake2/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:1241 (target_link_libraries):
  Policy CMP0079 is not set: target_link_libraries allows use with targets in
  other directories.  Run "cmake --help-policy CMP0079" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target

    ignition-rendering3-all

  is not created in this directory.  For compatibility with older versions of
  CMake, link library

    ignition-rendering3-ogre2

  will be looked up in the directory in which the target was created rather
  than in this calling directory.
Call Stack (most recent call first):
  ogre2/src/CMakeLists.txt:5 (ign_add_component)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- No tests have been specified for UNIT
-- The program [cppcheck] was not found! Skipping codecheck setup
-- Build configuration successful
-- Build type: RelWithDebInfo
-- Install prefix: /home/code/ignition/install/ignition-rendering3
-- Configuring done
-- Generating done
-- Build files have been written to: /home/code/ignition/build/ignition-rendering3

I followed the Ubuntu Bionic Source Install steps (https://ignitionrobotics.org/docs/citadel/install_ubuntu_src) for the most part. Key differences are building some deps from source that are not available as packages in Debian 10 stable or back-ports. I built dart v6.9.2 from source and the OSRF fork of Ogre 2.1 from here (https://github.com/osrf/ogre-2.1-release). With respect to Ogre 2.1, I used commit hash e406949420fa1b2195f0f3d9f7c9546c8a78ff40 as the latest commit seems to have broken things. I generated deb packages by running fakeroot debian/rules from the ogre-2.1-release folder and then installed them with sudo dpkg -i *.deb. ign-rendering CMake seems to be happy with the dual 1.9, 2.1 install.

In terms of libOgreMain.so installed on my system, you can see it here:

ls -la /usr/lib/x86_64-linux-gnu/ | grep libOgre
-rw-r--r--   1 root root   108872 Nov 17  2018 libOgreHlmsPbsMobile.so.2.1.0
-rw-r--r--   1 root root   403904 Nov 17  2018 libOgreHlmsPbs.so.2.1.0
-rw-r--r--   1 root root    84448 Nov 17  2018 libOgreHlmsUnlitMobile.so.2.1.0
-rw-r--r--   1 root root   157704 Nov 17  2018 libOgreHlmsUnlit.so.2.1.0
lrwxrwxrwx   1 root root       20 Nov 17  2018 libOgreMain.so -> libOgreMain.so.1.9.0
-rw-r--r--   1 root root  6489352 Nov 17  2018 libOgreMain.so.2.1.0
-rw-r--r--   1 root root   305160 Nov 17  2018 libOgreMeshLodGenerator.so.2.1.0
lrwxrwxrwx   1 root root       23 Nov 17  2018 libOgreOverlay.so -> libOgreOverlay.so.1.9.0
-rw-r--r--   1 root root   993576 Nov 17  2018 libOgreOverlay.so.2.1.0
lrwxrwxrwx   1 root root       22 Nov 17  2018 libOgrePaging.so -> libOgrePaging.so.1.9.0
lrwxrwxrwx   1 root root       24 Nov 17  2018 libOgreProperty.so -> libOgreProperty.so.1.9.0
lrwxrwxrwx   1 root root       30 Nov 17  2018 libOgreRTShaderSystem.so -> libOgreRTShaderSystem.so.1.9.0
lrwxrwxrwx   1 root root       23 Nov 17  2018 libOgreTerrain.so -> libOgreTerrain.so.1.9.0
lrwxrwxrwx   1 root root       22 Nov 17  2018 libOgreVolume.so -> libOgreVolume.so.1.9.0

I understand that Debian 10 is not strictly supported, any help would be greatly appreciated.

Asked by adamwtow on 2020-02-07 22:34:58 UTC

Comments

Seems like it can not locate /usr/lib/x86_64-linux-gnu/libOgreMain.so. Is it in your filesystem? Should be part of libogre-1.9-dev package https://packages.debian.org/buster/amd64/libogre-1.9-dev/filelist.

Asked by Jose Luis Rivero on 2020-02-08 14:58:02 UTC

Ahh thank you. I incorrectly presumed my output of ls -la above meant that libOgreMain.so.1.9.0 was on my system. It wasn't. All sorted now. Thanks again.

Asked by adamwtow on 2020-02-11 00:31:18 UTC

Answers