# Troubles with gcc 9

**URL:** <https://discourse.julialang.org/t/troubles-with-gcc-9/47550>\
**Category:** General Usage\
**Created:** [September 30, 2020, 6:38pm UTC](https://discourse.julialang.org/t/troubles-with-gcc-9/47550 "2020-09-30T18:38:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [September 30, 2020, 6:38pm UTC](https://discourse.julialang.org/t/troubles-with-gcc-9/47550/1 "2020-09-30T18:38:43Z")

</div>

A GMT user posted an issue that I was able to reproduce in WSL2 + gcc9. The error is

```julia
ERROR: LoadError: LoadError: could not load library "/home/j/programs/lib/libgmt.so"
/home/j/programs/julia/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/libgdal.so.26)

```

Googling I found this [SO post](https://stackoverflow.com/questions/52663287/glibcxx-3-4-26-not-found) mentioning a fixed bug in gcc9 that might affect linking against objects built with gcc that had not that bug fixed.

As an experiment I moved away the `julia/bin/../lib/julia/libstdc++.so.6` and GMT started to work. Ofc, this was just to test but the user told me that he built Julia master and the issue went away.

It’s strange that this does not affect more people, but it dis afffect two today.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [September 30, 2020, 6:50pm UTC](https://discourse.julialang.org/t/troubles-with-gcc-9/47550/2 "2020-09-30T18:50:39Z")

</div>

[https://github.com/JuliaLang/julia/issues/34276](https://github.com/JuliaLang/julia/issues/34276)

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [September 30, 2020, 7:13pm UTC](https://discourse.julialang.org/t/troubles-with-gcc-9/47550/3 "2020-09-30T19:13:19Z")

</div>

Thanks, but what is the solution? Installed Julia 1.5.2 but the problem persists.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [September 30, 2020, 7:33pm UTC](https://discourse.julialang.org/t/troubles-with-gcc-9/47550/4 "2020-09-30T19:33:54Z")

</div>

> [@joa-quim](#):
>
> but what is the solution?

The issue is still open → no real solution 🙂

The fact is: pre-built Julia ships a specific version of libstcd++, the one corresponding to GCC v8.1.0, (GLIBCXX\_3.4.25, CXXABI\_1.3.11), you’re calling into system libraries linked to system libstdc++, which is newer than the one shipped with Julia referencing a symbol tagged with GLIBCXX\_3.4.26, hence the error. Building Julia from source uses system libstcd++

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [September 30, 2020, 7:46pm UTC](https://discourse.julialang.org/t/troubles-with-gcc-9/47550/5 "2020-09-30T19:46:09Z")

</div>

OK, so far just moving the older libstcd++ out of the way seems to work. This is a testing environment anyway.
