sold: Cannot build sold on MacOS by following build instructions
Following the build instructions at https://github.com/rui314/mold#how-to-build:
git clone git@github.com:bluewhalesystems/sold.git
mkdir sold/build
cd sold/build
git checkout v1.10.1
../install-build-deps.sh
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++
cmake --build . -j $(nproc)
sudo cmake --install .
Fails at various points:
% git checkout v1.10.1
error: pathspec 'v1.10.1' did not match any file(s) known to git
% ../install-build-deps.sh
../install-build-deps.sh: line 3: /etc/os-release: No such file or directory
% sw_vers
ProductName: macOS
ProductVersion: 12.6.1
BuildVersion: 21G217
Xcode Version 14.2 (14C18)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (8 by maintainers)
Maybe we could add this to the README:
Install
Note: the command to use sold is, by default,
moldRust
To use sold with Rust, create
.cargo/config.tomlat the root of your project with the following:Change
/path/to/moldto the absolute path of themoldexecutable (usually/usr/local/bin/ld64.mold)Then find out what your platform is:
…and replace the
<platform>in your config.toml with it.Checking whether
moldwas used to link a binaryTo find out whether
moldwas used to link your binary, runWhen mold was used, the output should contain
tool 54321