doujiang24 / envoy-go-filter-example

10 stars 4 forks source link

I met a error in example-1 #3

Closed yizhibian closed 1 year ago

yizhibian commented 1 year ago

when I run the same command from this blog https://mosn.io/blog/posts/moe-extend-envoy-using-golang-1/ and it just turn error cannot load : /etc/envoy/libgolang.so error: /lib/aarch64-linux-gnu/libc.so.6: version 'GLIBC_2.32' not found (required by /etc/envoy/libgolang.so)

doujiang24 commented 1 year ago

seems you build the golang.so in your local env(might be macOS), not in the golang:1.19 docker image?

yizhibian commented 1 year ago

seems you build the golang.so in your local env(might be macOS), not in the golang:1.19 docker image?

no :( ,I have tried to build the golang.so in macOS(the version is go1.19.3 , then I ran the next command and the error it give is cannot load : /etc/envoy/libgolang.so error: /etc/envoy/libgolang.so: invalid ELF header and I also built the golang.so in wsl(ubuntu , it give the same error I mentioned above

doujiang24 commented 1 year ago

have you tried the golang:1.19 docker image? the way in the doc, that should works

  1. Golang so is binary machine code, it's OS and CPU arch related.
  2. cgo depends on libc, it requires the same libc version, between the compiling box and running box.
doujiang24 commented 1 year ago

https://github.com/doujiang24/envoy-go-filter-example/issues/2

this may also be helpful.

yizhibian commented 1 year ago

2

this may also be helpful.

Thank you. I have resolved this issue by using the golang1.19.8 and envoy:contrib-v1.26-latest images, which do not require GLIBC_2.32.