brentp / goleft

goleft is a collection of bioinformatics tools distributed under MIT license in a single static binary
MIT License
216 stars 25 forks source link

No longer possible to build from source or include in a Docker image #68

Closed aofarrel closed 3 years ago

aofarrel commented 3 years ago

Please close this if I'm misdiagnosing the issue, but it seems that goleft can't be built from the source anymore.

I first noticed this today when I tried to build a docker container which pulls from goleft. Last month it worked fine. This month, it fails to build.

=> ERROR [ 9/20] RUN go get -u github.com/brentp/goleft/...                            70.0s
 ------
> [ 9/20] RUN go get -u github.com/brentp/goleft/...:
 #13 69.81 # github.com/brentp/goleft/indexcov
 #13 69.81 src/github.com/brentp/goleft/indexcov/plot.go:477:9: assignment mismatch: 2 variables but plot.New returns 1 values

After some debugging I realized that I also cannot build from source, but it throws a different error, making me think that a prequiste to your code might have been changed somewhere in the past month or so?

>go get -u github.com/brentp/goleft/...
# cd /Users/ash/go/src/github.com/go-latex/latex; git pull --ff-only
Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.
package github.com/go-latex/latex/drawtex: exit status 1

Building without the update flag doesn't seem to be working either...


>go get github.com/brentp/goleft/...
# gonum.org/v1/plot/text
../../go/src/gonum.org/v1/plot/text/latex.go:153:3: cannot use hdlr.Fonts.Lookup(rm, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
../../go/src/gonum.org/v1/plot/text/latex.go:154:3: cannot use hdlr.Fonts.Lookup(rm, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
../../go/src/gonum.org/v1/plot/text/latex.go:155:3: cannot use hdlr.Fonts.Lookup(it, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
../../go/src/gonum.org/v1/plot/text/latex.go:156:3: cannot use hdlr.Fonts.Lookup(bf, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
../../go/src/gonum.org/v1/plot/text/latex.go:157:3: cannot use hdlr.Fonts.Lookup(bfit, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
../../go/src/gonum.org/v1/plot/text/latex.go:221:3: cannot use op.Glyph.Font (type *truetype.Font) as type *sfnt.Font in field value
```> **go get github.com/brentp/goleft/...**
> # gonum.org/v1/plot/text
> ../../go/src/gonum.org/v1/plot/text/latex.go:153:3: cannot use hdlr.Fonts.Lookup(rm, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
> ../../go/src/gonum.org/v1/plot/text/latex.go:154:3: cannot use hdlr.Fonts.Lookup(rm, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
> ../../go/src/gonum.org/v1/plot/text/latex.go:155:3: cannot use hdlr.Fonts.Lookup(it, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
> ../../go/src/gonum.org/v1/plot/text/latex.go:156:3: cannot use hdlr.Fonts.Lookup(bf, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
> ../../go/src/gonum.org/v1/plot/text/latex.go:157:3: cannot use hdlr.Fonts.Lookup(bfit, fnt.Size).Face (type *sfnt.Font) as type *truetype.Font in field value
> ../../go/src/gonum.org/v1/plot/text/latex.go:221:3: cannot use op.Glyph.Font (type *truetype.Font) as type *sfnt.Font in field value
brentp commented 3 years ago

I probably should switch to use go modules so this can't happen. But your build error is looking for master when they are now using main . So I think you can just delete the repo from your machine and retry (then you'll likely get the same error).

brentp commented 3 years ago

I just pushed a fix for this. contributions changing goleft to use go modules would be much appreciated.