-
Notifications
You must be signed in to change notification settings - Fork 305
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
cpal not building properly on macOS #1835
Comments
Hi, could you please firstly run |
I guess it is something related to cpal+macos. A quick search about |
Here is a log from the build process I uploaded to github gist: https://gist.github.com/Unbreathable/e59eaeff016cce3a95d9c0e26d356864. |
So it seems that these symbols are not found:
What about asking in |
Alright, after some more trouble-shooting I figured out that I just had to link a few Apple frameworks statically. Sorry for wasting your time again. I truly appreciate everything you do for this community and your rust bridge helps me in so many ways. Thank you. Now for everyone using cpal, here's how I fixed my problem:
'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/librust_lib.a -lc++ -framework AudioToolbox -framework AudioUnit -framework IOKit -framework CoreAudio -framework OpenAL', @fzyzcjy I was also thinking we could put this onto the trouble-shooting page for flutter rust bridge. Just in case someone else stumbles upon the same issue. I've also seen some other people in the issues you linked describing the exact same issue, but not listing their solution and just saying roughly what to do (which is how I came up with this solution). Again thanks for your time! |
You are welcome, and happy to see it is solved! Feel free to PR to add to troubleshooting :) EDIT: I have edited the doc, no worries for the PR |
Alright, was about to do it. Anyway, thanks for doing it for me. |
You are welcome! |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue. |
Describe the bug
I'm having trouble compiling my project that works on Windows and Linux perfectly fine for macOS. I recently got myself a Mac system and am using the exact same code base as on the 2 other platforms that I had before. There seems to be some kind of issue with coreaudio not being compiled properly through either flutter_rust_bridge or cargokit. I'm not sure where to post this issue so I just went here because you can probably help me out with that.
Steps to reproduce
This is quite hard to reproduce by hand, so I just created a GitHub repo you can clone to test it: https://github.com/Unbreathable/microphone_test.
Just running
flutter run -v
there reproduces the issue hopefully.If you want to do it on your own machine without downloading my code, here is a simple tutorial on how to reproduce it step by step.
cd rust && cargo add cpal
flutter run -v
(-v for verbose mode)Logs
Expected behavior
No response
Generated binding code
No response
OS
MacOS
Version of
flutter_rust_bridge_codegen
2.0.0-dev.28
Flutter info
No response
Version of
clang++
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: