garble: Error during garble build

I’m trying to build my go app binary on MacOs, but build fails with error:

/usr/local/Cellar/go/1.15.5/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
Undefined symbols for architecture x86_64:
  "_type.path/to/package/types.ZfUYm", referenced from:
      _z09qX.B.func3.2 in go.o
      _z09qX.D.func2.2 in go.o
  "_type.path/to/package/types.ZmSSZ", referenced from:
      _z9sT0.E in go.o
      _z09qX.B.func3.2 in go.o
      _z09qX.D.func2.2 in go.o
  "_type.path/to/package/types.Zn3Fp", referenced from:
      _z9sT0.C in go.o
      _zdZv7.ZEW_L.func1 in go.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

exit status 2
exit status 2

I tried to build it with GOARCH=arm GOOS=linux envs, but build failed with another error:

path/to/package is my package. Sorry, can’t write it here)

zdzCF.B: relocation target type.path/to/package/types.ZU31i not defined
zdzCF.F: relocation target type.path/to/package/types.ZHdpV not defined
zHIRS.ZCZ_Z.func1: relocation target type.path/to/package/types.ZHdpV not defined
z3hTq.C.func1.2: relocation target type.path/to/package/types.Z8uvN not defined
z3hTq.C.func1.2: relocation target type.path/to/package/types.ZU31i not defined
z3hTq.B.func1.2: relocation target type.path/to/package/types.Z8uvN not defined
z3hTq.B.func1.2: relocation target type.path/to/package/types.ZU31i not defined
exit status 2
exit status 2

It is the same project as in this issue: https://github.com/burrowers/garble/issues/202

Error in https://github.com/burrowers/garble/issues/202 issue seems like fixed, but as you can see new one appeared.

I’m using currently lates revision: https://github.com/burrowers/garble/commit/e014f480f99974a2976166fe5252fc41676a598a

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Right. Which is why there’s also https://github.com/burrowers/garble/issues/218.