Can't build mimalloc with cmake - cannot find 'ld'
I've downloaded the source code from Github and followed the instruction. First I extracted the contents, then moved inside the fodler, made a out/release and inside it ran
cmake ../..
. The error message that pops up says collection2: fatal error: cannot find 'ld'
. I've searched the internet for the past hour and didn't find anything that solves this.
My Path looks like this: /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/milan/.local/bin:/home/milan/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
I found some files named ld
in usr/bin/
and from what I've gathered, those are the ones that are needed.
My install of Bazzite is 1 week old and stock. I have not done any modifications to it since I am new to Linux and didn't want to mess anything up.
Edit: which ld
returns
/usr/bin/which: no ld in (/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/milan/.local/bin:/home/milan/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin)
Solution:Jump to solution
look into creating a toolchain and installing it somewhere like /opt, there are several ways to achieve it, one of them is using a fedora container and dnf install the tools you need to a mounted volume, then back at the host you temporarily add this volume to your PATH so the ld/cmake/gcc or whatever you need is located and sourced from this shared location. I personally used buildroot, in part inspired by the way godot team sets up their development toolchains, and i target glibc 2.17 if i rem...
6 Replies
This would be a good use case for a distrobox container
I just tried it but the terminal doesn't recognize
cmake
as a command, neither Fedora nor Arch, but which ld
returns a pathyou have to install cmake
in the box
Now I get
No preprocessor test for "PathScale"
😕Solution
look into creating a toolchain and installing it somewhere like /opt, there are several ways to achieve it, one of them is using a fedora container and dnf install the tools you need to a mounted volume, then back at the host you temporarily add this volume to your PATH so the ld/cmake/gcc or whatever you need is located and sourced from this shared location. I personally used buildroot, in part inspired by the way godot team sets up their development toolchains, and i target glibc 2.17 if i remember right. I install my toolchain to /opt and then i source the bash script generated by buildroot for use during ny development.
if you are interested in my approach i can share with you my buildroot fork on github and reuse my toolchain, downside is you have to build it, i dont have it available for download anywhere unfortunately