GithubHelp home page GithubHelp logo

Build fails on Mac M1 about console HOT 12 CLOSED

tokio-rs avatar tokio-rs commented on May 13, 2024
Build fails on Mac M1

from console.

Comments (12)

joelreymont avatar joelreymont commented on May 13, 2024 1

This should fix it tokio-rs/prost#508

from console.

carllerche avatar carllerche commented on May 13, 2024

Hmm, this looks like a prost issue, cc @LucioFranco

from console.

LucioFranco avatar LucioFranco commented on May 13, 2024

I don't have a M1 mac to test on but seems related to protocolbuffers/protobuf#8062? That said, this error seems like it may be with how prost invokes protoc. I've read some stuff that ZSH may be related but I don't know and can't test it right now.

from console.

joelreymont avatar joelreymont commented on May 13, 2024

@LucioFranco any tips for how I can troubleshoot this on my own?

from console.

joelreymont avatar joelreymont commented on May 13, 2024

By the way, the Protobuf issue is about precompiled binaries, it builds from source just fine

protocolbuffers/protobuf#8062 (comment)

from console.

LucioFranco avatar LucioFranco commented on May 13, 2024

@joelreymont I guess the main question is can you invoke protoc --version?

from console.

joelreymont avatar joelreymont commented on May 13, 2024

@joelreymont I guess the main question is can you invoke protoc --version?

I sure can!

❯ protoc --version
libprotoc 3.17.3

from console.

LucioFranco avatar LucioFranco commented on May 13, 2024

Interesting, I think there is something going on with how m1 mac runs its binaries https://apple.stackexchange.com/questions/408375/zsh-bad-cpu-type-in-executable kinda gives a hint but honestly I am not sure what the fix is here..

That said, maybe its looking for a binary with the wrong name? https://github.com/tokio-rs/prost/blob/5d93c55426d9c219fb1fb065adfa8fd3e43833a1/prost-build/build.rs#L59

from console.

joelreymont avatar joelreymont commented on May 13, 2024

The zsh error is about trying to run ARM binaries and not having the emulator installed. I don't have it installed precisely to catch issues like this one!

I just checked out Prost, let me see if I can fix this...

from console.

joelreymont avatar joelreymont commented on May 13, 2024

That said, maybe its looking for a binary with the wrong name? https://github.com/tokio-rs/prost/blob/5d93c55426d9c219fb1fb065adfa8fd3e43833a1/prost-build/build.rs#L59

Yes, this is the issue! How do I submit a pre-built protoc for bundling? Just stick it under ./prost-build/third-party/protobuf/?

from console.

joelreymont avatar joelreymont commented on May 13, 2024

I'm gonna patch tonic to use my local copy of prost, just to test my fix. Then I'll submit the PR to prost and, hopefully, it will be the end of it. @carllerche @LucioFranco anything else?

from console.

LucioFranco avatar LucioFranco commented on May 13, 2024

@joelreymont a patch PR works great! Just tag me in the PR and ill take a look.

from console.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.