Open
Description
As seen in this local network doc page.
The issue is two-fold:
- Running
make 2k
andmake 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
- 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
Metadata
Metadata
Assignees
Labels
No labels