ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Building Ogre fails on Osx Lion

asked 2011-08-24 21:45:33 -0500

LucaGhera gravatar image

Hi all,

I'm trying to install rviz on my mac book. I installed all the dependencies, in particular wxWidgets-python and py26-wxpython by using the variant +gtk (I had done it because I needed it for compiling PCL, wihch require wxgtk. I found out that wxWidgets-python +gtk is good too). I also installed the nvidia-cg-toolkit by using the installer download from here.

Now, when I try to build Ogre it returns me the following error:

macbook-di-luca:ogre luca$ rosmake --rosdep-install --pre-clean 
[ rosmake ] No package specified.  Building ['ogre']                                                                                             
[ rosmake ] Packages requested are: ['ogre']                                                                                                     
[ rosmake ] Logging to directory/Users/luca/.ros/rosmake/rosmake_output-20110825-111203                                                          
[ rosmake ] Expanded args ['ogre'] to:
['ogre']                                                                                                  
[ rosmake ] Generating Install Script using rosdep then executing. This may take a minute, you will be prompted for permissions. . .             
Failed to find rosdep nvidia-cg for package ogre on OS:macports version:macports
WARNING: Rosdeps [u'nvidia-cg'] could not be resolved
rosdep executing this script:
{{{
set -o errexit
#No packages to install
}}}
[ rosmake ] rosdep successfully installed all system dependencies                                                                                
[rosmake-0] Starting >>> ogre [ make clean ]                                                                                                     
[rosmake-0] Finished <<< ogre [PASS] [ 54.18 seconds ]                                                                                           
[ rosmake ] Starting >>> tools/rospack                                                                                                           
[ rosmake ] Finished <<< tools/rospack                                                                                                           
[rosmake-0] Starting >>> ogre [ make ]                                                                                                           
[ rosmake ] Last 40 linesre: 928.2 sec ]                                                                                [ 1 Active 0/1 Complete ]
{-------------------------------------------------------------------------------
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderMaterialSerializerListener.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderProgramProcessor.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderCGProgramProcessor.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderCGProgramWriter.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderGLSLProgramProcessor.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderGLSLProgramWriter.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderProgramWriterManager.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderHLSLProgramProcessor.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/RTShaderSystem/OgreShaderHLSLProgramWriter.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/ExampleApplication.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/ExampleFrameListener.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/ExampleLoadingBar.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/FileSystemLayer.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/OgreStaticPluginLoader.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/Sample.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/SampleContext.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/SamplePlugin.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/SdkCameraMan.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/SdkSample.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/include/OGRE/SdkTrays.h
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/bin/OgreXMLConverter
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre/ogre/bin/OgreMeshUpgrader
  -- Installing: /Users/luca/Software/ros/diamondback/visualization_common/ogre ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-08-25 07:03:25 -0500

William gravatar image

updated 2011-08-25 08:03:03 -0500

The check for the Cg plugin generated by OGRE is broken for OS X. Here is a patch:

        Index: Makefile
===================================================================
--- Makefile    (revision 37811)
+++ Makefile    (working copy)
@@ -71,11 +76,19 @@
    else \
      make ogre/lib/pkgconfig/OGRE.pc; \
    fi
-   @if test ! -f ogre/lib/OGRE/Plugin_CgProgramManager.so; then \
-          echo "BUILD FAILED: Plugin_CgProgramManager.so not created.  Is nvidia-cg-toolkit installed correctly?"; \
-          exit 1; \
-        fi
+   @if test `uname` = Darwin ; then \
+       if test ! -f ogre/lib/Plugin_CgProgramManager.dylib; then \
+           echo "BUILD FAILED: Plugin_CgProgramManager.dylib not created.   Is nvidia-cg-toolkit installed correctly?"; \
+           exit 1; \
+       fi \
+   else \
+       if test ! -f ogre/lib/OGRE/Plugin_CgProgramManager.so; then \
+           echo "BUILD FAILED: Plugin_CgProgramManager.so not created.  Is nvidia-cg-toolkit installed correctly?"; \
+           exit 1; \
+       fi \
+   fi

+
 ogre/lib/pkgconfig/OGRE.pc: $(SOURCE_DIR)/CMakeLists.txt $(SOURCE_DIR)
         # building OGRE
    mkdir -p $(ROOT)/$(SOURCE_DIR)/build;

I made a ticket here: https://code.ros.org/trac/ros-pkg/ticket/5132

EDIT: Had to fix a syntax error on the patch.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-08-24 21:45:33 -0500

Seen: 1,086 times

Last updated: Aug 25 '11