Building in macOS 11.0 Big Sur

Thanks for that. It corrected the problem for the specific project, but is there a way to set the updated install_name_tool string for every existing and new project? I did a full disk file contents search and didn’t seem to find it in any location that would imply global scope for Xcode. TIA.

I found the modern FMOD API calls to replace that missing function.
You can see the changes in this PR if you need to use FFT with Big Sur in the meantime:

2 Likes

If you wanted to replace it for new projects / examples:
You would change this line here in scripts/templates/osx/emptyExample.xcodeproj/project.pbxproj

to:
install_name_tool -change @rpath/libfmod.dylib @executable_path/../Frameworks/libfmodex.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME";

Then you can use the project generator to make new projects with this fix. Or with the advanced options enabled in the cog of the projectGenerator.app you can then do ‘update multiple’ and select the examples folder to update all the examples with this change.

1 Like

Thank you so much for the solution of this.

I’m glad if anyone help me to direct how to replace fmodex dylib with the latest one.
I opened zip file and terminal is opened. and I’m not sure what to do next.

sorry for the beginner’s question, Any help will be greatly appreciated.

I solved the problem by myself, thank you for the solution.

Here is what should be a BigSur / Apple M1 friendly version of 0.11.0.
Still working through a few kinks on our CI but I tested this version on both a Apple Silicon M1 mac with Xcode 12 and a Intel Mac running 10.14 with Xcode 11.

Please share any issues you run into in this thread.

Theo

5 Likes

just had a quick test. seems to run fine here on m1 air base model. thank you very much :slight_smile:

1 Like

great - glad it works for you!

1 Like

Tried the new build on 2020 Intel MacBook Pro w/macOS 11.0.1 - corrected the mode linker error. Thanks!

The new build worked for me on Intel based MacBook Pro - 13 inch - Big Sur running Xcode 12.3. Can this build be the official build now as I downloaded the official one today and ran into this bug ?Thanks for your hard work!

I think the Nightly Builds now should now be Apple M1 and Intel Big Sur compatible.

If anyone wants to give it a try here is the latest: https://openframeworks.cc/ci_server/versions/nightly/of_v20210113_osx_nightly.zip

Please let us know in this thread if you notice any bugs/issues.

Thanks,
Theo

1 Like

I’ve trying to use this new folder, but I keep getting the same error no matter which project I use. I’m not using XCode because it’s for a class and we are trying to be inclusive to all OS so VSCode it is and here’s the screenshot of the errors because I truly don’t know what to do.

Hi @malejandramunoz

Welcome to the OF forum! :slight_smile:

I think the first step would be to try it with Xcode just to make sure it runs on your system. Sometimes Xcode installs command line tools which the other compilers like VSCode needs. ( that could be causing the missing libstdc++ error you are seeing ).

Could you try?:

  1. installing the latest Xcode
  2. Then Try running some of the OF examples
  3. Then if that works try VSCode again ( VSCode might also need an update )

Thanks!!

Hi again!

I tried the examples on Xcode and they all run, which is why I’m confused as to why it wouldn’t work? It still gives me the same errors (I reinstalled both XCode, the Command Line Tools from XCode and VSCode) and I’m really frustrated at this point.

Hi,

Are you using the nightly builds at the bottom of this page?:
https://openframeworks.cc/download/

eg: https://openframeworks.cc/ci_server/versions/nightly/of_v20210120_osx_nightly.zip

I just tried with VSCode and the nightly builds work and run fine. I think that error might be related to the older 0.11.0 release which isn’t Big Sur compatible.

I hope that helps!
Theo

Hi,

tried to build an example on Apple Silicon M1 but using Qt Creator with no luck. Using nightly build It builds with no errors, bu when it runs I get errors:

dyld: Library not loaded: @rpath/libfmod.dylib
  Referenced from: /Users/dumski/Developer/of_v20210201_osx_release/examples/3d/3DPrimitivesExample/bin/3DPrimitivesExample_debug.app/Contents/MacOS/3DPrimitivesExample_debug
  Reason: image not found
22:44:19: The program has unexpectedly finished.

Could you help?

Cheers, Teo

Ahh I think we need these equivalent commands for qtCreator:

You can see here that it is assuming the files should be copied to Contents/MacOS and not Contents/Frameworks :

Thanks, I tried a quick dirty approach and copied libfmod.dylib to Frameworks dir inside the app but it didn’t work. Same error. Not sure If I understand right – where should be the libfmod.dylib exactly (inside the app bundle)?

Hey,

You will also need to add the rpath to the executable so it knows to look there.
If you are in the bin/ folder this should work:

install_name_tool -add_rpath "@executable_path/../Frameworks" *.app/Contents/MacOS/*

You can also replace the wildcards with the actual app name :slight_smile: