Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

install necessary packages for using a CGO-extension compiled version of Hugo #183

Closed
fool opened this issue Jul 10, 2018 · 26 comments
Closed
Labels
feat/builds medium-priority type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@fool
Copy link
Contributor

fool commented Jul 10, 2018

When attempting to run a new hugo build, it seems we are missing some dependencies:

6:20:18 PM: Executing user command: ./hugo --config paceup.com.toml,config.toml
6:20:18 PM: ./hugo: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./hugo)
6:20:18 PM: ./hugo: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./hugo)

We need to install whatever is needed here :)

@regisphilibert
Copy link

Untill then it’s hard to mention Netlify (let alone use it) alongside Hugo Pipes... too bad because speeding up deployement is among the big pros 😔

@DirtyF
Copy link
Contributor

DirtyF commented Jul 24, 2018

@regisphilibert for now you have to commit generated resourcesas @bep shows on https://hugoscss.netlify.com/ 😲

@regisphilibert
Copy link

regisphilibert commented Jul 24, 2018

@DirtyF this repo commits its resources directory. For me tt’s really not ideal if the assets can be edited by an editor.

@thom4parisot
Copy link

@regisphilibert my understanding is commiting the resources folder is only a workaround solution whilst this PR has not landed. Once it is the case, I think Hugo resources.ToCSS will work as expected.

Is that correct?

@regisphilibert
Copy link

@brycekahle
Copy link
Contributor

Appears it was intended to be a dynamically linked binary: gohugoio/hugo#4985

@jensamunch
Copy link

this doesn't work still for hugo 0.46

what is the best thread for tracking this issue and netlify using the extended version?

@brycekahle
Copy link
Contributor

@jensamunch This issue is tracking it.

@fool
Copy link
Contributor Author

fool commented Aug 1, 2018

hugo 0.46 works well for me - just can't use the extended version, right @jensamunch ?

@thom4parisot
Copy link

I did not fully grasp why installing this specific version of libstdc++ solves the problem but this message on Hugo forums explains how to install a version of libstdc++ which is picked up by Hugo and works with the extended build: https://discourse.gohugo.io/t/solved-hugo-v44-extended-and-relocation-errors-on-travis/13029/5

@baublet
Copy link

baublet commented Aug 24, 2018

Ping for visibility. As of Hugo 0.47.1, extended still won't work on Netlify due to two reasons:

  1. The default binary Netlify uses is not the extended binary
  2. The Netlify image needs the required dependencies (see @oncletom's comment above) to run the extended binary.

To those looking for a workaround until this is fixed:

Run hugo locally with the extended version, then check in your resources/_gen/assets directory to the repository so that Hugo skips trying to generate the assets.

@sshesh
Copy link

sshesh commented Sep 5, 2018

I installed hugo through snap and a recent version (0.47.1) works well for me.

$ snap list
Name Version Rev Tracking Publisher Notes
core 16-2.35 5328 stable canonical* core
hugo 0.47.1 2590 stable hugo-authors -

@bep
Copy link

bep commented Sep 14, 2018

Doing ldd --version in a Netlify script gets this:

ldd (Ubuntu EGLIBC 2.19-0ubuntu6.13) 2.19
12:28:30 AM: Copyright (C) 2014 Free Software Foundation, Inc.
12:28:30 AM: This is free software; see the source for copying conditions.  There is NO
12:28:30 AM: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12:28:30 AM: Written by Roland McGrath and Ulrich Drepper.

This is a Ubuntu from 4 years+ ago. Debian and Ubuntu have since moved from EGLIBC to GLIBC -- which should work fine with the extended Hugo version. If not, let me know and I will look into it quickly from the Hugo side of it.

/cc @biilmann

@fool
Copy link
Contributor Author

fool commented Sep 15, 2018 via email

@fool
Copy link
Contributor Author

fool commented Sep 25, 2018

To summarize the currently available workarounds:

  1. recommended, follow bep's advice here: https://discourse.gohugo.io/t/netlify-and-hugo-pipes/13145 - summarized in the thread on this issue here: install necessary packages for using a CGO-extension compiled version of Hugo #183 (comment)
  2. not recommended but may work for you: install necessary packages for using a CGO-extension compiled version of Hugo #183 (comment)

RealOrangeOne added a commit to RealOrangeOne/theorangeone.net that referenced this issue Oct 5, 2018
RealOrangeOne added a commit to RealOrangeOne/theorangeone.net that referenced this issue Oct 5, 2018
RealOrangeOne added a commit to RealOrangeOne/theorangeone.net that referenced this issue Oct 5, 2018
pl4nty pushed a commit to pl4nty/blog that referenced this issue Nov 17, 2018
ZachGlassman added a commit to ZachGlassman/personal-site that referenced this issue Nov 23, 2018
@bcomnes
Copy link
Contributor

bcomnes commented Feb 16, 2019

Since this is solved in the xenial image and isn't easily solvable in the trusty image, I'm going to close this issue. We should have that image out to everyone soonish.

@bcomnes bcomnes closed this as completed Feb 16, 2019
@RealOrangeOne
Copy link

@bcomnes surely that means this issue is still valid? It's not actually solved until the xenial-based image has shipped

@aborruso
Copy link

@baublet you have writtern

To those looking for a workaround until this is fixed:

Run hugo locally with the extended version, then check in your resources/_gen/assets directory to the repository so that Hugo skips trying to generate the assets.

I'm a newbie: what's the menaning of "check in your resources/_gen/assets directory to the repository so that Hugo skips trying to generate the assets". What I must set in my repo and in netlify?

Thank you

@regisphilibert
Copy link

I'm a newbie: what's the menaning of "check in your resources/_gen/assets

Hugo will not "generate" resources if they are found in resources/_gen/assets. So make sure the resources/_gen/assets is indexed by git. Then build your sass resources locally (running hugo), commit resources change and push.

This does mean you need to run hugo locally when changing your scss file.

There's nothing to do on Netlify's hand.

@bcomnes
Copy link
Contributor

bcomnes commented Feb 16, 2019

@RealOrangeOne the issue, from the perspective of this issue tracker, is closed, in that the work needed to get the code working in this repo on master is completed, and all available workarounds we can add to a 14.04 image thats currently deployed publicly.

Again, apologies for this taking so long to get out, we are currently working on infrastructure that will dramatically increase the update cadence for build-images.

When it is shipped, we will be publicly announcing it on our blog and twitter. If you want super duper early access, I can arrange that as well.

@jaysee00
Copy link

This also seems to be happening for anyone who tries to use the nodegit package as part of their build command:

 Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not   found (required by /opt/build/repo/node_modules/nodegit/build/Release/nodegit.  node)

See nodegit/nodegit#853

dgasmith added a commit to MolSSI/QCArchiveWebsite that referenced this issue Mar 12, 2019
@newsch
Copy link

newsch commented May 4, 2019

I just checked in on this again, and found that the Xenial image is available for use. I didn't see any mention of it here so I figured I'd leave a comment.
Sass compilation worked fine for me after changing the build image!

@beausmith
Copy link

beausmith commented Nov 17, 2019

I can confirm. I switched to the build image to Ubuntu Xenial 16.04 (default) and was able to successfully build and hugo with sass/scss on netlify…

image

bilke added a commit to ufz/ogs that referenced this issue Dec 2, 2019
Removed generated js and css files from git repo as generating these is
now supported on Netlify during build:

netlify/build-image#183

Make sure to install the "extended" version of Hugo when using it locally.
@wmerussi
Copy link

wmerussi commented Mar 9, 2020

Updated the build image selection like @beausmith and netlify.toml with the content from hugo website and now it's back online :)

@verythorough verythorough added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat/builds medium-priority type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests