Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing hwloc building lotus locally with make #724

Open
jochasinga opened this issue Apr 23, 2024 · 0 comments
Open

Missing hwloc building lotus locally with make #724

jochasinga opened this issue Apr 23, 2024 · 0 comments

Comments

@jochasinga
Copy link

jochasinga commented Apr 23, 2024

As seen in this local network doc page.

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
  1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant