Hi there!
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 dpkg -i
.
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:
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_DEBUG_MESSAGE_LENGTH
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?
Cheers!
1 Like
Yeah likewise, I have been falling into this problem:
$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
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:
before_install:
# 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
install:
- 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
5 Likes
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.