i have been trying to update the gcs(GURPS character sheet) derivation to the newest version.
the new version is a complete rewrite to go.
it seems this version of gcs depends on GitHub - richardwilkes/pdf which bundles mupdf object files, and compiling fails.
using nm i see that there are various undefined symbols which must be from dynamically linked libraries, so this won’t work in nixos.
i tried to change the #cgo line to use -lmupdf instead of -lmupdf_linux_amd64 but for some reason it has the same problem of missing symbols.
by manually adding -llibrary to the #cgo line i get less linker errors but this is exhausting and not future proof is there any way to get the path of the dependencies of mupdf in the static library generated? or another solution to my problem.
1 Like
Usually it should “just” work to add the libraries to the buildInputs
.
So perhaps share your current expression, such that we can help you.
sure here it is
https://hastebin.skyra.pw/mecikicifi.bash
this as here fails with
/nix/store/ndlw8ji6g2s0vqn7fivkb8sz7zfd67bm-go-1.20.3/share/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
> /nix/store/f4qnwzv6y0nq8lix33jr5ykkyybs6fxf-binutils-2.40/bin/ld: cannot find -lmupdf_linux_amd64: No such file or directory
> collect2: error: ld returned 1 exit status
if i uncomment the substitute in place it misses various libraries which are dependencies of mupdf