# Linking error with GNAT 2021 Community Edition

**URL:** https://forum.ada-lang.io/t/linking-error-with-gnat-2021-community-edition/1210
**Category:** Releases
**Created:** [September 16, 2024, 9:03pm UTC](https://forum.ada-lang.io/t/linking-error-with-gnat-2021-community-edition/1210 "2024-09-16T21:03:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sidisyom](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/s/5fc32e/32.png) [@sidisyom](https://forum.ada-lang.io/u/sidisyom)
#### Post date: [September 16, 2024, 9:03pm UTC](https://forum.ada-lang.io/t/linking-error-with-gnat-2021-community-edition/1210/1 "2024-09-16T21:03:10Z")

</div>

I am using the GNAT 2021 Community Edition (X86\_64 GNU Linux) and after upgrading Ubuntu to `24.04.1 LTS` linking in `gprbuild` is failing with:

```ada
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section `.relr.dyn'
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section `.relr.dyn'
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: cannot find /lib64/ld-linux-x86-64.so.2

```

The error messages seem to be indicating some missing dependencies (or perhaps relocated ones after the upgrade?).

Any ideas on how I can go about fixing that?

Thank you.

---

<div class="post-metadata">

### Author: ![Irvise](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/i/7ba0ec/32.png) [@Irvise](https://forum.ada-lang.io/u/Irvise)
#### Post date: [September 18, 2024, 5:00pm UTC](https://forum.ada-lang.io/t/linking-error-with-gnat-2021-community-edition/1210/2 "2024-09-18T17:00:19Z")

</div>

Just a guess… Have you tried completely cleaning the project (deleting temporary/object files) and then recompiling it?

Also, GNAT 2021 Community Edition is deprecated in favour of Alire. I would recommend you use Alire instead 🙂

Best,  
Fer

---

<div class="post-metadata">

### Author: ![sidisyom](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/s/5fc32e/32.png) [@sidisyom](https://forum.ada-lang.io/u/sidisyom)
#### Post date: [September 19, 2024, 9:08pm UTC](https://forum.ada-lang.io/t/linking-error-with-gnat-2021-community-edition/1210/3 "2024-09-19T21:08:17Z")

</div>

Oh, I didn’t realise that (the `2021` should have given me a hint!).

Deleting the temporary objects didn’t make any difference too.

I’ve given Alire a try but have come across some other issues which I’ll post on a separate thread.

Thanks!
