EmotiBit / ofxEmotiBit

OpenFrameworks library and examples for the EmotiBit
MIT License
33 stars 8 forks source link

EmotiBitOscilloscope not building on Mac M1 (Ventura 13.1) #216

Closed JaeminBBQ closed 2 months ago

JaeminBBQ commented 1 year ago

Describe the feature EmotiBitOscilloscope is not able to be built/compiled on Mac M1 (Ventura 13.1) following instructions in the readme. The feature would allow Mac M1 to compile the EmotiBit Oscilloscope.

Steps Taken

  1. Download OpenFramework (Currently, 0.11.2 is the most recent release)
  2. Follow instructions on ofxEmotiBit GitHub page.
  3. Go to ofxEmotiBit and checkout to branch that supports Open Framework 0.11.2
  4. On Xcode navber, Product -> Destination -> Destination Architectures -> Show Both
    • This will show both Rosetta and Apple Silicon destinations.
EmotiBit Oscilliscope Error when build failing Apple Silicon GUI error message Console Error message
Error1 Error2
EmotiBit Error when build failing Rosetta DataParser FirmwareInstaller Oscilliscope
Screenshot 2023-07-10 at 10 58 43 AM Screenshot 2023-07-10 at 10 59 43 AM Screenshot 2023-07-10 at 11 02 14 AM
  1. Build succeeds in DataParser, FirmwareInstaller, but fails for EmotiBitOscilloscope when using Apple Silicon
    • The build fails for all three when using Rosetta because of the same “apple-m1” error
    • The EmotiBitOscilloscope errors and log suggests that QTKit.tbd and liblsl are incompatible with ARM.

Steps taken that fixed the issue

  1. Download Source Code of liblsl Release v1.14.0

  2. Used CMake to create .dylib on M1 Mac

  3. Replaced liblsl.1.14.0.dylib in ofxLSL/libs/labstreaminglayer/lib/osx with new dylib

  4. Compiles successfuly ✅

Describe the solution you'd like Possible solutions

Both of these solutions require building a dylib not available from the liblsl GitHub page. This means that until they start adding ARM to their available assets, we will have to build the dylib ourself whenever we update the lsl dependency.