[x]):Building gitea (master branch) on ArchLinux with makepkg fails:
GOPATH="/path/to/src" make DESTDIR="/path/to/pkg" generate build
..
code.gitea.io/gitea/cmd
code.gitea.io/gitea
# code.gitea.io/gitea
flag provided but not defined: -Wl,-O1,--sort-common,--as-needed,-z,relro
usage: link [options] main.o
Build becomes successful when unsetting LDFLAGS:
GOPATH="/path/to/src" LDFLAGS="" make DESTDIR="path/to/pkg" generate build
Seems flags should be unset/ignored or parsed differently (*sorry, not a Go-developer).
Also using TAGS="bindata" results in build errors:
# code.gitea.io/gitea/modules/templates
modules/templates/static.go:35: undefined: Asset
modules/templates/static.go:36: undefined: AssetDir
modules/templates/static.go:37: undefined: AssetInfo
modules/templates/static.go:38: undefined: AssetNames
modules/templates/static.go:51: undefined: AssetNames
modules/templates/static.go:60: undefined: Asset
Link to full log.
Thanks. :)
bindata has a separate dependency which should be pulled in by running make generate 馃槙
As for LDFLAGS, could you try removing the flags one-by-one (from /etc/makepkg.conf) and see which one makes it fail?
Seems like hugo overrides any LDFLAGS that the system sets... I wonder if that is considered "nice" by any packaging standard...
Looks like we should also do that.
@tboerger can you make a PR for that?
@francoism90 should be solved via https://github.com/go-gitea/gitea/pull/709
Most helpful comment
@francoism90 should be solved via https://github.com/go-gitea/gitea/pull/709