Closed scpeters closed 1 year ago
For the server:
gz sim -v4 -s -r shapes.sdf
For the client:
gz sim -v4 -g
export PATH=/opt/homebrew/opt/ruby/bin:$PATH
(your list of exports above is using /usr/local/opt
).
This is where I had issues once everything was building correctly and the main difference between the compilation flags used by @iche033 and me is that I used
-DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/ogre2.2/2.2.6
when building ogre2.2. I haven't resolved why this should make a difference, but it solved the problem of the rendering plugins not finding libOgreMain
and friends when loading.
Sorry, I tried and followed everything. It's just no luck for me. I'm sorry for giving you some headache lol
So, here is my set_gz_env.sh:
#--------------------------------------------------------------------------
# Usage
#
# $ source ./set_gz_env.sh
#
#--------------------------------------------------------------------------
# set environment for Dart and Qt: https://ignitionrobotics.org/docs/fortress/install_osx_src
# dartsim@6.10.0
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/opt/homebrew/opt/dartsim@5
export DYLD_FALLBACK_LIBRARY_PATH=${DYLD_FALLBACK_LIBRARY_PATH}:/opt/homebrew/opt/dartsim@6.10.0/lib:/opt/homebrew/opt/octomap/
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/homebrew/opt/dartsim@6.10.0/lib/pkgconfig
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/homebrew/opt/dartsim@6.10.0/lib/pkgconfig
# qt5
export CMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@5:${CMAKE_PREFIX_PATH}
#--------------------------------------------------------------------------
# Set Ogre environment variables
unset OGRE_RESOURCE_PATH
export OGRE_RESOURCE_PATH=/opt/homebrew/opt/ogre1.9/lib/OGRE
unset OGRE2_RESOURCE_PATH
export OGRE2_RESOURCE_PATH=/opt/homebrew/opt/ogre2.2/lib/OGRE-2.2/OGRE
#--------------------------------------------------------------------------
# Set Ignition environment variables
# Set the render emgine to use when running tests with 'make test'
export RENDER_ENGINE_VALUES=ogre2
# used by ros_ign
export IGNITION_VERSION=garden
# ignition-transport
# if set to 1 this displays all transport messages
export IGN_VERBOSE=0
export IGN_IP=127.0.0.1
export IGN_CONFIG_PATH=\
$HOME/Code/osrf/gz_garden_ws/install/share/ignition
#--------------------------------------------------------------------------
# Use brew version of ruby to avoid SIP issues
export PATH=/opt/homebrew/opt/ruby/bin:$PATH
I don't see any /usr/local/opt
in my set.
So the command I use now is:
colcon build --cmake-args -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/ogre2.2/2.2.6 --merge-install --packages-up-to gz-sim7 --cmake-clean-cache
This results the below error:
station1@Station1s-Mini workspace_new % export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/opt/homebrew/opt/dartsim@6.10.0
export DYLD_FALLBACK_LIBRARY_PATH=${DYLD_FALLBACK_LIBRARY_PATH}:/opt/homebrew/opt/dartsim@6.10.0/lib:/usr/local/opt/octomap/local
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/homebrew/opt/dartsim@6.10.0/lib/pkgconfig
station1@Station1s-Mini workspace_new % gz sim -v4 -s -r shapes.sdf
Library error for [/Users/station1/workspace_new/install/lib/libgz-sim7-gz.7.0.0~pre1.dylib]: dlopen(/Users/station1/workspace_new/install/lib/libgz-sim7-gz.7.0.0~pre1.dylib, 0x0009): Library not loaded: @rpath/libgz-sim7-gui.7.dylib
Referenced from: /Users/station1/workspace_new/install/lib/libgz-sim7-gz.7.0.0~pre1.dylib
Reason: tried: '/usr/local/lib/libgz-sim7-gui.7.dylib' (no such file), '/usr/lib/libgz-sim7-gui.7.dylib' (no such file)
If this script was executed with /usr/bin/ruby, this error may be caused by
macOS System Integrity Protection. One workaround is to use a different
version of ruby, for example:
brew install ruby
and add the following line to your shell profile:
export PATH=/usr/local/opt/ruby/bin:$PATH
If you are using a colcon workspace, please ensure that the setup script
has properly set the DYLD_LIBRARY_PATH environment variables.
Here is the little meme, I hope this cures all headache :P
There are some mistakes in your build as you have used the CMAKE_INSTALL_PREFIX
I use for building ogre2.2 and have dropped the CMAKE_MACOSX_RPATH
flag. There is also a mistake in setting the the IGN_CONFIG_PATH
as you have used my workspace location rather than yours.
Let's try again, being careful:
I am assuming that you have installed ogre following @iche033's instructions, using their osrf/simulation
branch and modifying the Formula with the additional flag -DCMAKE_MACOSX_RPATH=FALSE
. If this step is wrong you will have search path issues later when trying to load the ogre2 render engine plugin in the gui.
From the error messages I see your workspace is /Users/station1/workspace_new/
. First we need to open a clean shell and clear out the existing build. I am assuming you have not set any Gazebo or Ogre or ROS environment variables in .zprofile
that might mess things up. You don't need to clear out the src
folder if you've already pulled the garden dependencies.
cd $HOME/workspace_new/
# clear out the previous build
rm -rf ./build ./log ./install
gz-sim
:# set pre-build exports for dart and qt5
export CMAKE_PREFIX_PATH=/opt/homebrew/opt/dartsim@6.10.0:${CMAKE_PREFIX_PATH}
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/homebrew/opt/dartsim@6.10.0/lib/pkgconfig
export CMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@5:${CMAKE_PREFIX_PATH}
# build gazebo
colcon build --cmake-args -DBUILD_TESTING=OFF -DCMAKE_MACOSX_RPATH=FALSE -DCMAKE_INSTALL_NAME_DIR=$(pwd)/install/lib --merge-install --packages-up-to gz-sim7 --cmake-clean-cache
source ./install/setup.zh
#--------------------------------------------------------------------------
# Set Ogre environment variables
export OGRE_RESOURCE_PATH=/opt/homebrew/opt/ogre1.9/lib/OGRE
export OGRE2_RESOURCE_PATH=/opt/homebrew/opt/ogre2.2/lib/OGRE-2.2/OGRE
#--------------------------------------------------------------------------
# Set Gazebo environment variables
export GZ_IP=127.0.0.1
export GZ_CONFIG_PATH=$HOME/workspace_new/install/share/ignition
#--------------------------------------------------------------------------
# Use brew version of ruby to avoid SIP issues
export PATH=/opt/homebrew/opt/ruby/bin:$PATH
% gz sim --version
Gazebo Sim, version 7.0.0~pre1
Copyright (C) 2018 Open Source Robotics Foundation.
Released under the Apache 2.0 License.
gz-sim
server:% gz sim -v4 -s -r shapes.sdf
[Msg] Gazebo Sim Server v7.0.0~pre1
[Msg] Loading SDF world file[/Users/station1/workspace_new/install/share/ignition/gz-sim7/worlds/shapes.sdf].
[Msg] Loaded level [3]
...
% gz sim -v4 -g
[Msg] Gazebo Sim GUI v7.0.0~pre1
[Dbg] [Application.cc:94] Initializing application.
[Dbg] [Application.cc:102] Qt using Metal graphics interface
[GUI] [Dbg] [Application.cc:562] Create main window
...
It's at this point you'll notice if you ogre2.2 build is incorrect as the rendering plugins will not load.
the ogre2.2 formula should be fixed by #1823, and ogre1.9 and ogre2.3 should already be fixed
Hello,
If I try to install ogre 1.9 (brew install ogre1.9
) I get:
==> cmake -DCMAKE_OSX_ARCHITECTURES='x86_64' -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF -DOGRE_FULL_RPATH:BOOL=FALSE -DOGRE_BUILD_DOCS:BOOL=FALSE -DOGRE_INSTALL
==> make install
Last 15 lines from /Users/user/Library/Logs/Homebrew/ogre1.9/02.make:
make[2]: *** Waiting for unfinished jobs....
20 errors generated.
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimable.cpp.o] Error 1
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationState.cpp.o] Error 1
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAxisAlignedBox.cpp.o] Error 1
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o] Error 1
20 errors generated.
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreArchiveManager.cpp.o] Error 1
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreArchive.cpp.o] Error 1
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationTrack.cpp.o] Error 1
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimation.cpp.o] Error 1
20 errors generated.
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAutoParamDataSource.cpp.o] Error 1
make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [all] Error 2
Hello, If I try to install ogre 1.9 (
brew install ogre1.9
) I get:==> cmake -DCMAKE_OSX_ARCHITECTURES='x86_64' -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF -DOGRE_FULL_RPATH:BOOL=FALSE -DOGRE_BUILD_DOCS:BOOL=FALSE -DOGRE_INSTALL ==> make install Last 15 lines from /Users/user/Library/Logs/Homebrew/ogre1.9/02.make: make[2]: *** Waiting for unfinished jobs.... 20 errors generated. make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimable.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationState.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAxisAlignedBox.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o] Error 1 20 errors generated. make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreArchiveManager.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreArchive.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationTrack.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimation.cpp.o] Error 1 20 errors generated. make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAutoParamDataSource.cpp.o] Error 1 make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2 make: *** [all] Error 2
Hi there!
Can you try this steps:
ulimit -n unlimited
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew tap osrf/simulation
brew install gz-harmonic
Let me know if it worked for you? The one you are currently trying is kinda rather too complicated. The one I provided is super easy!
Hello, If I try to install ogre 1.9 (
brew install ogre1.9
) I get:==> cmake -DCMAKE_OSX_ARCHITECTURES='x86_64' -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF -DOGRE_FULL_RPATH:BOOL=FALSE -DOGRE_BUILD_DOCS:BOOL=FALSE -DOGRE_INSTALL ==> make install Last 15 lines from /Users/user/Library/Logs/Homebrew/ogre1.9/02.make: make[2]: *** Waiting for unfinished jobs.... 20 errors generated. make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimable.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationState.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAxisAlignedBox.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o] Error 1 20 errors generated. make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreArchiveManager.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreArchive.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationTrack.cpp.o] Error 1 make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimation.cpp.o] Error 1 20 errors generated. make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAutoParamDataSource.cpp.o] Error 1 make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2 make: *** [all] Error 2
same error as yours, can not find a way out
Patch doesn't help, didn't complile with error
cd /tmp/ogre1.9-20240614-15842-yi87n9/sinbad-ogre-108ab0bcc696/build/RenderSystems/GL && /opt/homebrew/Cellar/cmake/3.29.5/bin/cmake -E cmake_symlink_library ../../lib/macosx/RenderSystem_GL.1.9.0.dylib ../../lib/macosx/RenderSystem_GL.1.9.0.dylib ../../lib/macosx/RenderSystem_GL.dylib [ 92%] Built target RenderSystem_GL make: *** [all] Error 2
But this works! curl -ssL http://get.gazebosim.org | sh
I tried compiling
ogre1.9
,ogre2.1
, andogre2.2
on a Mac mini with the new M1 processor and it failed to compile. I think we need to apply https://github.com/OGRECave/ogre-next/commit/ff013388249c4f51537e09f9f84b51e51d77cf10 to our formulae.