argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.83k stars 3.17k forks source link

riscv64 compiling error: `expected 'package', found signal_darwin` #9590

Closed xswfantasy closed 1 week ago

xswfantasy commented 1 year ago

Hello: I am compiling argo-workflow (v3.3.9) under the riscv64 architecture. When I execute make dist/argoexec, I get an error:

make dist/argoexec:

GIT_COMMIT=5db53aa0ca54e51ca69053e1d3272e37064559d7 GIT_BRANCH=HEAD GIT_TAG=v3.3.9 GIT_TREE_STATE=dirty RELEASE_TAG=true DEV_BRANCH=false VERSION=v3.3.9
KUBECTX=none DOCKER_DESKTOP=false K3D=false DOCKER_PUSH=false
RUN_MODE=local PROFILE=minimal AUTH_MODE=hybrid SECURE=false STATIC_FILES=true ALWAYS_OFFLOAD_NODE_STATUS=false UPPERIO_DB_DEBUG=0 LOG_LEVEL=debug NAMESPACED=true
CGO_ENABLED=0 go build -v -ldflags '-X github.com/argoproj/argo-workflows/v3.version=v3.3.9 -X github.com/argoproj/argo-workflows/v3.buildDate=2022-09-14T11:40:24Z -X github.com/argoproj/argo-workflows/v3.gitCommit=5db53aa0ca54e51ca69053e1d3272e37064559d7 -X github.com/argoproj/argo-workflows/v3.gitTreeState=dirty -X github.com/argoproj/argo-workflows/v3.gitTag=v3.3.9 -extldflags -static' -o dist/argoexec ./cmd/argoexec
workflow/executor/os-specific/signal_linux.go:1:1: expected 'package', found signal_darwin
make: *** [Makefile:228: dist/argoexec] Error 1

uname -a:

Linux 74255990087b 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 riscv64 riscv64 riscv64 GNU/Linux

Do you have any ideas about where the problem lies?

alexec commented 1 year ago

signal_linux.go is a symlink to signal_darwin.go

Something to do with your OS?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.

agilgur5 commented 1 month ago

Possibly same issue with symlinks as #12603

chengjoey commented 1 week ago

+1, mac os m1 command:

make argoexec-image TARGET_PLATFORM=linux/arm64 IMAGE_NAMESPACE=${my-docker-repo}

error:

 > [argoexec-build 1/1] RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build make dist/argoexec GIT_COMMIT=3450c2f15148a123c950840f1f87e1db5062f01f GIT_TAG=untagged GIT_TREE_STATE=dirty:
0.196 fatal: not a git repository (or any of the parent directories): .git
0.199 fatal: not a git repository (or any of the parent directories): .git
0.200 fatal: not a git repository (or any of the parent directories): .git
0.203 bash: line 1: [: =: unary operator expected
0.204 bash: line 1: [: =: unary operator expected
0.207 GIT_COMMIT=3450c2f15148a123c950840f1f87e1db5062f01f GIT_BRANCH= GIT_TAG=untagged GIT_TREE_STATE=dirty RELEASE_TAG=false DEV_BRANCH=true VERSION=latest
0.213 KUBECTX=none DOCKER_DESKTOP=false K3D=false DOCKER_PUSH=false TARGET_PLATFORM=linux/arm64
0.213 RUN_MODE=local PROFILE=minimal AUTH_MODE=hybrid SECURE=false  STATIC_FILES=false ALWAYS_OFFLOAD_NODE_STATUS=false UPPERIO_DB_DEBUG=0 LOG_LEVEL=debug NAMESPACED=true
1.731 workflow/executor/os-specific/signal_linux.go:1:1: expected 'package', found signal_darwin
2.720 find: manifests/base/crds: No such file or directory
2.792 find: examples: No such file or directory
2.792 CGO_ENABLED=0 go build -v -gcflags '' -ldflags '-X github.com/argoproj/argo-workflows/v3.version=latest -X github.com/argoproj/argo-workflows/v3.buildDate=2024-08-29T15:02:25Z -X github.com/argoproj/argo-workflows/v3.gitCommit=3450c2f15148a123c950840f1f87e1db5062f01f -X github.com/argoproj/argo-workflows/v3.gitTreeState=dirty -X github.com/argoproj/argo-workflows/v3.gitTag=untagged -extldflags -static' -o dist/argoexec ./cmd/argoexec
2.961 workflow/executor/os-specific/signal_linux.go:1:1: expected 'package', found signal_darwin
2.963 make: *** [Makefile:229: dist/argoexec] Error 1
agilgur5 commented 1 week ago

@chengjoey my guess is that your git installation has core.symlinks disabled as that was the same error in #12603, as I wrote above, and that file is a symlink, as Alex wrote above. See also https://github.com/argoproj/argo-workflows/pull/12604#issuecomment-1972763515

chengjoey commented 1 week ago

my guess is that your git installation has core.symlinks disabled

yeah, i set core.symlinks=true, then it worked

chengjoey commented 1 week ago

also add note for this, #13534, feel free to close this pr if it is not necessary