Error compiling Gazebo Garden from source, Ubuntu 22.04 Parallels Mac M1

Hello,
I am following the tutorial (Gazebo) to install Gazebo Garden from source on Ubuntu 22.04. I am using a Parallels VM on my Mac M1 (ARM64).

When I ran “colcon build --merge-install”, the below error appeared for the gz-rendering7 library. It appears to have something to do with Ogre. Do you guys have any suggestions for how I can fix this?

As an FYI, I was able to run Gazebo Garden (not installed from source) on a different Ubuntu 22.04 VM. On that machine, I had to resort to ogre1 with the tag “–render-engine ogre” but otherwise had no difficulties. Perhaps this might have something to do with the below problem.

/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE' which may bind externally can not be used when making a shared object; recompile with -fPIC ../../lib/libterra.a(OgreHlmsTerra.cpp.o): in function Ogre::HlmsTerra::~HlmsTerra()‘:
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp:94:(.text+0x4): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE' which may bind externally can not be used when making a shared object; recompile with -fPIC /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp:94:(.text+0x10): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerra.cpp.o): in function Ogre::HlmsTerra::~HlmsTerra()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp:94:(.text+0x294): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp:94:(.text+0x2a0): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE' which may bind externally can not be used when making a shared object; recompile with -fPIC ../../lib/libterra.a(OgreHlmsTerra.cpp.o): in function non-virtual thunk to Ogre::HlmsTerra::~HlmsTerra()‘:
/usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:136:(.text+0x2e4): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:136:(.text+0x2e8): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerra.cpp.o): in function non-virtual thunk to Ogre::HlmsTerra::~HlmsTerra()': /usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:136:(.text+0x338): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:136:(.text+0x33c): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZN4Ogre12HlmsListener15hlmsTypeChangedEbPNS_13CommandBufferEPKNS_13HlmsDatablockEm' which may bind externally can not be used when making a shared object; recompile with -fPIC ../../lib/libterra.a(OgreHlmsTerra.cpp.o): in function Ogre::HlmsTerra::fillBuffersFor(Ogre::HlmsCache const*, Ogre::QueuedRenderable const&, bool, unsigned int, Ogre::CommandBuffer*, bool)‘:
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp:631:(.text+0xcc0): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE' which may bind externally can not be used when making a shared object; recompile with -fPIC ../../lib/libterra.a(OgreHlmsTerra.cpp.o): in function Ogre::HlmsTerra::HlmsTerra(Ogre::Archive*, std::vector<Ogre::Archive*, Ogre::STLAllocator<Ogre::Archive*, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > >)‘:
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp:78:(.text+0x1d94): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre9HlmsTerraE' which may bind externally can not be used when making a shared object; recompile with -fPIC /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp:78:(.text+0x1da4): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre29HlmsTerraBaseTextureDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): in function Ogre::HlmsTerraBaseTextureDatablock::HlmsTerraBaseTextureDatablock(Ogre::IdString, Ogre::Hlms*, Ogre::HlmsMacroblock const*, Ogre::HlmsBlendblock const*, std::vector<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::STLAllocator<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const&)': /usr/include/OGRE-2.3/Hlms/Common/OgreHlmsTextureBaseClass.inl:26:(.text+0x898): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre29HlmsTerraBaseTextureDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/include/OGRE-2.3/Hlms/Common/OgreHlmsTextureBaseClass.inl:26:(.text+0x8a4): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre29HlmsTerraBaseTextureDatablockE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/include/OGRE-2.3/Hlms/Common/OgreHlmsTextureBaseClass.inl:26:(.text+0x8a8): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre29HlmsTerraBaseTextureDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): in function Ogre::HlmsTerraBaseTextureDatablock::~HlmsTerraBaseTextureDatablock()': /usr/include/OGRE-2.3/Hlms/Common/OgreHlmsTextureBaseClass.inl:36:(.text+0x938): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre29HlmsTerraBaseTextureDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/include/OGRE-2.3/Hlms/Common/OgreHlmsTextureBaseClass.inl:36:(.text+0x954): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre29HlmsTerraBaseTextureDatablockE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/include/OGRE-2.3/Hlms/Common/OgreHlmsTextureBaseClass.inl:36:(.text+0x970): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): in function Ogre::HlmsTerraDatablock::~HlmsTerraDatablock()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:88:(.text+0xa24): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:88:(.text+0xa38): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE' which may bind externally can not be used when making a shared object; recompile with -fPIC /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:88:(.text+0xa3c): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): in function Ogre::HlmsTerraDatablock::~HlmsTerraDatablock()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:88:(.text+0xa84): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:88:(.text+0xa98): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE' which may bind externally can not be used when making a shared object; recompile with -fPIC /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:88:(.text+0xa9c): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): in function non-virtual thunk to Ogre::HlmsTerraDatablock::~HlmsTerraDatablock()': /usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:80:(.text+0xae8): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:80:(.text+0xb00): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:80:(.text+0xb04): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): in function non-virtual thunk to Ogre::HlmsTerraDatablock::~HlmsTerraDatablock()': /usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:80:(.text+0xb54): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:80:(.text+0xb6c): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/include/OGRE-2.3/OgreMemoryStdAlloc.h:80:(.text+0xb70): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): in function Ogre::HlmsTerraDatablock::HlmsTerraDatablock(Ogre::IdString, Ogre::HlmsTerra*, Ogre::HlmsMacroblock const*, Ogre::HlmsBlendblock const*, std::vector<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::STLAllocator<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const&)': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:72:(.text+0x1860): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:72:(.text+0x188c): dangerous relocation: unsupported relocation
/usr/bin/ld: …/…/lib/libterra.a(OgreHlmsTerraDatablock.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre18HlmsTerraDatablockE' which may bind externally can not be used when making a shared object; recompile with -fPIC /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp:72:(.text+0x1890): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsPbsTerraShadows.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre19HlmsPbsTerraShadowsE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsPbsTerraShadows.cpp.o): in function Ogre::HlmsPbsTerraShadows::HlmsPbsTerraShadows()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/PbsListener/OgreHlmsPbsTerraShadows.cpp:47:(.text+0x3d0): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(OgreHlmsPbsTerraShadows.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre19HlmsPbsTerraShadowsE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(OgreHlmsPbsTerraShadows.cpp.o): in function Ogre::HlmsPbsTerraShadows::~HlmsPbsTerraShadows()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Hlms/PbsListener/OgreHlmsPbsTerraShadows.cpp:54:(.text+0x3e8): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(Terra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre5TerraE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(Terra.cpp.o): in function Ogre::Terra::~Terra()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Terra.cpp:107:(.text+0xf4): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(Terra.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre5TerraE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(Terra.cpp.o): in function Ogre::Terra::Terra(unsigned int, Ogre::ObjectMemoryManager*, Ogre::SceneManager*, unsigned char, Ogre::CompositorManager2*, Ogre::Camera*, bool)': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/Terra.cpp:96:(.text+0x538): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(TerraWorkspaceListener.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre22TerraWorkspaceListenerE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(TerraWorkspaceListener.cpp.o): in function Ogre::TerraWorkspaceListener::TerraWorkspaceListener(Ogre::HlmsTerra*)': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/TerraWorkspaceListener.cpp:44:(.text+0x1e0): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(TerrainCell.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre11TerrainCellE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(TerrainCell.cpp.o): in function Ogre::TerrainCell::~TerrainCell()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/TerrainCell.cpp:50:(.text+0x14): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(TerrainCell.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre11TerrainCellE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(TerrainCell.cpp.o): in function Ogre::TerrainCell::~TerrainCell()': /home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/TerrainCell.cpp:50:(.text+0x84): dangerous relocation: unsupported relocation /usr/bin/ld: ../../lib/libterra.a(TerrainCell.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN4Ogre11TerrainCellE’ which may bind externally can not be used when making a shared object; recompile with -fPIC
…/…/lib/libterra.a(TerrainCell.cpp.o): in function `Ogre::TerrainCell::TerrainCell(Ogre::Terra
)’:
/home/parallels/workspace/src/gz-rendering/ogre2/src/terrain/Terra/src/TerrainCell.cpp:46:(.text+0x110): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
gmake[2]: *** [ogre2/src/CMakeFiles/gz-rendering7-ogre2.dir/build.make:907: lib/libgz-rendering7-ogre2.so.7.4.0] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:3321: ogre2/src/CMakeFiles/gz-rendering7-ogre2.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2

Failed <<< gz-rendering7 [3.28s, exited with code 2]`

Thank you!
-Aaron

Looks to me like the same problem related in Ubuntu Focal/arm64 build fails to compile 7.0.0 · Issue #731 · gazebosim/gz-rendering · GitHub. It was fixed in packages but the source code it is still affected and probably need to use the CMake flag -DGZ_ADD_fPIC_TO_LIBRARIES=True when calling colcon.

1 Like

Hi @jrivero,

Thank you so much, that solved the ogre issue. However, I ran into 2 more errors later on.

In gz-rendering7, this error popped up. I do not have CUDA installed since I am running a VM on Macbook M1. Will this affect Gazebo?

CUDA_TOOLKIT_ROOT_DIR not found or specified
CMake Warning at /home/parallels/workspace/install/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:68 (message):
CONFIGURATION WARNINGS:
– Skipping component [optix]: Missing dependency [OptiX].
^~~~~ Set SKIP_optix=true in cmake to suppress this warning.

Call Stack (most recent call first):
CMakeLists.txt:188 (gz_configure_build)

Also, in gz-sim7, this error came up.

In file included from /usr/include/c++/11/bits/stl_algo.h:61,
from /usr/include/c++/11/functional:65,
from /home/parallels/workspace/src/gz-sim/test/gtest_vendor/include/gtest/gtest-printers.h:104,
from /home/parallels/workspace/src/gz-sim/test/gtest_vendor/include/gtest/gtest-matchers.h:48,
from /home/parallels/workspace/src/gz-sim/test/gtest_vendor/include/gtest/internal/gtest-death-test-internal.h:46,
from /home/parallels/workspace/src/gz-sim/test/gtest_vendor/include/gtest/gtest-death-test.h:43,
from /home/parallels/workspace/src/gz-sim/test/gtest_vendor/include/gtest/gtest.h:60,
from /home/parallels/workspace/src/gz-sim/test/integration/physics_system.cc:18:
/usr/include/c++/11/bits/stl_heap.h: In function ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<double, double>*, std::vector<std::pair<double, double> > >; _Distance = long int; _Tp = std::pair<double, double>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<PhysicsSystemFixture_SetFrictionCoefficient_Test::TestBody()::<lambda(const PairType&, const PairType&)> >]’:
/usr/include/c++/11/bits/stl_heap.h:223:5: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
223 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,

Do you have any suggestions for these errors? I took a look at the Github issues forum but didn’t find similar questions.

Thanks!

-Aaron

Hi, I recompiled the code and the errors all disappeared. Now things run normally. Again, thank you so much!

1 Like