Skip to content

make dev-env-setup missing several dependencies required for make lint-test-all on macOS #1125

@ShreyaGupta08

Description

@ShreyaGupta08

Summary

Running make dev-env-setup followed by make lint-test-all on macOS (Apple Silicon, darwin/arm64) fails at multiple stages due to missing tools and PATH configuration. Several manual interventions were required to get the full lint-test suite to pass.

Environment

  • OS: macOS (Darwin, Apple Silicon / arm64)
  • Shell: zsh

Steps to Reproduce

git clone https://github.com/NVIDIA/NVSentinel.git
cd NVSentinel
make dev-env-setup
make lint-test-all   # fails repeatedly

Missing Dependencies / Issues Encountered

1. wget not installed

make dev-env-setup itself fails partway through because it uses wget to download Protocol Buffers, but wget is not pre-installed on macOS.

Error: scripts/setup-dev-env.sh: line 499: wget: command not found
Fix: brew install wget

2. go installation fails on macOS

make install-go-ci attempts to install Go to /usr/local/go but the tar extraction fails on macOS with numerous errors. The binary is not found at the expected location afterward.

Error: Warning: Go binary not found at expected location /usr/local/go/bin/go
Fix: brew install go

3. GOPATH/bin not added to PATH

After Go tools are installed via go install, they are placed in $(go env GOPATH)/bin (typically ~/go/bin/), but this directory is not on PATH. The Makefile finds some tools by absolute path (e.g., protoc-gen-crd) but not others.

Fix: export PATH="$PATH:$(go env GOPATH)/bin"

4. protoc-gen-go and protoc-gen-go-grpc not installed

These are required for protobuf generation but are not installed by dev-env-setup.

Error: /bin/sh: protoc-gen-go: command not found
Fix:

go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.10
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1

5. addlicense not installed

Required for license-headers-lint target but not installed by dev-env-setup.

Error: make: addlicense: No such file or directory
Fix: go install github.com/google/addlicense@latest

6. golangci-lint, gotestsum, gocover-cobertura not installed

Required for Go lint and test targets but not installed by dev-env-setup.

Error: /bin/sh: golangci-lint: command not found
Fix:

go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0
go install gotest.tools/gotestsum@v1.13.0
go install github.com/boumenot/gocover-cobertura@v1.4.0

7. grpcio-tools and black (Python) not installed

Required for Python protobuf generation and formatting, but not installed by dev-env-setup.

Error: grpcio-tools: not installed / black: not found
Fix: pip install grpcio-tools==1.75.1 black

8. poetry not on PATH

Required for Python health monitor lint/test but not available after setup.

Error: make[3]: poetry: No such file or directory
Fix: brew install pipx && pipx install poetry

9. Version sensitivity not documented

Installing latest versions of tools causes protos-lint to fail because generated code has version diffs (e.g., protoc-gen-go v1.36.11 vs expected v1.36.10, grpcio-tools 1.80.0 vs expected 1.75.1). The exact required versions are in .versions.yaml but dev-env-setup does not install them.

Expected Behavior

make dev-env-setup should install all tools at the exact versions specified in .versions.yaml, configure PATH appropriately, and leave the environment ready for make lint-test-all to pass without any manual intervention — at least on macOS and Ubuntu.

Suggested Improvements

  1. Add wget as a prerequisite check (or use curl which is available on macOS by default)
  2. Use brew install go on macOS instead of the manual tar extraction
  3. Have dev-env-setup install all Go tools (protoc-gen-go, protoc-gen-go-grpc, addlicense, golangci-lint, gotestsum, gocover-cobertura) at the pinned versions from .versions.yaml
  4. Have dev-env-setup install Python tools (grpcio-tools, black, poetry) at pinned versions
  5. Print a reminder or auto-configure GOPATH/bin on PATH
  6. Document the full dependency list in DEVELOPMENT.md as a fallback

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions