Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate if we can build the snaps statically #4534

Closed
bep opened this issue Mar 25, 2018 · 4 comments
Closed

Investigate if we can build the snaps statically #4534

bep opened this issue Mar 25, 2018 · 4 comments
Labels
Milestone

Comments

@bep
Copy link
Member

bep commented Mar 25, 2018

This was made by someone in Cannocial:

https://github.com/gohugoio/hugo/blob/master/snapcraft.yaml

Building Hugo as a statically linked binary should fix the issue described in https://discourse.gohugo.io/t/hugos-snap-stopped-working/11184/26

It will create a bigger binary, but it is better than a broken binary.

This is how we build the binaries for the GitHub release:

https://github.com/gohugoio/hugo/blob/master/goreleaser.yml#L6

/cc @ElOpio @anthonyfok

@bep bep added this to the v0.38 milestone Mar 25, 2018
@come-maiz
Copy link
Contributor

Hey @bep. I'm no longer working on snapcraft, but my friends @popey and @flexiondotorg can give you a hand.

@anthonyfok
Copy link
Member

Thanks for bringing this to my attention.

And my apologies: I did change something:

I was trying to fix some failed-to-build problems in 0.38-DEV as may be seen here:

Suspecting that it might had to do with the somewhat outdated go1.6 in Ubuntu Xenial (16.04 LTS), I experimented and eventually discovered that changing the "Distribution series" (from Ubuntu Xenial (16.04 LTS) to Ubuntu Artful (17.10) did the trick, and applied the same to the stable series at https://launchpad.net/~gohugoio/+snap/hugo

Unfortunately, as it turned out, that changed caused the following error as reported in the Hugo discussion forum:

/snap/hugo/1455/bin/hugo: relocation error: /snap/hugo/1455/lib/x86_64-linux-gnu/libpthread.so.0: symbol __mmap, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

which turns out even I can reproduce. My sincere apologies for causing all the trouble.

I went to https://launchpad.net/~gohugoio/+snap/hugo and changed it back to Ubuntu Xenial, and the latest revision of Hugo snap (e.g. revision 1462 for amd64) works correctly again. I guess that solves this issue? :-D

@felicianotech
Copy link
Contributor

I can confirm that the fix worked for me. Thanks @anthonyfok.

@github-actions
Copy link

github-actions bot commented Mar 6, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants