Gitea: When using make: flag provided but not defined

Created on 30 Dec 2016  路  5Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): git (master)
  • Git version: 2.11.0
  • Operating system: Arch Linux x64
  • Database (use [x]):

    • [ ] PostgreSQL

    • [X] MySQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [ ] No

    • [X] Not relevant

  • Log gist:

Description

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. :)

Link: https://aur.archlinux.org/packages/gitea-git/

kinbug kindeployment

Most helpful comment

@francoism90 should be solved via https://github.com/go-gitea/gitea/pull/709

All 5 comments

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...

ref: https://github.com/spf13/hugo/blob/master/Makefile#L9

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flozz picture flozz  路  3Comments

jonasfranz picture jonasfranz  路  3Comments

tuxfanou picture tuxfanou  路  3Comments

haytona picture haytona  路  3Comments

lunny picture lunny  路  3Comments