# Building Ogre fails on Osx Lion

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 ... edit retag close merge delete ## 1 Answer Sort by » oldest newest most voted 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.

more