Skip to content
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

protoc is old and not compatible with arm based macos #5687

Closed
mirageAlchemy opened this issue Nov 6, 2024 · 2 comments
Closed

protoc is old and not compatible with arm based macos #5687

mirageAlchemy opened this issue Nov 6, 2024 · 2 comments
Labels

Comments

@mirageAlchemy
Copy link

mirageAlchemy commented Nov 6, 2024

Xmake Version

v2.9.6

Operating System Version and Architecture

Apple M2 macos 14.5 (23F79)

Describe Bug

xrepo install protoc          
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> protoc 3.8.0 
please input: y (y/n/m)
y
  => download https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protoc-3.8.0-osx-x86_32.zip .. ok
  => install protoc 3.8.0 .. failed

cannot runv(protoc test.proto --cpp_out=.), Bad CPU type in executable
if you want to get more verbose errors, please see:
  -> /Users/gzcao/.xmake/cache/packages/2411/p/protoc/3.8.0/installdir.failed/logs/install.txt
error: install failed!
error: execv(/Users/user/.local/bin/xmake require -j 10 --extra={system=false} protoc) failed(255)

Arguably because back when protoc is added to xmake-repo, arm chip for macos is not yet out.
Also protoc is, while compatible, too old compared to newest protobuf-c++ version.

I can start a pull request if is as simple as updating packages/p/protoc/xmake.lua. But i noticed there was a pull request aiming to update the file but finally was closed: #2549. Wonder what happened.

Expected Behavior

xrepo install protoc should successfully install

Project Configuration

i have this in my root xmake.lua

-- for protobuf
add_requires("protobuf-cpp")
add_packages("protobuf-cpp")
-- for protoc
add_requires("protoc")
add_packages("protoc")

Additional Information and Error Logs

it is include above.

@mirageAlchemy
Copy link
Author

i tried with xmake b -v my_proto, and it looks like protobuf-cpp ships with an internal protoc that matches the proto lib version. The error I had compling it before was likely because i did not do a full xmake clean.
Now that i dont have problem, feel free close this issue. Or i can proceed with updating protoc if this is needed somehow?

@mirageAlchemy
Copy link
Author

close this issue for now, since my problem is gone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant