jx: Test failure on power: "bouk/monkey/replace.go:24:14: undefined: jmpToFunctionValue"
Summary
Test failure at bouk/monkey Go module.
Steps to reproduce the behavior
- Build the source for jenkinsX/jx using “make build”
- Run “make test”
Jx version
The output of jx version
is:
NAME VERSION
jx 1.0.1
git git version 2.7.4
Kubernetes cluster
Local cluster, created using minikube setup.
Operating system / Environment
Linux Ubuntu16.04 / ppc64le architecture
Expected behavior
Test should pass.
Actual behavior
Failing with a missing function message:
# github.com/jenkins-x/jx/vendor/github.com/bouk/monkey
vendor/github.com/bouk/monkey/replace.go:24:14: undefined: jmpToFunctionValue
Looking at the code I observed that there are architecture specific implementation for monkey.so monkey_386.go:4:func jmpToFunctionValue(to uintptr) []byte { monkey_amd64.go:4:func jmpToFunctionValue(to uintptr) []byte {
I could not find a generic implementation in place which should work for other architectures? Is there a generic implementation available which I might have missed ? Some guideline to fix this would really help.
Thanks, Meghali
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 27 (1 by maintainers)
As a workaround. Run with GOARCH=amd64 appears to work on M1. This also work in Golang, it the variable set in “Run/debug configuration”.
This is sad, doesn’t work on mac with new M1 chips. @ccojocar Any idea when it might be supported
Putting this variable takes away ability to stop at break points while debugging. @prashant-chai
M1 monkey doesn’t work~~~
Right in env variables
same probleam
The arm64 compile problem of bouk/monkey is fixed by @Leo-Guo here: https://github.com/Leo-Guo/monkey but with wrong module name, so I have simply fixed module name: https://github.com/procodr/monkey
Tested on M1 with
GOARCH=arm64
and working breakpoints.Did it worked for you @prashant-chai ? I tried setting it up on terminal and run test case but facing same error. Can you please help @dribler