diff --git a/Earthfile b/Earthfile index 985b954..ac9860b 100644 --- a/Earthfile +++ b/Earthfile @@ -49,7 +49,7 @@ build: COPY +amt-rpc-lib/librpc.so /usr/local/lib/librpc.so COPY +amt-rpc-lib/librpc.h /usr/local/include/librpc.h - RUN go build -o agent-provider-amt cmd/main.go && upx agent-provider-amt + RUN go build -ldflags "-linkmode 'external'" -o agent-provider-amt cmd/main.go && upx agent-provider-amt SAVE ARTIFACT agent-provider-amt AS LOCAL artifacts/agent-provider-amt diff --git a/pkg/amtrpc/amtrpc.go b/pkg/amtrpc/amtrpc.go index e9ec47b..33f1c78 100644 --- a/pkg/amtrpc/amtrpc.go +++ b/pkg/amtrpc/amtrpc.go @@ -3,8 +3,7 @@ package amtrpc /* -#cgo CFLAGS: -I./src -#cgo LDFLAGS: -L./lib -lrpc -Wl,-rpath=./lib +#cgo LDFLAGS: -L/usr/local/lib -lrpc -Wl,-rpath=/usr/local/lib #include #include "librpc.h" */