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

Error on generating proto files #4448

Open
xhyzzZ opened this issue Dec 13, 2024 · 1 comment
Open

Error on generating proto files #4448

xhyzzZ opened this issue Dec 13, 2024 · 1 comment

Comments

@xhyzzZ
Copy link

xhyzzZ commented Dec 13, 2024

Describe the bug
Encountered a error when generating protobug files using make gen-proto

Full error trace:

# haoyuxu @ Haoyus-MacBook-Pro in ~/workspace/tempo on git:main x [12:44:18]
$ make gen-proto
--
-- Deleting existing
--
rm -rf opentelemetry-proto
rm -rf pkg/.patched-proto
find pkg/tempopb -name *.pb.go | xargs -L 1 -I rm
pkg/tempopb/trace/v1/trace.pb.go
pkg/tempopb/tempo.pb.go
pkg/tempopb/common/v1/common.pb.go
pkg/tempopb/resource/v1/resource.pb.go
# Here we avoid removing our tempo.proto and our frontend.proto due to reliance on the gogoproto bits.
find pkg/tempopb -name *.proto | grep -v tempo.proto | grep -v frontend.proto | xargs -L 1 -I rm
--
-- Copying to pkg/.patched-proto
--
git submodule update --init
Submodule path 'opentelemetry-proto': checked out '39339ef177218cc965b8cf863d761775ec668858'
mkdir -p pkg/.patched-proto
cp -R opentelemetry-proto/opentelemetry/proto/* pkg/.patched-proto
--
-- Editing proto
--
find pkg/.patched-proto -name "*.proto" | xargs -L 1 sed -i '' 's+ opentelemetry.proto+ tempopb+g'
find pkg/.patched-proto -name "*.proto" | xargs -L 1 sed -i '' 's+go.opentelemetry.io/proto/otlp+github.com/grafana/tempo/pkg/tempopb+g'
find pkg/.patched-proto -name "*.proto" | xargs -L 1 sed -i '' 's+import "opentelemetry/proto/+import "+g'
--
-- Gen proto --
--
docker run --rm -u 501 -v/Users/haoyuxu/workspace/tempo:/Users/haoyuxu/workspace/tempo -w/Users/haoyuxu/workspace/tempo otel/build-protobuf:0.23.0 --proto_path=/Users/haoyuxu/workspace/tempo -Ipkg/.patched-proto --gogofaster_out=plugins=grpc,paths=source_relative:./pkg/tempopb/ pkg/.patched-proto/common/v1/common.proto
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
rosetta error: Rosetta is only intended to run on Apple Silicon with a macOS host using Virtualization.framework with Rosetta mode enabled
 make: *** [gen-proto] Error 133

To Reproduce
Steps to reproduce the behavior:

  1. Under root level of Tempo repo, run make gen-proto

Expected behavior
Proto files should be generated

Environment:
Running on local M1 mac.

MacOS version: Sequoia 15.1

Additional Context

@joe-elliott
Copy link
Member

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

The image we use is only built for amd64: https://registry.hub.docker.com/r/otel/build-protobuf/tags

Please research how to run this image on your machine.

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

No branches or pull requests

2 participants