babylonlabs-io / finality-provider

Other
6 stars 10 forks source link

chore: use static linking #25

Open SebastianElvis opened 3 months ago

SebastianElvis commented 3 months ago

Found by @bap2pecs

I also found an interesting issue today. it seems the go binaries e.g. fpd requires dynamic linking, which leads to problem if one user builds it and share to another user:

Aug 02 22:10:25 op-devnet systemd[1]: Started FPD Daemon.
Aug 02 22:10:25 op-devnet fpd[401186]: /home/ubuntu/go/bin/fpd: error while loading shared libraries: libwasmvm.x86_64.so: cannot open shared object file: No such file or directory

running ldd, we can see the dynamic linking. any idea how to make it more portable?

$ ldd /home/ubuntu/go/bin/fpd                                                             [2:08:19]
linux-vdso.so.1 (0x00007ffe19097000)
libwasmvm.x86_64.so => /home/zidong/go/pkg/mod/github.com/!cosm!wasm/wasmvm/v2@v2.0.1/internal/api/libwasmvm.x86_64.so (0x000072d15a200000)