CMake refuses to find OSG on Debian testing

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Locked
Antsan
Posts: 47
Joined: 13 Mar 2014, 11:15

CMake refuses to find OSG on Debian testing

Post by Antsan »

I'm having a problem with the recommended way to compile OMW. I am on Debian testing 64bit.

That is, I cloned both open-mw and the openmw-specific version of osg. When running cmake on osg, I get the following warning:

Code: Select all

The build system is configured to install libraries to /usr/local/lib64
Your applications may not be able to find your installed libraries unless you:
    set your LD_LIBRARY_PATH (user specific) or
    update your ld.so configuration (system wide)
You have an ld.so.conf.d directory on your system, so if you wish to ensure that
applications find the installed osg libraries, system wide, you could install an
OpenSceneGraph specific ld.so configuration with:
    sudo make install_ld_conf
So I run
sudo make install_ld_conf
, compile and install osg, and then proceed do open-mw itself.

When running cmake on open-mw I am told that osg has not been found:

Code: Select all

-- Could NOT find osgDB (missing:  OSGDB_LIBRARY) 
-- Could NOT find osgViewer (missing:  OSGVIEWER_LIBRARY) 
-- Could NOT find osgText (missing:  OSGTEXT_LIBRARY) 
-- Could NOT find osgGA (missing:  OSGGA_LIBRARY) 
-- Could NOT find osgAnimation (missing:  OSGANIMATION_LIBRARY) 
-- Could NOT find osgParticle (missing:  OSGPARTICLE_LIBRARY) 
-- Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY) 
-- Could NOT find osgFX (missing:  OSGFX_LIBRARY) 
-- Could NOT find osg (missing:  OSG_LIBRARY) 
-- Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY) 
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_LIBRARIES
  OSGDB_FOUND OSGVIEWER_FOUND OSGTEXT_FOUND OSGGA_FOUND OSGANIMATION_FOUND
  OSGPARTICLE_FOUND OSGUTIL_FOUND OSGFX_FOUND OSG_FOUND OPENTHREADS_FOUND)
  (found suitable version "3.4.0", minimum required is "3.3.4")
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindOpenSceneGraph.cmake:234 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:228 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/thomas/Downloads/Spiele/OpenMW/openmw/build/CMakeFiles/CMakeOutput.log".
See also "/home/thomas/Downloads/Spiele/OpenMW/openmw/build/CMakeFiles/CMakeError.log".
(CMakeOutput.log and CMakeError.log attached)
I have no idea how to either tell osg to be installed somewhere where cmake can find it[1] or how to tell cmake in open-mw where to find osg.

Information on cmake I find seems all to be about how to use cmake as a developer.

[1] It's a warning by cmake. Why doesn't that tell me how to do this?
Attachments
CMakeError.log
(9.11 KiB) Downloaded 351 times
CMakeOutput.log
(44.37 KiB) Downloaded 321 times
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: CMake refuses to find OSG on Debian testing

Post by scrawl »

Have you tried running `sudo ldconfig` after installing the new ld configuration file?
Antsan
Posts: 47
Joined: 13 Mar 2014, 11:15

Re: CMake refuses to find OSG on Debian testing

Post by Antsan »

Yep, doesn't change a thing.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: CMake refuses to find OSG on Debian testing

Post by scrawl »

Ok, then the next thing I would check is: do you have /usr/local/lib/pkgconfig in your list of pkgconfig search paths?

Code: Select all

pkg-config --variable pc_path pkg-config
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
If not, then preprend a PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH before the cmake call.

Edit: ignore what I just wrote, FindOSG doesn't even use pkg-config.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: CMake refuses to find OSG on Debian testing

Post by scrawl »

Try this, then:

Code: Select all

cmake -DCMAKE_LIBRARY_PATH=/usr/local/lib64 <path/to/openmw_sources>
Antsan
Posts: 47
Joined: 13 Mar 2014, 11:15

Re: CMake refuses to find OSG on Debian testing

Post by Antsan »

Yay! This seems to have done the trick. cmake went through without errors. make is doing its thing right now.

Thank you very much!
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: CMake refuses to find OSG on Debian testing

Post by psi29a »

Just wanted to chime in that later versions of cmake don't work with this suggestions, instead you can suggest this: -DCMAKE_SYSTEM_PREFIX_PATH=<path to lib>

Code: Select all

-- [ FindOpenSceneGraph.cmake:121 ] Components = osgDB;osgViewer;osgText;osgGA;osgParticle;osgUtil;osgFX;osgShadow;osg;OpenThreads
-- [ FindOpenSceneGraph.cmake:136 ] Detected OSG_INCLUDE_DIR = /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/include
-- [ FindOpenSceneGraph.cmake:179 ] Detected version 3.6.5
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgDB  )
-- Found osgDB: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgDB.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgViewer  )
-- Found osgViewer: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgViewer.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgText  )
-- Found osgText: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgText.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgGA  )
-- Found osgGA: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgGA.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgParticle  )
-- Found osgParticle: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgParticle.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgUtil  )
-- Found osgUtil: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgUtil.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgFX  )
-- Found osgFX: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgFX.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osgShadow  )
-- Found osgShadow: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgShadow.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(osg  )
-- Found osg: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosg.so  
-- [ FindOpenSceneGraph.cmake:193 ] Calling find_package(OpenThreads  )
-- Found OpenThreads: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libOpenThreads.so  
-- Found OpenSceneGraph: /home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgDB.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgViewer.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgText.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgGA.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgParticle.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgUtil.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgFX.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosgShadow.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libosg.so;/home/psi29a/workspace/openmw/OSG/osg/cmake-build-relwithdebinfo/lib/libOpenThreads.so (found suitable version "3.6.5", minimum required is "3.3.4") 
Locked