Skip to content

Missing hwloc building lotus locally with make #724

Description

@jochasinga

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions