filecoin-project / filecoin-project/venus

[venus] Lift the chain module's dependence on filecoin-ffi / 解除chain模块对filecoin-ffi的依赖

Open
#5,732 0 comments 1 reaction 0 assignees View on GitHub
C-enhancement dependencies
Dominant language
Go
Stars
2.1k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

### 链服务模块 / Chain Service Components

- [X] venus
- [ ] venus-auth
- [ ] venus-gateway
- [ ] venus-messager
- [ ] venus-miner
- [ ] 文档 / docs

### 订单服务模块 / Deal Service Components

- [ ] venus-market
- [ ] 文档 / docs

### 算力服务模块 / Storage Power Service Components

- [ ] venus-sector-manager
- [ ] venus-worker
- [ ] 文档 / docs

### 描述 / Description

version: venus v1.10.0-rc2

venus pkg/chain模块很多函数被其他venus组件调用,但是因其引用了filecoin-ffi,故一旦其他组件没有将filecoin-ffi加入submodule,将会无法编译。

依赖关系:
```
go: finding module for package github.com/filecoin-project/filecoin-ffi/cgo
github.com/filecoin-project/venus-miner/miner imports
github.com/filecoin-project/venus/pkg/chain imports
github.com/filecoin-project/venus/pkg/state tested by
github.com/filecoin-project/venus/pkg/state.test imports
github.com/filecoin-project/venus/tools/gengen/util imports
github.com/filecoin-project/venus/pkg/genesis imports
github.com/filecoin-project/venus/pkg/gen/genesis imports
github.com/filecoin-project/venus/pkg/fvm imports
github.com/filecoin-project/filecoin-ffi/cgo
```

编译错误信息:
```
# pkg-config --cflags -- /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc /root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
Failed to open '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc': No such file or directory
No package '/root/go/pkg/mod/github.com/filecoin-project/filecoin-ffi@v1.20.0-rc1.0.20230214023407-7efaa7b47fe9/cgo/../filcrypto.pc' found
pkg-config: exit status 1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.