filecoin-project / filecoin-project/lotus-docs
Missing `hwloc` building lotus locally with make
- Dominant language
- HTML
- Stars
- 34
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
As seen in this [local network doc page](https://lotus.filecoin.io/lotus/developers/local-network/).
The issue is two-fold:
1. Running `make 2k` and `make lotus-seed` resulting in the following error:
```
ld: library 'hwloc' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
An extra flag is required for `go build` to locate 'hwloc` as per following:
```
go build -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.0cdf58849 -extldflags=-L/usr/local/opt/openblas/lib -extldflags=-L/usr/local/opt/hwloc/lib" -tags=2k -o lotus ./cmd/lotus
```
2. The doc did assume that running the first command also build `lotus-seed` executable, which it didn't. A separate command is required to build it (of course, with an extra flag for 'hwloc'):
```
go build -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.0cdf58849 -extldflags=-L/usr/local/opt/openblas/lib -extldflags=-L/usr/local/opt/hwloc/lib" -o lotus-seed ./cmd/lotus-seed
```
Solution: Best way is to keep the doc workflow as-is and add the build flag to the makefile.
Platform: Mac OSX 13.6.6
Go version: 1.22.2 darwin/amd64
@rjan90
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.