When trying to compile glfw (and thus glfw-sys) with the src-build flag on x86_64-unknown-linux-gnu, it fails to build the project with a linking error:
rust-lld: error: unable to find library -lglfw.
I found 2 problems with the build script that fixed it for me and could submit a pull request but I don't know if this is the "correct" way.
The 2 problems:
- It is searching for
glfw when the built binary file is glfw3 (glfw-sys/out/lib64/libglfw3.a)
- It adds the search path
[PROJECT_DIR]/target/debug/build/glfw-sys-HASH/out/lib instead of .../lib64
Changing the build script to on line 67 to output the correct library name glfw3 and line 257 from lib to lib64 fixed the linking errors for me.
So I guess the only question I have is when does glfw output to lib64 rather than lib (Maybe on 32 bit? Or if it even does anymore, this may just be left over) and is the output name ever just libglfw.a or is it always now libglfw3.a?