-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
crystal 0.23 `GLIBCXX_3.4.20' not found #4647
Comments
What OS are you on? You might have to try and find a backports package or build a newer version yourself. |
I should mention that this ticket was created because of @mverzilli's comment on: |
@need47 What's your OS? |
@straight-shoota @ysbaddaden reported Ubuntu 14.04 (trusty) in 3c3d3e2#commitcomment-22855250 |
in my case: CentOS 7.3.1611 (64 bit) |
This error also seems to happen inside the heroku buildpack when used with dokku. |
The package was built using Debian 8 (see crystal-lang/omnibus-crystal#17 for more info), so Ubuntu 14.04 was dropped too - but Crystal works both on Ubuntu 16.04 and Debian 8. Feel free to jump into omnibus-crystal to help sort this issues out, but all of this is (as far as I know) a side-effect of dropping LLVM 3.5 in favor of 3.8 |
I don't doubt the need for updating LLVM, I'm just caught between dokku being behind herouku - gliderlabs/herokuish#256 and crystal needing at least ubuntu16 on this release. |
Ubuntu 14.04 doesn't have the "LLVM requires a newer libstdc++ than distributed". It's now even distributing LLVM 3.9.1, along with LLVM 3.8 (official packages). This is my own fault for sticking to 14.04 —I refuse to upgrade to a systemd-based distribution — but dropping a working distribution along with older releases (that break because |
Changing the @[Link(ldflags: "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic")]
lib libLLVM
end |
So we get better compatibility with older OSes Thanks to @ysbaddaden in #4647
I'm hitting this issue on my Travis builds. Example Travis failure in https://travis-ci.org/Fryguy/cargo_shorts/builds/250606812 . This was already opened in the Travis repo as travis-ci/travis-ci#8005 . |
Hi @Fryguy, thanks for reporting. We're working on Crystal 0.23 packages for Ubuntu 12 and Ubuntu 14, which should resolve this. |
Would you mind trying this .deb's? crystal_0.23.1-1_amd64.deb I think they'll fix things in older Debian/Ubuntu's, and Centos. (The debs are not signed, I know) Update: all links published now |
FYI, all packages published here. Please test & inform, and we'll release during the week 👍 |
I tested the x86_64 .deb one using Docker, is it enough to $ cat Dockerfile
# requires docker >= 17.05
ARG VERSION=12.04
FROM ubuntu:${VERSION}
RUN apt-get update && apt-get install -y apt-transport-https tzdata curl build-essential pkg-config libssl-dev llvm libedit-dev libgmp-dev libxml2-dev libyaml-dev libreadline-dev git-core
RUN curl -Ls https://www.dropbox.com/s/5p0zogk8basxcs8/crystal_0.23.1-1_amd64.deb?dl=0 > /tmp/crystal.deb && dpkg -i /tmp/crystal.deb
CMD grep DESCRIPTION /etc/lsb-release && crystal --version
$ docker run --rm $(docker build -q --build-arg VERSION=12.04 .)
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"
Crystal 0.23.0+8 [e2a1389] (2017-07-08) LLVM 3.8.1
$ docker run --rm $(docker build -q --build-arg VERSION=14.04 .)
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
Crystal 0.23.0+8 [e2a1389] (2017-07-08) LLVM 3.8.1
$ docker run --rm $(docker build -q --build-arg VERSION=16.04 .)
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
Crystal 0.23.0+8 [e2a1389] (2017-07-08) LLVM 3.8.1 |
That's the first test to do.
If you want to test it further (like, running the specs of any project
you're working on), that helps too.
We definitely want to create a testing/beta distribution channel.
|
I've built my app using the above package (crystal_0.23.1-1_amd64.deb) inside an herkou buildpack. I get this error
The buildpack normally pulls the binaries from github. I disabled that, and added the deb via the dokku plugin - https://github.com/F4-Group/dokku-apt |
@crisward looks like a very different issue at first glance, possibly reproducible with the same compiler and llvm version regardless of omnibus or not. |
just done it again, but removed the --release flag and it worked. |
Would it be possible to set up a test travis repo with a dummy app that can just verify that everything works end-to-end on Travis (perhaps all flavors of OS on Travis)? Something like that would have caught both the GPG key problem and this problem. I'm not exactly how it should work, just throwing the idea out there. |
Perhaps a well used app that has tests eg.kemal. |
Pretty sure node does this with express |
I get the exact same error as @crisward when compiling even a hello world from With Crystal 0.23.0 on Ubuntu 16.04.1 LTS it compiles. So it is likely an issue with the release or statically linked glibc++. |
This is an assertion error from inside LLVM, likely to be well away from any library boundary. I think this needs more investigation. |
Also seeing the same error as @crisward (LLVM LexicalScope error) trying to build with Also |
Update: It is actually not fixed 👎:/ I ran into the error again with package release |
Also the heroku buildpack needs a https://github.com/crystal-lang/heroku-buildpack-crystal/blob/master/bin/compile#L50 |
I can also confirm, I'm still getting the error when pushing with --release.
|
So the package is still broken, but its a different issue now? I find this error weird, it seems to point to an error in llvm itself... |
I am also getting the same LLVM assertion error that crisward is getting, but when building my project using the file.hak8or.comcrystal:master λ crystal build --release src/browser.cr
crystal: /var/cache/omnibus/src/llvm/llvm-3.8.1.src/lib/CodeGen/LexicalScopes.cpp:160: llvm::LexicalScope* llvm::LexicalScopes::getOrCreateRegularScope(const llvm::DILocalScope*): Assertion `cast<DISubprogram>(Scope)->describes(MF->getFunction())' failed.
/home/hak8or/development/crystal/toolchain/crystal-0.23.1-3/bin/crystal: line 102: 25326 Aborted (core dumped) "$INSTALL_DIR/embedded/bin/crystal" "$@"
file.hak8or.comcrystal:master λ crystal --version
Crystal 0.23.1 [e2a1389e8] (2017-07-13) LLVM 3.8.1 This is using the crystal from the most recent release here. |
Hi all! Thanks for the follow ups. It's really weird to see that I could repro the issue @hak8or describes, and could also workaround it by adding It's not a fix, though - so we should take a look at this. If someone wants to create an issue for that, it would be awesome 👍 Anyway, this issue was about the GLIBCXX version, and (I think) that is not happening anymore, right? |
I can confirm that I no longer see the issue on Travis: https://travis-ci.org/Fryguy/cargo_shorts/builds/253385175 |
yep, me neither, travis's good. |
I think this specific issue can now be closed in favour of #4719. |
Using the precompiled crystal-0.23.0-1-linux-x86_64.tar.gz, I've the following error:
usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found
Indeed my GLIBCXX is older:
$ strings /lib64/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_DEBUG_MESSAGE_LENGTH
The text was updated successfully, but these errors were encountered: