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

libstdc++.so.6: version `GLIBCXX_3.4.26' not found #553

Closed
thofma opened this issue Nov 3, 2020 · 8 comments
Closed

libstdc++.so.6: version `GLIBCXX_3.4.26' not found #553

thofma opened this issue Nov 3, 2020 · 8 comments
Labels
kind: bug Something isn't working

Comments

@thofma
Copy link
Contributor

thofma commented Nov 3, 2020

This is with the master branch of Oscar:

julia> using Oscar
#I  Getting PackageInfo URLs...
#I  Created directory /home/bla/.julia/packages/GAP/7w7Vl/deps/build/gap-4.11.0-julia-1.5/pkg/
#I  Retrieving PackageInfo.g from https://gap-packages.github.io/ferret/PackageInfo.g ...
#I  Downloading archive from URL https://github.com/gap-packages/ferret/releases/download/v1.0.3/ferret-1.0.3.tar.gz ...
#I  Saved archive to /tmp/tm7BNXth/ferret-1.0.3.tar.gz
#I  Extracting to /home/bla/.julia/packages/GAP/7w7Vl/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3 ...
#I  Checking dependencies for ferret...
#I    GAPDoc >= 1.5: true
#I  Running compilation script on /home/bla/.julia/packages/GAP/7w7Vl/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3 ...
#W dlopen() error: /home/bla/julia/julia-1.5.1/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/bla/.julia/pa\
ckages/GAP/7w7Vl/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3/bin/x86_64-pc-linux-gnu-julia64-kv7-v1.5/ferret.so)
ERROR: InitError: Error thrown by GAP: Error, module '/home/bla/.julia/packages/GAP/7w7Vl/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3/bin/x86_64-pc-linux-gnu-julia64-kv7-v1.5/ferret.so' not found
Julia Version 1.5.1
Commit 697e782ab8 (2020-08-25 20:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, ivybridge)

@fingolfin @ThomasBreuer

@ThomasBreuer
Copy link
Member

The GAP package ferret is required from examples/GaloisGrp.jl, which is automatically read on startup when Oscar.is_dev has the value true.
When I load Oscar and then enter include( "../examples/GaloisGrp.jl" ), I get a similar output with Julia 1.4.
Instead of the #W dlopen() error, I get

#I  Checking dependencies for ferret...
#I    GAPDoc >= 1.5: true
#I  Package availability test failed
#I  (for ferret 1.0.3)
#I  Removed directory /.../GAP.jl/deps/build/gap-4.11.0-julia-1.4/pkg/ferret-1.0.3
Error: Cannot load 'Ferret' due to missing binary library
Please run './configure; make' in the 'pkg/ferret' directory

The same happens also independent of Oscar, when I start Julia and then enter
using GAP; GAP.Packages.install("ferret"); GAP.Packages.load("ferret").
@thofma If you can reproduce the problem with this input then we are sure that it is a GAP.jl problem, not an Oscar problem.

@thofma
Copy link
Contributor Author

thofma commented Nov 3, 2020

Yes, I can repdroduce it only using GAP. Here is my output on julia 1.5.1 with the master branch of GAP.jl:

julia> using GAP; GAP.Packages.install("ferret"); GAP.Packages.load("ferret")
[ Info: Precompiling GAP [c863536a-3901-11e9-33e7-d5cd0df7b904]
 ┌───────┐   GAP 4.11.0 of 29-Feb-2020
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-julia64-kv7-v1.5
 Configuration:  gmp 6.1.2, Julia GC, Julia 1.5.1, readline
 Loading the library and packages ... 
 Packages:   AClib 1.3.2, Alnuth 3.1.2, AtlasRep 2.1.0, AutoDoc 2019.09.04, AutPGrp 1.10.2, CRISP 1.4.5, Cryst 4.1.23, CrystCat 1.1.9, CTblLib 1.2.2, FactInt 1.6.3, FGA 1.4.0, GAPDoc 1.6.3, IRREDSOL 1.4, LAGUNA 3.9.3, Polenta 1.3.9, Polycyclic 2.15.1, PrimGrp 3.4.0, RadiRoot 2.8, ResClasses 4.7.2, SmallGrp 1.4.1,  
             Sophus 1.24, SpinSym 1.5.2, TomLib 1.2.9, TransGrp 2.0.5, utils 0.69
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
#I  Getting PackageInfo URLs... 
#I  Created directory /home/thofmann/.julia/dev/GAP/deps/build/gap-4.11.0-julia-1.5/pkg/
#I  Retrieving PackageInfo.g from https://gap-packages.github.io/ferret/PackageInfo.g ...
#I  Downloading archive from URL https://github.com/gap-packages/ferret/releases/download/v1.0.3/ferret-1.0.3.tar.gz ...
#I  Saved archive to /tmp/tmSzHJPW/ferret-1.0.3.tar.gz
#I  Extracting to /home/thofmann/.julia/dev/GAP/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3 ...
#I  Checking dependencies for ferret...
#I    GAPDoc >= 1.5: true
#I  Running compilation script on /home/thofmann/.julia/dev/GAP/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3 ...
#W dlopen() error: /home/thofmann/julia/julia-1.5.1/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/thofmann/.julia/dev/GAP/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3/bin/x86_64-pc-linux-gnu-julia64-kv7-v1.5/ferret.so)
ERROR: Error thrown by GAP: Error, module '/home/thofmann/.julia/dev/GAP/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3/bin/x86_64-pc-linux-gnu-julia64-kv7-v1.5/ferret.so' not found in
  LOAD_DYN( arg[1], false ) at /home/thofmann/.julia/artifacts/848f0f318405266896d24d11e4baf5cf7bf3f203/gap-4.11.0/lib/files.gd:587 called from
<function "LoadDynamicModule">( <arguments> )
 called from read-eval loop at /home/thofmann/.julia/dev/GAP/deps/build/gap-4.11.0-julia-1.5/pkg/ferret-1.0.3/read.g:15

@thofma
Copy link
Contributor Author

thofma commented Nov 3, 2020

Feel free to transfer this issue to GAP.jl (I cannot).

@ThomasBreuer ThomasBreuer transferred this issue from oscar-system/Oscar.jl Nov 3, 2020
@fingolfin
Copy link
Member

His looks like the classical bug of "Julia bundles its own copy of the standard C++ library which is older than what the C++ compiler uses, so any C++ compilation fails". And here it tries to compile ferret, which uses C++...

The quickest solution (if you just want to get things to work) is to delete the copy of the C++ library bundled with Julia, it'll happily use the newer one which is installed system wide.

I am actually not sure how else to deal with this properly; I am pretty sure Polymake will run into similar issues, as it also compilers C++ code on the user's system, and there is no way avoiding it there (for GAP.jl, at least in theory we could "move everything into JLLs", though in practice it's not that easy either).

I think we reported this to the Julia folks before, but AFAIK they made no move to improve the situation on their side.

@thofma
Copy link
Contributor Author

thofma commented Nov 3, 2020

I see, thanks. I thought that JuliaLang/julia#37955 would give a possible solution. I probably misunderstood something.

@fingolfin
Copy link
Member

I wasn't aware if that one, sounds great if it works in the end. However, it would only reduce the impact of the issue, not remove it completely. But it'd still be an improvement.

@fingolfin fingolfin added the kind: bug Something isn't working label Dec 8, 2020
@fingolfin fingolfin changed the title using Oscar failing on 1.5 due to GAP? Error: version `GLIBCXX_3.4.26' not found Dec 11, 2020
@fingolfin fingolfin changed the title Error: version `GLIBCXX_3.4.26' not found libstdc++.so.6: version `GLIBCXX_3.4.26' not found Dec 11, 2020
@lgoettgens
Copy link
Member

This issue occurred to me today when updating Oscar from 0.5.2 to 0.6 and all of its dependencies as well, just with GLIBCXX_3.4.29.

The quickest solution (if you just want to get things to work) is to delete the copy of the C++ library bundled with Julia, it'll happily use the newer one which is installed system wide.
This worked for me.

As this seems to be a pretty common issue, it would be great to mention it and the workaround somewhere in the documentation.

@fingolfin
Copy link
Member

Hopefully JuliaLang/julia#46976 will take care of this for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants