Build problem Arch Linux

Dear all,

Me and a couple of people have trouble building Hugo from source on Arch Linux. At first I opened a bug report, but was told to post here. I am not quite sure where the problem lies, but it seems that the build fails on a data type.

The offending lines:

go build -o hugo main.go
# github.com/spf13/hugo/helpers
…/src/github.com/spf13/hugo/helpers/general.go:250: cannot use &jwalterweatherman.FEEDBACK (type **jwalterweatherman.Feedback) as type logPrinter in field value:
**jwalterweatherman.Feedback does not implement logPrinter (missing Println method)
make: *** [Makefile:27: no-git-info] Error 2
make no-git-info failed

The complete log can be found here and the build script can be found on the AUR. The problem also occurs when trying to build version 0.18.

All of the builds were done using a clean chroot, linux 4.8.13 and Go 1.7.4. If any more information is needed, please let me know and I will happily provide it.

Thanks in advance!

1 Like

Hugo uses govendor to manage dependencies. Build with make install and it should be clearer.

Looking at the Makefile now, and it looks a little suspicious in this area.

make govendor should get you the latest dependencies.

@moorereason maybe make install should sync vendoring? Not sure. Having a target named govendor does not look good (what if whe change to something else).

I will create an issue.

Thank you for your reply. I have changed the installation to “make install”, but it seems that the PKGBUILD will need some revising to get it to work. For some reason, go now thinks that /build/hugo/src/hugo-0.18.1 is outside of the GOPATH while it is assigned to /build/hugo/src.Just running make gives the same error as “make no-git-info”

@fusion809: Maybe you can help here? I’m a bit out of my element tbh.

EDIT: Just looking at the PKGBUILD, shouldn’t

go get -d -v .

pull in all the dependencies already?

I think your issue is kinda similar to mine here: https://discuss.gohugo.io/t/building-on-windows-cannot-find-package-xxx-in-any-of/5039/3

Try moving it from: “/build/hugo/src/hugo-0.18.1”

To: “/build/hugo/src/github.com/spf13/hugo”

Or try using that:

  1. Unzip or install to path: GOPATH + “\github.com\spf13\hugo”
  2. cd to that path
  3. type “govendor sync”
  4. type “go install github.com\spf13\hugo”

govendor is available here: https://github.com/kardianos/govendor