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

Support extended Hugo version #182

Closed
DirtyF opened this issue Jul 10, 2018 · 38 comments
Closed

Support extended Hugo version #182

DirtyF opened this issue Jul 10, 2018 · 38 comments

Comments

@DirtyF
Copy link
Contributor

@DirtyF DirtyF commented Jul 10, 2018

Duplicate of: netlify/binrc#16
Opening an issue here as @futuregerald kindly suggested.

- What is the current behavior?

From version 0.43 Hugo comes in two flavours, extended version allows native Sass compilation.
Netlify currently does not support extended version:

2:28:30 PM: ERROR 2018/07/10 12:28:30 error: failed to transform resource: failed to transform “scss/main.scss” (text/x-scss): this feature is not available in your current Hugo version

Edit: For now, the recommended workflow is to commit your /resources folder after building locally with hugo.

- What is the expected behavior?

Either download the extended binary by default from now on or allow to specify something like 0.43/extended in netlify.toml.

_extended is added to the release path before the version number:

https://github.com/gohugoio/hugo/releases/download/v0.43/hugo_0.43_Linux-64bit.tar.gz
https://github.com/gohugoio/hugo/releases/download/v0.43/hugo_extended_0.43_Linux-64bit.tar.gz

@fool
Copy link
Member

@fool fool commented Jul 10, 2018

the issue on binrc is the one to watch for a resolution.

In the meantime, 1 potential workaround which is not ideal:

follow bep's advice:
https://twitter.com/GoHugoIO/status/1016706519507881986

@jensamunch
Copy link

@jensamunch jensamunch commented Jul 10, 2018

i tried manually including binary in the repo - as a quick-fix - doesn't work:

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)
@fool
Copy link
Member

@fool fool commented Jul 10, 2018

We'll track that separate issue here, @jensamunch : #183

@baublet
Copy link

@baublet baublet commented Aug 24, 2018

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.

@jensamunch
Copy link

@jensamunch jensamunch commented Aug 28, 2018

It would be really great to have a bit more of an explanation from the Netlify team on timeline and plan.

@brycekahle
Copy link
Contributor

@brycekahle brycekahle commented Aug 28, 2018

@jensamunch Unfortunately, the solution involves upgrading the version of Ubuntu we use in the base image. That is a larger user impact than we initial hoped for. In order to ensure a smooth transition for all users, we need to do some work around communicating the changes ahead of time. Once we have a firm timeline, we will communicate that publicly.

@digitalcraftsman digitalcraftsman mentioned this issue Aug 29, 2018
10 of 10 tasks complete
@igk1972
Copy link
Contributor

@igk1972 igk1972 commented Sep 6, 2018

Fast workaround #183 (comment)

adamhammes pushed a commit to adamhammes/hugo-boilerplate that referenced this issue Sep 9, 2018
Currently netlify doesn't support Hugo's asset pipeline
(netlify/build-image#182)
leuzera added a commit to pixellab-ufg/BrailleEcran-site that referenced this issue Nov 14, 2018
leuzera added a commit to pixellab-ufg/BrailleEcran-site that referenced this issue Nov 14, 2018
@rdebeasi
Copy link

@rdebeasi rdebeasi commented Nov 29, 2018

If you don't want to check in resources or install packages on build, here are a couple of other workarounds:

@bwklein
Copy link

@bwklein bwklein commented Dec 6, 2018

Looks like the last dev update was in August. How are things going on this issue?

@bep
Copy link

@bep bep commented Dec 6, 2018

@rdebeasi you don't need the "extended version" to do image processing.

I was told by Netlify several times that this issue is hanging on a upgrade of their build environments from Ubuntu 14.04 (which has an EOL date in April next year).

I have been given the impression that this is something "actively worked on" and that solution was "around the corner". I would probably been looking for an alternative fix from the Hugo side (building 14.04 compatible binaries) if I had known that this was going to take so long.

Is it possible to get a time estimate on this issue?

@eberkund
Copy link

@eberkund eberkund commented Dec 6, 2018

For what it's worth the solution posted by @igk1972 is working great for me

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Dec 6, 2018

Hey all, I'm taking over for Bryce on this issue. Sounds like this is blocked by #222

The Ubuntu upgrade is in progress (see the mentioned PR), and I am currently working on improving our build pipeline to accommodate different build images, and free up constraints to help make more frequent releases. I can't give dates yet, but it's high priority and we are actively working on it.

@sijad
Copy link

@sijad sijad commented Dec 9, 2018

the error gone by adding dist: xenial to my .travis.yml, see https://blog.travis-ci.com/2018-11-08-xenial-release

@jensamunch
Copy link

@jensamunch jensamunch commented Dec 19, 2018

is this now solved?

@bwklein
Copy link

@bwklein bwklein commented Dec 19, 2018

Looks like #222 was merged to dev, but I don't know what happens after that. @bcomnes is there a way we can test it in dev?

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Dec 21, 2018

Not right now, but the goal with the current work is to enable more rapid updates in the future.

@bep
Copy link

@bep bep commented Dec 21, 2018

is this now solved?

@jensamunch No, but @biilmann (Netlify CEO) has silently kind of at least not denied that a fix for this could be a nice Christmas present :-)

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Dec 21, 2018

Hi All!

Any volunteers interested in beta testing a new buildbot image?

What it entails:

  • Provide me with the netlify slug of the site you would like tested on the new image.
  • We will be testing #183 (comment)
  • I will flag the site to use the beta image until we land a fix or you request to be taken back to the standard image.
  • We may trigger some unpublished draft builds.

Im particularly interested in sites that may be running not in extended mode but on a version of hugo greater than 0.43, or if you are interested in testing out extended mode things that previously were not working for you.

@bwklein
Copy link

@bwklein bwklein commented Dec 22, 2018

@bcomnes 'tecidev'

@nguyenvanduocit
Copy link

@nguyenvanduocit nguyenvanduocit commented Dec 27, 2018

@bcomnes Please add me to the test: "12bit-blog"

romant pushed a commit to romant/blog that referenced this issue Dec 27, 2018
@jamescrowley
Copy link

@jamescrowley jamescrowley commented Dec 30, 2018

@bcomnes please add kind-bartik-cd167d too please, thanks!

@StefanoChiodino
Copy link

@StefanoChiodino StefanoChiodino commented Jan 6, 2019

@bcomnes please add "negative-reviews", cheers!

@pavelbinar
Copy link

@pavelbinar pavelbinar commented Jan 8, 2019

@bcomnes remoteorigin.
Thank you.

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Jan 9, 2019

Hey folks, sorry for the delay. I was out for holidays and a handoff wasn't possible.

I deployed #197 yesterday, but determined it wasn't a reliable enough fix. I partially reverted it here: #248

I kept the required libraries though, which means if you provide your own hugo extended binary in the build, or download it on build, you can use it by doing something like:

LD_LIBRARY_PATH=$HOME/stdc++6/usr/lib/x86_64-linux-gnu ./hugo

The good news is, I've started a deployment of the dev branch which is running ubuntu 16 and supports hugo extended by default. Once that's ready for testing, I will set all of the requested site slugs to use that image instead. Soon after, we'll make switching between the precise image and the dev image user serviceable in the site settings.

Disclaimer: the preview dev image isn't 100%, things will change potentially until we come up with a stability contract on the new xenial image.

Stay posted on this issue for updates, and thank you for your patients on this issue. It is my primary priority as of now.

@StefanoChiodino
Copy link

@StefanoChiodino StefanoChiodino commented Jan 10, 2019

@bcomnes seems broken for me:

6:29:46 AM: hugo: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by hugo)

If you could please revert it, I need to set something live.

Cheers

P.S.: sorry to waste your time, I thought it was a beta testing thing, where it was probably going to work out of the box ;)

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Jan 10, 2019

@StefanoChiodino If you are providing your own hugo extended version and are running into that error try setting the LD_LIBRARY_PATH when running hugo in the current image:

LD_LIBRARY_PATH=$HOME/stdc++6/usr/lib/x86_64-linux-gnu ./hugo

I'm currently working on an out-of-the-box fix we can hopefully provide preview access to asap.

@rgiese
Copy link

@rgiese rgiese commented Jan 30, 2019

@bcomnes if you're still taking signups, please enable for 'grumpycorp'. Thank you!

renatodeleao added a commit to renatodeleao/hugo-preflight that referenced this issue Jan 30, 2019
A workaround for netlify deploys is just upload resources one or a bash script (untested)

netlify/build-image#182
@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Jan 31, 2019

Sorry for the delay. Almost ready to start adding sites to the dev image this week. Please update your comments if you do NOT want your site added to a potentially-unstable-at-times dev image beta.

@nyonson
Copy link

@nyonson nyonson commented Jan 31, 2019

@bcomnes please add 'yonson', thanks!

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Feb 1, 2019

Ok, confirmed its working, I'm going to start adding sites onto it.

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Feb 1, 2019

Ok, I set up an issue track dev image beta stuff over at #254

Lets keep this issue specific to hugo extended from here on out.

@bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Feb 16, 2019

Since this is working in the xenial image, I'm going to close this. We should get that out to everyone soonish. Thanks for your patients and all the input on this one, and my personal apologies for it taking so long. We have some great improvements to the buildbot pipeline coming this year you will all love.

@bcomnes bcomnes closed this Feb 16, 2019
romant pushed a commit to romant/blog that referenced this issue May 26, 2019
removing `resources` folder from being tracked as should be generated
sudoist added a commit to sudoist/hugo-jcos.io that referenced this issue May 28, 2019
Building sites … ERROR 2019/05/28 20:15:29 error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Total in 187 ms
Error: Error building site: logged 1 error(s)
The command "hugo -d public" exited with 255.

Refs:
netlify/build-image#182
@junedev
Copy link

@junedev junedev commented Jul 27, 2019

If other people like me come here wondering how to actually apply the fix to their existing projects, here is the article how to switch to the new Ubuntu version: https://www.netlify.com/blog/2019/03/14/a-more-flexible-build-architecture-with-updated-linux/
After that you can safely include the resources/_gen folder in your .gitignore file (and remove them from git tracking).

@beausmith
Copy link

@beausmith beausmith commented Nov 17, 2019

Solution in #183 (comment) allowed me to deploy hugo with sass/scss on netlify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet