google / google/go-tpm-tools

[Bazel] fatal error: Platform.h: No such file or directory

Open
#613 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
309
Forks
118
Avg merge
1d 16h
Merged PRs (30d)
33

Description

Hi, I am building a Golang project with Bazel which imports `go-tpm-tools` as a dependency.

During the building, I got the error:
```
ERROR:
error executing GoCompilePkg command
(cd /home/chounoki/.cache/bazel/_bazel_chounoki/7fb605f15cdcc2da099593d3c6f20689/sandbox/linux-sandbox/644/execroot/_main && \
exec env - \
CC=/usr/bin/gcc \
CGO_ENABLED=1 \
GOARCH=amd64 \
GODEBUG='winsymlink=0' \
GOEXPERIMENT='' \
GOOS=linux \
GOPATH='' \
GOROOT=bazel-out/k8-fastbuild/bin/external/rules_go+/stdlib_ \
GOROOT_FINAL=GOROOT \
GOTOOLCHAIN=local \
PATH=/usr/bin:/bin \
TMPDIR=/tmp \
ZERO_AR_DATE=1 \
......
......
......
_main/external/gazelle++go_deps+com_github_google_go_tpm_tools/simulator/internal/internal_cgo.go:46:11: fatal error: Platform.h: No such file or directory
compilation terminated.
```

Since I am importing `go-tpm-tools` as a remote repo directly from Github, I can not copy a "Platform.h" file into `go-tpm-tools` project root directory, is there any solution I can try?

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.