I’ve had trouble running the Hugo v44 Extended within Travis Ubuntu (Trusty) environment.
For the following steps, I installed hugo downloading the
.deb file then
So at first I had some
GLIBCXX_3.4.20' not found errors.
I then installed
libstdc++-4.9-dev package, and running
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX returned the following:
At this point the previous error had disappeared, but I got new ones.
hugo version command returned:
hugo: relocation error: hugo: symbol _ZTVNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
I tried running hugo v44 classic removing my specific code, and everything worked perfectly.
I can’t really figure where the problem comes from and I have no idea if I miss something to make it work fine or if it related to the problem in the “[SOLVED] Hugo's Snap stopped working - #27 by alexandros” post
I’ve also read the topic “Hugo 0.43 fails to deploy on Netlify - #2 by Jura” which proposes a workaround (commit compiled resources), but that doesn’t really solve the problem either.
Has someone experienced this problem too?
Yeah likewise, I have been falling into this problem:
$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
I don’t understand the “version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference” bit
The same error for me. Travis builds for my website do not work with extended hugo version installed from deb/tar.gz on github releases even in the same container type and go version.
By some reason hugo’s build environment is different from runtime. I assume that dynamically linked binaries with CGO_ENABLED=1 are behind it.
@bep Does extended hugo installed from GH releases work for you in Travis builds?
I have found a working solution for Travis:
# This workaround is required to avoid libstdc++ errors while running "extended" hugo with SASS support.
- wget -q -O libstdc++6 http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb
- sudo dpkg --force-all -i libstdc++6
- wget -q -O hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.46/hugo_extended_0.46_Linux_64bit.deb
- sudo dpkg -i hugo.deb
Wow, awesome! Thank you!
What does this package bring that the native libstdc++6 does not have?
ldd does not complain about missing dynamically linked dependencies? Is it the “link time reference” thingy which is not enabled by default in libstdc++?
Using xenial seems now to fix this. Use simply
dist: xenial at the beginning of your .travis.yml file.