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

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

Closed
fool opened this issue Jul 10, 2018 · 26 comments
Closed

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

fool opened this issue Jul 10, 2018 · 26 comments

Comments

@fool
Copy link
Member

@fool 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

@regisphilibert regisphilibert commented Jul 24, 2018

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

@oncletom
Copy link

@oncletom oncletom commented Jul 24, 2018

@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?

@brycekahle
Copy link
Contributor

@brycekahle brycekahle commented Jul 31, 2018

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

brycekahle added a commit that referenced this issue Jul 31, 2018
Fixes #183
@jensamunch
Copy link

@jensamunch jensamunch commented Aug 1, 2018

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

@brycekahle brycekahle commented Aug 1, 2018

@jensamunch This issue is tracking it.

@fool
Copy link
Member Author

@fool fool commented Aug 1, 2018

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

@oncletom
Copy link

@oncletom oncletom commented Aug 7, 2018

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

bahlo added a commit to bahlo/blog that referenced this issue Aug 29, 2018
snithish pushed a commit to snithish/blog that referenced this issue Aug 30, 2018
Nithish Sankaranarayanan
snithish pushed a commit to snithish/blog that referenced this issue Aug 30, 2018
Nithish Sankaranarayanan
@sshesh
Copy link

@sshesh 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 -

@fool
Copy link
Member Author

@fool fool commented Sep 15, 2018

@fool
Copy link
Member Author

@fool 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: #183 (comment)
  2. not recommended but may work for you: #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/pl4nty.github.io that referenced this issue Nov 17, 2018
ZachGlassman added a commit to ZachGlassman/personal-site that referenced this issue Nov 23, 2018
newsch added a commit to newsch/newsch.github.io that referenced this issue Nov 23, 2018
@gcushen gcushen mentioned this issue Jan 29, 2019
11 of 11 tasks complete
@bcomnes
Copy link
Contributor

@bcomnes 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 Feb 16, 2019
@RealOrangeOne
Copy link

@RealOrangeOne RealOrangeOne commented Feb 16, 2019

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

@aborruso
Copy link

@aborruso aborruso commented Feb 16, 2019

@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

@regisphilibert regisphilibert commented Feb 16, 2019

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

@jaysee00 jaysee00 commented Feb 27, 2019

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 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 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.
@bilke bilke mentioned this issue Dec 2, 2019
1 of 1 task complete
@wmerussi
Copy link

@wmerussi 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 :)

olof-nord added a commit to olof-nord/olof.info that referenced this issue Nov 1, 2020
As per Netlify instructions, this is required to get SCSS/SASS or other pre-processing styles to work.

This is needed, as the hugo-ficurinia theme is using scss styling.

netlify/build-image#183 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet