Haha seems like its definitely the simplest way to go. Thanks anyways!
Just got an M2 Mac yesterday. Getting it to compile a native arm binary didn’t require much work. I would open a PR but I’m too lazy to create a ‘sideoflamp’ GitHub account. Below is the diff to get it to compile. Otherwise follow the guide(brew install libpng and libmpv)
diff --git a/OFS-lib/OFS_Util.h b/OFS-lib/OFS_Util.h
index ed04881..821ff31 100644
--- a/OFS-lib/OFS_Util.h
+++ b/OFS-lib/OFS_Util.h
@@ -20,9 +20,14 @@
#include "OFS_Profiling.h"
#include "OFS_FileLogging.h"
+#ifdef __x86_64__
#include "emmintrin.h" // for _mm_pause
-
#define OFS_PAUSE_INTRIN _mm_pause
+#elif __aarch64__
+#include <thread>
+#define OFS_PAUSE_INTRIN std::this_thread::yield
+#endif
+
Not sure why he wanted to use mm_pause over yield but I left that in place.
Thanks for the guide. I am running macOS Catalina version 10.15.7. It is an intel. I downloaded the compatible XCode. I made it to : For Intel Macs only: brew install mpv, then I get the following error "Error: mpv: Failed to download resource “libvorbis”
Download failed: Homebrew-installed curl
is not installed for: https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz " anyone else had this error?
Okay I lied, opened a PR. Didn’t want to have to do this each time the repo updated.
Thanks for the tutorial I made it! Can’t believe it works on M1 mac! Something I want to add to the tutorial is that you should use root user to copy OpenFunscripter.app to /Applications/.
Just a heads, the app will run slower/use more cpu to virturalize it as an x86 app instead of arm, which is why I posted the above.
Hi, would it work whit the Parallels. I was thinking about both the OFS and the auto script generator??
Thanks!
Hello, mates…
I remember giving a try compiling OFS once and after much fighting… Nothing !
So first, thank you people for I have been able to compile a (somewhat) working 3.2.0 OFS, following guides and notes from the (obviously) real developers in this thread.
Compiled app is x86_64 3.2.0 on a M1 MacBookAir (2020 I believe).
I followed Mongoose’s instructions, applied sideoflamp’s diff file and removed some flags for sdl to compile. So far I can tell everything works except for the “VR” display, but selecting any other projection works (eg. left pane). I can open v2 project files, scripts, videos, create projects and export scripts…
To get SDL to compile I had to remove the “-Wdeclaration-after-statement” and " -Werror=declaration-after-statement" in the flags.make file located in "whereYouCloned/OpenFunscripter/build/lib/SDL2/CMakeFiles/SDL2-static.dir.
I also removed them from “compile-commands.json” from the root of the build folder but I don’t think it’s necessary. You’ll know better than I do.
Now I should go on to fight with Motion tracking but from reading you all, I’m not sure I should dive into that…
Anyway, thank you all, @Mongoose, @sideoflamp, @559lawndart for the functional OFS and of course @gagax123
Out of curiosity, should I / can I get rid of the x86 brew ? As I now use zsh, I put all the export variables in my .bash_profile, so if I use zsh daily with the “correct” arm brew paths and x86 bash on occasion with its correct paths, is it secure or will things eventually turn to shit anyway ?..
Update:
Got an old i7 MacBookPro on Catalina and got it to compile v3.2.0. Versions 1.4.4 and 2.0.0 didn’t compile, giving the same error (don’t remember, I’ll leave a note).
I’m pretty sure I once used MTFG (not the extension) on x86 mac with native Python. So far on my m1 I am able to launch main.py, load a video, use mpv and launch the settings window of the tracker but as soon as I click OK, Python crashes with “Exception 4”. I got the extension to load in ofs but all the same. Seems like MTFG calls something in the wrong architecture and then crashes ?..
Update again:
Did build @sideoflamp patched fork (git clone https://github.com/sideoflamp/OFS.git --branch patch-1), had to remove the same flags for SDL to compile, and then it indeed builds a native arm .app without errors but I can’t get the app to launch, will investigate… For starters it seems to be unable to find libmpv.
Hi there,
I managed to compile OFS 3.2.0 on my M1 Mac thanks to all your guidelines and tips, but am definitely looking forward to being able to use any motion tracking option to optimize my scripting time and lessen the suffering
Did my first script by hand, and ended up quite exhausted.
If there is any way to make that work on an M1 chip, I can’t wait to hear more from you if you ever end up making that miracle happen !
Maybe you know already but the Handy simple scripter web app has got some motion tracking. I usually use it for motion tracking only and do the rest in OFS.
Thank you @kinetics, somehow I did not manage to have it work on my side. Is there a resolution limit constraint to make it work as expected ?
Not sure. You need Chrome and I’m not sure it works with VR - only tried 2D.
Same behavior here, compiled the patched fork as an ARM native app, but crashes instantly upon launching. Please let us know if you manage to get any further on
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.