Troubleshooting


Please let us know if you don't find a solution to your issue by creating an issue on the GitHub repository or contacting us by email at support@sqreen.com.

Compilation errors

Relocation target _sqreen_atomic_load_pointer not defined
This a Go linker error due to the missing symbol _sqreen_atomic_load_pointer defined in the agent package. Therefore, it means that the agent is either not imported in the compiled program, either the agent version being compiled is not version >= v0.1.0-beta.10.
ld: library not found for -lwaf
This error is due to missing files not properly copied by vendoring tools from the agent package and its dependencies. Please refer to the vendoring section for details on how to solve this issue.
fatal error: waf.h: No such file or directory
This error is due to missing files not properly copied by vendoring tools from the agent package and its dependencies. Please refer to the vendoring section for details on how to solve this issue.

Vendoring

Some vendoring tools do not copy non-Go files, leading to compilation errors. The Go agent includes some C files and static libraries that need to be taken into account by the vendoring tool you use.

Vendoring the agent and its dependencies using go mod vendor is possible since version >=v0.1.0-beta.10.

You need otherwise to copy the non-Go files. The C library is contained in the Go package github.com/sqreen/go-libsqreen. The following script shows an example of how you can workaround the issue by overwriting the vendor content:

# Update your vendor directory
my-project/ $ my-vendor-tool
# Download go-libsqreen with into your GOPATH
my-project/ $ go get -d github.com/sqreen/go-libsqreen/...
# Get the download directory filepath
my-project/ $ libsqreen_dir=$(go env GOPATH)/src/github.com/sqreen/go-libsqreen
# Overwrite your previously vendored one with it
my-project/ $ cp -r $(libsqreen_dir) ./vendor/github.com/sqreen/