My GNAT Studio Community instance has suddenly begun to fail the compilation task and I am struggling to understand why.
I am not using the latest release (tried to download that from Releases · AdaCore/gnatstudio · GitHub but the download keeps timing out although I am on a fast connection) but when I try to compile an Alire-based project having started GNAT Studio with alr edit --project aaaa.gpr I am getting:
compilation of aunit-reporter-junit.adb failed
compilation of aunit-reporter-text.adb failed
compilation of aunit-time_measure.adb failed
compilation of aunit-io.ads failed
What’s interesting is that doing alr build on the command line works just fine and I can then run the built executable again on the command line (just a native app).
Any ideas on what is wrong and how this can be fixed?
I am using alr version: 2.1.0 and GNAT Studio Community 2021 (20240506) hosted on x86_64-pc-linux-gnu and again trying to download the latest release from the gh page is somewhat hopeless.
It must be an Alire issue, IMO. GPS is quite straightforward. It uses the gpr-file you gave it. If the gpr-file is broken then the problem lies with the source of the gpr-file, ergo, with Alire.
BTW, GPS prints the command line it uses for gprbuild. You can use it in a shell with the same effect.
I can download it no problem. Did you try wget for downloading?
/opt/gnatstudio/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/gnatstudio/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/gnatstudio/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6
/opt/gnatstudio/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/gnatstudio/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/gnatstudio/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: cannot find /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
gprbuild: link of sandbox.adb failed
so, some dependencies seem to be missing during linking?
Yes, the download seems to be erroring-out with ERROR 618: jwt:expired so my download speed is slower than some token ttl apparently. I’ve tried multiple times in one day and different times during the day but no success. Just used one of those online network speedometers and it looks like my connection is rather slow (~10Mbps) which is rather strange as I have been able to join video calls etc just fine (or perhaps that explains why noone was talking to me ).
You may want to try downloading it with wget with the continuation switch, so even if it fails, you can relaunch it with whatever progress you had saved. The command would be
Rather a wrong library order search. I suppose that when you build using the standard environment, the GPS libraries get searched first. When you build using Alire it alters the search order.
P.S. libc is frequently poses a problem because instead of properly versioning it, Linux guys apply incompatible changes under the same version number.
I’m not sure it is just slow networks (perhaps latency). I have an OpenBSD system that I had/have? to manually download syspatch system updates with ftp -C (continue) because on a land line everything is fine but on a 4G connection that actually has faster throughput something upstream would just RST the connection usually at the very end of the download. This has occurred for years with three mobile but stopped for a year or so and isn’t anything like a local MTU issue. Thankfully OpenBSDs pkg_add does continue package downloads now when it never used to.