Kitz Forum

Computer Software => Linux => Topic started by: Weaver on November 01, 2019, 11:23:53 PM

Title: Aarch64 D-Complier is Currently Broken
Post by: Weaver on November 01, 2019, 11:23:53 PM
I have a Pi 3B with a 64-bit Debian o/s same setup. Really pleased with it.

The version of the AArch64 D compiler GDC (in the GCC family) that you get now when you do an apt-get is totally broken and I don’t know how to get a new one for AArch64. I can get a good GDC compiler for raspbian 32-bit and that works but I wanted to evaluate GDC’s AArch64 code generation quality. The other quality D compiler LDC (LLVM family) works for AArch64 though, excellent.
Title: Re: Aarch64 D-Complier is Currently Broken
Post by: hacktrix2006 on November 01, 2019, 11:47:59 PM
Are we talking about Arch linux now or Raspian OS??
Title: Re: Aarch64 D-Complier is Currently Broken
Post by: Weaver on November 03, 2019, 12:29:09 AM
Debian Buster
Title: Re: Aarch64 D-Compiler is Currently Broken
Post by: Weaver on July 04, 2020, 01:08:12 AM
I found this helpful-looking page, for Aarch64 binaries I think

    https://packages.debian.org/buster/arm64/gdc-8/download

I downloaded it and ran dpkg -i *.deb which appeared to run successfully. It either hasn’t written the files to the right place, or they are not newer or not changed compared to the existing binary for the old version of aarch64 gdc that I was running.

Am lost. Maybe that page is referring to an old release.

What would you do to get say a newer version of gcc onto your x86-64 linux box if you didn’t want to make it from sources? Well, you might just have to build it from sources if no one had done the required work for you yet, of course.

I don’t really want to try building gdc from sources again. That was a nightmare, many problems and I got lost. I don’t know if I can do that without getting hold of an x86-4 box to build on and using cross-compilers to get Aarch64 outputs.

I put out an appeal for help on the DLang newbies forum, but this isn’t a question about D, nor is it a complaint about gdc, rather about an obsolete superseded version, so the replies were ‘just get the new version then and all will go away’ so infinite loop.

I should be just using apt-get but that was the problem, it just fetches this broken compiler and I can see how to teach it to update and mend its ways.
Title: Re: Aarch64 D-Complier is Currently Broken
Post by: parkdale on July 04, 2020, 04:40:49 PM
Have you tried reinstalling .....

sudo apt-get install --reinstall gdc-8-aarch64-linux-gnu


change gdc from 10 to 8 as per debian default
Title: Re: Aarch64 D compiler is currently broken
Post by: Weaver on July 04, 2020, 07:38:58 PM
that command failed with an ‘unable to locate package’ when I used the full long name. If I cut the name down to just ‘gdc’ it ran ok, but the doesn’t fix the problem.

I’m just completely out of my depth here. Luckily the LLVM D compiler for AAarch64 ‘LDC’ works fine and generates very nice code, not sure if it is superior to GDC; the x86-64 version has some advantages some disadvantages. LDC seems a bit less keen on inlining long-ish functions that are called just once. GDC has been seen to inline functions but still emit a copy of the original routine’s code as a useless subroutine even when it is not called twice and is private, not public so there’s no chance of it getting called from elsewhere.
Title: Re: Aarch64 D-Complier is Currently Broken
Post by: parkdale on July 05, 2020, 04:02:55 PM
Can you run synaptic on pi3b version of Debian buster?

sudo synaptic

From there you can run repair broken packages :fingers: