ValveSoftware / ValveSoftware/Proton
Build error: `collect2: fatal error: cannot find 'ld'`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 32.8k
- Forks
- 1.6k
- PR merge metrics
- PR metrics pending
Description
When trying to compile latest head (75231818302bdf746d79ddf76e241363b9e2b5e8) from source, I'm running into the following error:
touch /home/ath/devel/Proton/build/build-proton_7.0-local/.wine-configure64
error: linking with `x86_64-linux-gnu-gcc` failed: exit status: 1
|
= note: "x86_64-linux-gnu-gcc" "-Wl,--version-script=/tmp/rustcsLOTLc/list" "-m64" "/home/ath/devel/Proton/build/build-proton_7.0-local/obj-mediaconv64/x86_64-unknown-linux-gnu/release/deps/protonmediaconverter.protonmediaconverter.25f6e458-cgu.1.rcgu.o" "-Wl,--as-needed" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/obj-mediaconv64/x86_64-unknown-linux-gnu/release/deps" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/obj-mediaconv64/release/deps" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/dst-gstreamer64/lib64" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/dst-gstreamer64/lib64" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/dst-gst_base64/lib64" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/dst-gstreamer64/lib64" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/dst-gstreamer64/lib64" "-L" "/home/ath/devel/Proton/build/build-proton_7.0-local/dst-gst_base64/lib64" "-L" "/opt/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,--end-group" "-Wl,-Bstatic" "/opt/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-2a0b2a4f96acb821.rlib" "-Wl,-Bdynamic" "-lgstaudio-1.0" "-lgstbase-1.0" "-lgsttag-1.0" "-lgstreamer-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgstvideo-1.0" "-lgstbase-1.0" "-lgstreamer-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgstbase-1.0" "-lgstreamer-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lgstreamer-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/opt/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/ath/devel/Proton/build/build-proton_7.0-local/obj-mediaconv64/x86_64-unknown-linux-gnu/release/deps/libprotonmediaconverter.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-fuse-ld=lld"
= note: collect2: fatal error: cannot find 'ld'
compilation terminated.
It looks like this sub-component attempts to link with lld, which isn't actually installed in the Docker container you are shipping. I figured it might be due to lld being present on the host and perhaps the configure script accidentally somehow propagating that into the container, but uninstalling LLVM on the host doesn't change anything. I'm on Arch with all packages at their latest version and compile using the podman container runtime. Command executed was simply make redist.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with make redist in the shipped Docker container and inspect the container's build configuration for the missing linker dependency. Confirm whether the Rust media-converter link step requires lld or another ld implementation, then verify that a clean container build completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, rust
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100