Linking error with GNAT 2021 Community Edition

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:

/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.

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 :slight_smile:

Best,
Fer

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!