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

Build failure with "CGO_ENABLED=0" in the Makefile #818

Closed
wanghong230 opened this issue Apr 2, 2018 · 2 comments
Closed

Build failure with "CGO_ENABLED=0" in the Makefile #818

wanghong230 opened this issue Apr 2, 2018 · 2 comments

Comments

@wanghong230
Copy link
Member

Is this a BUG REPORT or FEATURE REQUEST?:
BUG
What happened:
Build is failing with CGO_ENABLE=0
What you expected to happen:
You will see the following error message during the build:

CGO_ENABLED=0 go run vendor/github.com/gobuffalo/packr/packr/main.go build -v -i -ldflags '-X github.com/argoproj/argo.version=2.1.0 -X github.com/argoproj/argo.buildDate=2018-04-02T20:15:32Z -X github.com/argoproj/argo.gitCommit=fe23c2f651a61a2d7aa877a86edff9802d7b5b47 -X github.com/argoproj/argo.gitTreeState=dirty -X github.com/argoproj/argo/cmd/argo/commands.imageTag=latest' -o /Users/hwang8/dev/src/github.com/argoproj/argo/dist/argo ./cmd/argo
net
os/user
go install os/user: open /usr/local/go/pkg/darwin_amd64/os/user.a: permission denied
go install net: open /usr/local/go/pkg/darwin_amd64/net.a: permission denied
Error: exit status 1
Usage:
  packr build [flags]

Flags:
  -h, --help   help for build

exit status 255
make: *** [cli] Error 1
**How to reproduce it (as minimally and precisely as possible)**:
I just installed the golang 1.9.5 and ran the build, not sure if this only applies to the new dev environment.
**Anything else we need to know?**:

**Environment**:
- Argo version:
``` N/A
$ argo version
``` N/A
- Kubernetes version :
``` N/A
$ kubectl version -o yaml
``` N/A

**Other debugging information (if applicable)**:
- workflow result:
``` N/A
$ argo get <workflowname>
```N/A
- executor logs:
```N/A
$ kubectl logs <failedpodname> -c init
$ kubectl logs <failedpodname> -c wait
  • workflow-controller logs:
$ kubectl logs -n kube-system $(kubectl get pods -l app=workflow-controller -n kube-system -o name)

The workaround is to delete the CGO_ENABLED=0 in the make file.

There is a golang issue that is discussing the similar issue: golang/go#18981

@wanghong230
Copy link
Member Author

The root cause is still from golang/go#18981, the following works for me:

Install go via brew:
brew install go
export PATH=$PATH:/usr/local/opt/go/libexec/bin

Instead of installing golang via downloading the package from golang official website, brew is installing the go at the /usr/local/opt/go/ with permission set differently.

@wanghong230
Copy link
Member Author

Official GO:

MTVL1679decd5:argo hwang8$ ls -l /usr/local/go/pkg/darwin_amd64/os/user.a
-rw-r--r--  1 root  wheel  100768 Mar 28 21:37 /usr/local/go/pkg/darwin_amd64/os/user.a

Brew GO:

MTVL1679decd5:argo hwang8$ ls -l /usr/local/Cellar/go/1.10.1/libexec/pkg/darwin_amd64/os/user.a
-rw-r--r--  1 hwang8  admin  101548 Mar 28 21:28 /usr/local/Cellar/go/1.10.1/libexec/pkg/darwin_amd64/os/user.a

It is usr and group permission issue.

icecoffee531 pushed a commit to icecoffee531/argo-workflows that referenced this issue Jan 5, 2022
…j#818)

* docs: service account for eventsource and sensor

* fix lint

* lint

* added doc for managed-namespace
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

1 participant