I was trying to compile a static linked binary to distribute a tool easily, but I ran into an issue trying to compile this library. I'm using Zig to compile the binary and leverage its build system.
The command I ran:
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC="zig cc -target x86_64-linux-musl" CXX="zig c++ -target x86_64-linux-musl" go build -o amd64-build
The output (truncated):
ld.lld: error: undefined symbol: __fprintf_chk
>>> referenced by context.c
output.o:(file_truncate) in archive .../.gvm/pkgsets/go1.21.3/global/pkg/mod/github.com/gen2brain/go-fitz@v1.23.7/libs/libmupdf_linux_amd64.a
I was trying to compile a static linked binary to distribute a tool easily, but I ran into an issue trying to compile this library. I'm using Zig to compile the binary and leverage its build system.
The command I ran:
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC="zig cc -target x86_64-linux-musl" CXX="zig c++ -target x86_64-linux-musl" go build -o amd64-build
The output (truncated):