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

Make builds with NetworkBundle set do not have git version #8684

Closed
8 of 18 tasks
travisperson opened this issue May 18, 2022 · 1 comment
Closed
8 of 18 tasks

Make builds with NetworkBundle set do not have git version #8684

travisperson opened this issue May 18, 2022 · 1 comment
Assignees
Labels
kind/bug Kind: Bug P2 P2: Should be resolved
Milestone

Comments

@travisperson
Copy link
Contributor

travisperson commented May 18, 2022

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • This is not a question or a support request. If you have any lotus related questions, please ask in the lotus forum.
  • This is not a new feature request. If it is, please file a feature request instead.
  • This is not an enhancement request. If it is, please file a improvement suggestion instead.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I am running the Latest release, or the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to lotus.

Lotus component

  • lotus daemon - chain sync
  • lotus miner - mining and block production
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt)
  • lotus miner/market - storage deal
  • lotus miner/market - retrieval deal
  • lotus miner/market - data transfer
  • lotus client
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Lotus Version

lotus version 1.16.0-dev+interopnet

:=P

Describe the Bug

When running make <network> the resulting binaries do not have commit information.

This is due to setting the ldflags multiple times.

go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus ./cmd/lotus

Due to the ordering of the ldflags, this either will set the NetworkBundle build var or the CurrentCommit build var, but never both.

On the network reset / update side (calibration, butterfly, interop) the ldflags are reversed. This resulted in the CurrentCommit being set correctly, but the NetworkBundle was not set, and mainnet builtin actors would be downloaded.

Logging Information

$ make interopnet
rm -f lotus
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus ./cmd/lotus
rm -f lotus-miner
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus-miner ./cmd/lotus-miner
rm -f lotus-worker
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus-worker ./cmd/lotus-worker
dCaution: you have an existing lotus binary in your PATH. This may cause problems if you don't run 'sudo make install'
rm -f lotus-seed
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus-seed ./cmd/lotus-seed
rm -f lotus-shed
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus-shed ./cmd/lotus-shed
rm -f lotus-wallet
go build -o lotus-wallet ./cmd/lotus-wallet
drm -f lotus-gateway
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus-gateway ./cmd/lotus-gateway
rm -f lotus-fountain
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus-fountain ./cmd/lotus-fountain
go run github.com/GeertJohan/go.rice/rice append --exec lotus-fountain -i ./cmd/lotus-fountain -i ./build
no calls to rice.FindBox() or rice.MustFindBox() found in import path `github.com/filecoin-project/lotus/build`
rm -f lotus-stats
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.d39b9a8d8" -tags=interopnet -ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet -o lotus-stats ./cmd/lotus-stats

Repo Steps

make interopnet
./lotus --version
@jennijuju jennijuju added this to the Network v16 milestone May 23, 2022
@jennijuju jennijuju added P2 P2: Should be resolved and removed need/triage labels May 23, 2022
@Stebalien Stebalien self-assigned this May 24, 2022
Stebalien added a commit that referenced this issue May 24, 2022
Otherwise, we end up overriding the ldflags.

fixes #8684
Stebalien added a commit that referenced this issue May 24, 2022
Otherwise, we end up overriding the ldflags.

fixes #8684
Stebalien added a commit that referenced this issue May 24, 2022
Otherwise, we end up overriding the ldflags.

fixes #8684
@jennijuju
Copy link
Member

closed by #8716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Kind: Bug P2 P2: Should be resolved
Projects
None yet
Development

No branches or pull requests

3 participants