-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Make fails with "incompatible function pointer type" on Apple m3 #35148
Comments
#35194 should be able to fix it. The reason 1.60.0.pre installation succeeds is because started to distribute arm64 binary for mac, so no compiling is needed. It would be great if you can upgrade to 1.60.0 release to unblock yourself. @jaydorsey @apolcyn Is it possible that we publish v1.54.2 arm64-darwin binary or back port the fix for this user? |
I can't upgrade in the project at this point, this only affects me and I can work around it by working inside of a docker container. I was hoping that I was just missing some kind of build/library configuration. I think there's a homebrew install for 1.5.x but I can't seem to recreate whatever steps they do to build it. If it's a potentially breaking change to backport it, it's probably not worth it. I know we'll update our library at some point and I do have a workaround. Thank you for looking at this though. Happy to leave this issue open for others to chime in but we can also close it |
@alto-ruby I pulled down your patch, setup submodules, did a rake build, and then a gem install on the package. I got a new error. I don't know much about C but I'll see if I can dig thru the diff between 1.54.2 and your change + 1.60 which does seem to compile just fine. I'm also going to unpin grpc from our gemfile for local development, and then just discard those changes. Between those solutions, and docker, I have options to unblock me. I appreciate you taking the time to look at this, thank you.
|
It can be fixed the same way, I'll update the PR. |
I just found out that there is already #34481 fixing the same issue |
Oh thank you, I'll take a look. I think I tried installing w/ downgraded versions of many things (llvm, gcc, etc.) but I know I didn't look at clang. I'll look at that related PR, I appreciate you following up on this! I'm going to close this issue since it looks like the root cause/resolution is being addressed in that pull request, and that answered the heart of my original question "Am I missing some compilation flags that would let me get this working" |
@alto-ruby One quick update: based on your comment, I was able to fix my system and get grpc 1.54.2 installed!
After that, a regular old |
I got curious if there's a less invasive way to work around the issue than installing llvm@15. Based on #34481 talks about:
If that is the case, it should be possible to turn it off right? Reading https://clang.llvm.org/docs/UsersManual.html#options-to-control-error-and-warning-messages make it seem like this could do it:
I'm used to being able to pass in things like that to |
@technicalpickles you can use pass-thru arguments on I mean, that didn't actually WORK for me, but I'm experimenting with flags now. Sigh. This is a pain! |
If you're using Bundler, you can set this override like this:
Ref https://bundler.io/v2.5/man/bundle-config.1.html#BUILD-OPTIONS |
FYI - Looks like this issue is fixed in 1.62.1 |
@technicalpickles @flipsasser Actually grpc build error relates to |
This had to be from nixpkgs-23.05-darwin because of a build failure in grpc that I think is related to grpc/grpc#35148
What version of gRPC and what language are you using?
All grpc gem versions from 1.54.2 thru 1.59.2, ruby
What operating system (Linux, Windows,...) and version?
OS: macOS 14.1.1
Chip: M3 Max
What runtime / compiler are you using (e.g. python version or version of gcc)
ruby: 3.1.2 (and 3.2.2)
gcc: 13.2.0 (homebrew)
llvm: 17.0.6 (homebrew)
Command Line Tools: 15.0.0.0.1.1694021235
Xcode: 15.0.1
What did you do?
I'm trying to install the grpc gem on a new Macbook Pro with an M3 Max chip using the command
gem install grpc -v 1.54.2
I've also tried cloning the repo & building from source/running tests
What did you expect to see?
I expected the gem to install after it builds from source
What did you see instead?
I see 1 error that causes the grpc build to fail:
Anything else we should know about your project / environment?
I've tried installing with both default macOS binaries (gcc/clang, etc.) with similar results but a different set of error messages (ranlib, etc.)
I tried setting the relevant paths (LDFLAGS, CPPFLAGS, etc.) per the homebrew instructions, and without the paths.
I tried installing with ruby 3.2.2 with the same error
I tried installing 1.60.0.pre and that install worked
so there may be a patch/workaround for it that I can upgrade to. I can't use this as a workaround in the current situation, because of cascading dependencies.I'd love to find out that I'm missing something in the install, or that I've configured something wrong. The only solution that comes to mind is a) buying a new laptop (without an M3 chip); b) Forgetting about locally installing any of this and work inside of a docker container
I'm wondering if this is an issue related to the m3 chipset
The text was updated successfully, but these errors were encountered: