Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogre2.2: patches for M1 arm processors #1823

Merged
merged 12 commits into from
Sep 21, 2023
Merged

ogre2.2: patches for M1 arm processors #1823

merged 12 commits into from
Sep 21, 2023

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Feb 26, 2022

Signed-off-by: Ian Chen [email protected]

I applied the patches mentioned in #1628 (comment) with a slight tweak to the first patch.

After this I was able to install ogre2.2, build and run the simple_demo example in ign-rendering with Metal backend.

simple_demo_m1_ign-rendering

Signed-off-by: Ian Chen <[email protected]>
@iche033 iche033 changed the title Apply patches to ogre2.2 foruma for M1 arm processors Apply patches to ogre2.2 formula for M1 arm processors Feb 26, 2022
@iche033
Copy link
Contributor Author

iche033 commented Feb 26, 2022

I also had to add an extra "-DCMAKE_MACOSX_RPATH=FALSE" cmake arg for ign-gazebo gui to load ogre libraries when calling dlopen otherwise I get security policy does not allow @ path expansion msgs. I didn't add that change to this PR as I'm not sure if there are other better ways to around this.

@Kakcalu13
Copy link

Do you know if this will apply to ultra M1 too?

@iche033
Copy link
Contributor Author

iche033 commented Mar 11, 2022

Do you know if this will apply to ultra M1 too?

no I don't know. I don't have an m1 ultra to test this.

@Kakcalu13
Copy link

Do you know if this will apply to ultra M1 too?

no I don't know. I don't have an m1 ultra to test this.

Sorry lol I don't know why I asked dumb question. I'm seriously considering to buy ultra M1. I am more than happy to test for you guys once I get it. By the time I get it, should I create a separate issue?

@iche033
Copy link
Contributor Author

iche033 commented Mar 11, 2022

I would suggest creating an issue once you are able to test this. You'll then be able to provide more info such as build errors and console output in the case that it does not work.

@Kakcalu13
Copy link

build bottle
brew-bot-tag: build_m1_patch

@Kakcalu13
Copy link

I have a quick question if you don't mind about this issue 👼,

How do you get this working?

Here is what I did:

  1. cd /opt/homebrew/Library/Taps/osrf/homebrew-simulation/Formula
  2. nano ogre2.2.rb
  3. Copy/paste from the changed file on the issue here
  4. Save and exit
  5. brew tap osrf/simulation

Is this how you do this?

@iche033
Copy link
Contributor Author

iche033 commented Mar 28, 2022

looks like you got pass this issue? I saw some activity in gazebosim/gz-sim#1362 that you're onto steps for building ignition. In short yes I modified the ogre-2.2.rb formula with my patch in this PR as well as adding the changes I mentioned in #1823 (comment), and then just I brew install ogre2.2 again.

@scpeters
Copy link
Member

scpeters commented May 1, 2022

currently these patches will be applied for all architectures, so we should bump the revision and rebuild bottles

@nello
Copy link

nello commented Jul 10, 2022

I've tried to apply these patches, and believe I have done so successfully. Still doesn't compile on my M1 Macbook Pro though.

==> cmake .. -DOGRE_LIB_DIRECTORY=lib/OGRE-2.2 -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF -DOGRE_FULL_RPATH
==> make install
Last 15 lines from ~/Library/Logs/Homebrew/ogre2.2/02.make:
      Ogre::ZipArchive::open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in OgreZip.cpp.o
  "_zzip_file_read", referenced from:
      Ogre::ZipDataStream::read(void*, unsigned long) in OgreZip.cpp.o
  "_zzip_seek", referenced from:
      Ogre::ZipDataStream::skip(long) in OgreZip.cpp.o
      Ogre::ZipDataStream::seek(unsigned long) in OgreZip.cpp.o
  "_zzip_strerror_of", referenced from:
      Ogre::ZipDataStream::read(void*, unsigned long) in OgreZip.cpp.o
  "_zzip_tell", referenced from:
      Ogre::ZipDataStream::tell() const in OgreZip.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/macosx/libOgreMain.2.2.6.dylib] Error 1
make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [all] Error 2

@mjcarroll
Copy link
Contributor

Does this set of patches apply to #1956 as well? I only have an intel mac to test with.

@iche033
Copy link
Contributor Author

iche033 commented Jul 21, 2022

Does this set of patches apply to #1956 as well? I only have an intel mac to test with.

I was able to build ogre2.3 on M1 without this patch

@scpeters scpeters self-requested a review as a code owner September 21, 2023 05:48
@scpeters scpeters changed the title Apply patches to ogre2.2 formula for M1 arm processors ogre2.2: patches for M1 arm processors Sep 21, 2023
@scpeters
Copy link
Member

I've updated this branch and added some rpath fixes

@scpeters
Copy link
Member

build bottle

@scpeters
Copy link
Member

bottle upload is temporarily broken, wait to rebuild

@scpeters scpeters merged commit 2323963 into master Sep 21, 2023
1 check passed
@scpeters scpeters deleted the ogre2.2_m1 branch September 21, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants