Skip to content

compile on linux #402

@biskit

Description

@biskit

did as instructed
go get github.com/lni/dragonboat/v4@master

compiling on linux throws errors:

bs@aix:~$ go version
go version go1.22.12 linux/amd64
# github.com/lni/dragonboat/v4/internal/vfs
/home/bs/go/pkg/mod/github.com/lni/dragonboat/v4@v4.0.0-20250723143628-076c7f6497dc/internal/vfs/vfs.go:54:17: cannot use (*PebbleFS)(nil) (value of type *PebbleFS) as "github.com/cockroachdb/pebble/vfs".FS value in variable declaration: *PebbleFS does not implement "github.com/cockroachdb/pebble/vfs".FS (missing method OpenReadWrite)
/home/bs/go/pkg/mod/github.com/lni/dragonboat/v4@v4.0.0-20250723143628-076c7f6497dc/internal/vfs/vfs.go:58:9: cannot use &PebbleFS{…} (value of type *PebbleFS) as "github.com/cockroachdb/pebble/vfs".FS value in return statement: *PebbleFS does not implement "github.com/cockroachdb/pebble/vfs".FS (missing method OpenReadWrite)
/home/bs/go/pkg/mod/github.com/lni/dragonboat/v4@v4.0.0-20250723143628-076c7f6497dc/internal/vfs/vfs.go:73:9: cannot use p.fs.Create(name) (value of interface type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
/home/bs/go/pkg/mod/github.com/lni/dragonboat/v4@v4.0.0-20250723143628-076c7f6497dc/internal/vfs/vfs.go:88:13: cannot use f (variable of interface type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in argument to opt.Apply: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
/home/bs/go/pkg/mod/github.com/lni/dragonboat/v4@v4.0.0-20250723143628-076c7f6497dc/internal/vfs/vfs.go:90:9: cannot use f (variable of interface type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
/home/bs/go/pkg/mod/github.com/lni/dragonboat/v4@v4.0.0-20250723143628-076c7f6497dc/internal/vfs/vfs.go:95:9: cannot use p.fs.OpenDir(name) (value of interface type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
/home/bs/go/pkg/mod/github.com/lni/dragonboat/v4@v4.0.0-20250723143628-076c7f6497dc/internal/vfs/vfs.go:115:9: cannot use p.fs.ReuseForWrite(oldname, newname) (value of interface type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)

this is why i cloned locally to fix these errors in internal/vfs/vfs.go and cloned vfs to fix errors in github.com/lni/vfs

seemed to work on mac but then got caught out with prealloc errors in linux, as in #401

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions