[osg-users] [vpb] Building Virtual Planet Builder in Linux

88 views
Skip to first unread message

Nav Joseph

unread,
Sep 11, 2012, 5:21:28 AM9/11/12
to osg-...@lists.openscenegraph.org
I saw that installing OSG on Linux would be easy, so gave it a shot on RHEL6.x.
OSG built without any problems, and I set the paths mentioned in this page (http://www.openscenegraph.org/projects/osg/wiki/Support/GettingStarted).

But when I created a git clone of virtualplanetbuilder and typed the ./configure of VPB, it gave me this error:

Code:
[root@static-104 vpb]# ./configure
-- Could NOT find osgDB (missing: OSGDB_LIBRARY OSGDB_INCLUDE_DIR)
-- Could NOT find osgFX (missing: OSGFX_LIBRARY OSGFX_INCLUDE_DIR)
-- Could NOT find osgUtil (missing: OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)
-- Could NOT find osgSim (missing: OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR)
-- Could NOT find osgTerrain (missing: OSGTERRAIN_LIBRARY OSGTERRAIN_INCLUDE_DIR)
-- Could NOT find osgViewer (missing: OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)
-- Could NOT find osgGA (missing: OSGGA_LIBRARY OSGGA_INCLUDE_DIR)
-- Could NOT find osgText (missing: OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR)
-- Could NOT find osg (missing: OSG_LIBRARY OSG_INCLUDE_DIR)
-- Could NOT find OpenThreads (missing: OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
CMake Error at /usr/local/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake:226 (message):
ERROR: Missing the following osg libraries: osgDB osgFX osgUtil osgSim
osgTerrain osgViewer osgGA osgText osg OpenThreads.

Consider using CMAKE_PREFIX_PATH or the OSG_DIR environment variable. See
the /usr/local/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake for more
details.
Call Stack (most recent call first):
CMakeLists.txt:174 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!




My main question is what can I do to solve this kind of error. I looked at the CMake lists but that does not seem to be the problem.

Additional info:
Although osg had built without any problems, I'm not able to render anything with the viewer.

Code:
[root@static-104 osg]# export PATH={$PATH}:/home/nav/osg/osg/bin
[root@static-104 osg]# export OSG_FILE_PATH=/home/nav/osg/osgdata
[root@static-104 osg]# osgviewer cow.osg
Warning: Could not find plugin to read objects from file "cow.osg".
osgviewer: No data loaded


Did I miss something?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49915#49915





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Tassilo Glander

unread,
Sep 11, 2012, 5:33:44 AM9/11/12
to osg-...@lists.openscenegraph.org
Hi Nav,

sounds like the libraries are not found at the usual places, both for the plugins (that is why the cow is not loading) and for the configuration of VPB. Did you do the "sudo make install"?
Also sometimes I had to do "ldconfig" when I installed new libraries for the first time.

I am not too familiar with linux, these are just ideas until the experts join :)

Thank you!

Cheers,
Tassilo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49917#49917

Jordi Torres

unread,
Sep 11, 2012, 5:35:38 AM9/11/12
to osg-...@lists.openscenegraph.org
Hi Nav,



2012/9/11 Nav Joseph <nk...@tatapowersed.com>

I saw that installing OSG on Linux would be easy, so gave it a shot on RHEL6.x.
OSG built without any problems, and I set the paths mentioned in this page (http://www.openscenegraph.org/projects/osg/wiki/Support/GettingStarted).

But when I created a git clone of virtualplanetbuilder and typed the ./configure of VPB, it gave me this error:

Code:
[root@static-104 vpb]# ./configure
-- Could NOT find osgDB (missing:  OSGDB_LIBRARY OSGDB_INCLUDE_DIR)
-- Could NOT find osgFX (missing:  OSGFX_LIBRARY OSGFX_INCLUDE_DIR)
-- Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)
-- Could NOT find osgSim (missing:  OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR)
-- Could NOT find osgTerrain (missing:  OSGTERRAIN_LIBRARY OSGTERRAIN_INCLUDE_DIR)
-- Could NOT find osgViewer (missing:  OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)
-- Could NOT find osgGA (missing:  OSGGA_LIBRARY OSGGA_INCLUDE_DIR)
-- Could NOT find osgText (missing:  OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR)
-- Could NOT find osg (missing:  OSG_LIBRARY OSG_INCLUDE_DIR)
-- Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
CMake Error at /usr/local/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake:226 (message):
  ERROR: Missing the following osg libraries: osgDB osgFX osgUtil osgSim
  osgTerrain osgViewer osgGA osgText osg OpenThreads.

  Consider using CMAKE_PREFIX_PATH or the OSG_DIR environment variable.  See
  the /usr/local/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake for more
  details.
Call Stack (most recent call first):
  CMakeLists.txt:174 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!



Use the environment variable OSG_DIR before configuring (export OSG_DIR=/path_to_osg_install_dir/). If you have compiled and installed osg without problems you should have the subfolders include/ lib/ share/ bin/ in your installation folder. 

 


My main question is what can I do to solve this kind of error. I looked at the CMake lists but that does not seem to be the problem.

Additional info:
Although osg had built without any problems, I'm not able to render anything with the viewer.

Code:
[root@static-104 osg]# export PATH={$PATH}:/home/nav/osg/osg/bin
[root@static-104 osg]# export OSG_FILE_PATH=/home/nav/osg/osgdata
[root@static-104 osg]# osgviewer cow.osg
Warning: Could not find plugin to read objects from file "cow.osg".
osgviewer: No data loaded


In linux you must export LD_LIBRARY_PATH to the osg/lib/ dir to make visible this dynamic libraries to the osgviewer application. Search the archives for similar topics (Could not find plugin to read objetcs ....).

Cheers.
 

Did I miss something?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49915#49915





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Jordi Torres Fabra

gvSIG 3D blog
http://gvsig3d.blogspot.com
Instituto de Automática e Informática Industrial
http://www.ai2.upv.es

Jordi Torres

unread,
Sep 11, 2012, 5:39:44 AM9/11/12
to osg-...@lists.openscenegraph.org


2012/9/11 Jordi Torres <jtorre...@gmail.com>

Missed to say this is in case you are installing OSG in a custom directory.
 
Cheers.
 

Did I miss something?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49915#49915





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Jordi Torres Fabra

gvSIG 3D blog
http://gvsig3d.blogspot.com
Instituto de Automática e Informática Industrial
http://www.ai2.upv.es

Nav Joseph

unread,
Sep 11, 2012, 6:41:23 AM9/11/12
to osg-...@lists.openscenegraph.org
Thanks Jordi;
I have 'lib', 'bin' and 'include' in my osg folder, but no 'share' directory.
Viewer is working now! :-)
I had to type

Code:
./osgviewer "cow.osg"



I was getting an error of a cannot open display and the viewer not being able to create a window, but that was because I was the root user. Running viewer as an ordinary user made it work.

Framerate is surprisingly low, at just 6.1fps.

VPB found all the plugins it was earlier unable to find (except gdal, which I'll be installing now). Thanks so much! :-)

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49920#49920

Jordi Torres

unread,
Sep 11, 2012, 6:46:35 AM9/11/12
to osg-...@lists.openscenegraph.org
2012/9/11 Nav Joseph <nk...@tatapowersed.com>
Thanks Jordi;
I have 'lib', 'bin' and 'include' in my osg folder, but no 'share' directory.

Yes, the 'share' directory appears when you compile and install the osg examples.
 
Viewer is working now! :-)
I had to type

Code:
./osgviewer "cow.osg"
 


I was getting an error of a cannot open display and the viewer not being able to create a window, but that was because I was the root user. Running viewer as an ordinary user made it work.

Framerate is surprisingly low, at just 6.1fps.

Maybe you didn't install your graphic card drivers OK. Check if you have direct rendering  and your drivers are ok with the command glxinfo.
 

VPB found all the plugins it was earlier unable to find (except gdal, which I'll be installing now). Thanks so much! :-)


You might need to recompile osg with Gdal library.

Cheers.
 
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49920#49920





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Nav Joseph

unread,
Sep 12, 2012, 2:17:08 AM9/12/12
to osg-...@lists.openscenegraph.org
@Jordi: Thanks for the timely reply. It helped me get things done fast. I see why a mailing list is beneficial.
Checked with glxinfo, and I do have direct rendering. Don't know what info indicates that my drivers are ok though. But I guess that doesn't matter because I haven't installed the linux drivers for the graphics card. The driver software tells me that I need to remove Nouveau first. Will be doing that soon.

How to compile osg with gdal? I had a look at the CMake files, but there didn't seem to be any option for gdal. Do I have to run cmake with a command like

Code:
cmake ../osg -DGDAL_INCLUDE_DIR=../gdal/include
make
make install


How do I find out whether GDAL_INCLUDE_DIR is the correct macro to use or not? I'm guessing from what I remember from the Windows CMake GUI.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49965#49965

Jordi Torres

unread,
Sep 12, 2012, 3:01:30 AM9/12/12
to osg-...@lists.openscenegraph.org
Hi Nav,

If you have installed gdal in your system, probably it will be autodetected. If you use a custom directory you will need to pass this information to cmake. There exists two ways:

Use ccmake (you need to install cmake-curses package) .. instead of cmake .. and search for the entry 

GDAL_INCLUDE_DIR                 /usr/include/gdal        (these are my autodetected values)                   
GDAL_LIBRARY                     /usr/lib/libgdal1.7.0.so     (these are my autodetected values)               

you can make use of cmake-gui if you feel more comfortable (you need to install cmake-qt-gui package)

Use the paremeters as you said

cmake ../osg -DGDAL_INCLUDE_DIR=/pathtogdalincludedir  -DGDAL_LIBRARY=/pathtolib

Cheers
2012/9/12 Nav Joseph <nk...@tatapowersed.com>

Nav Joseph

unread,
Sep 12, 2012, 11:20:06 PM9/12/12
to osg-...@lists.openscenegraph.org
Tried the GDAL macros and osg built successfully. VPB didn't; and it appeared to be because of the osg paths I had set wrongly in bash_profile.
Anyway, I was under a time-crunch, so just rebuilt osg without gdal for the time-being.
Thank you very much for helping out. Hope this thread will be helpful for someone else in future.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49999#49999
Reply all
Reply to author
Forward
0 new messages