Posts: 3
Joined: Thu Jul 11, 2019 8:58 pm

gcc-aarch64-linux-gnu on a RP4

Thu Jul 11, 2019 9:06 pm

I'm trying to get gcc-aarch64-linux-gnu installed on my new raspberry pi 4. There is reference to it in the buster packages list. Namely: crossbuild-essential-arm64

When you try to install this, it references the desired package, but it obviously doesn't exist.

Code: Select all

The following packages have unmet dependencies:
 crossbuild-essential-arm64 : Depends: gcc-aarch64-linux-gnu (>= 4:8.3) but it is not installable or
                                       gcc:arm64 but it is not installable
                              Depends: g++-aarch64-linux-gnu (>= 4:8.3) but it is not installable or
                                       g++:arm64 but it is not installable
It appears that stretch had the gcc-aarch64-linux-gnu package, but I don't believe I can install stretch on my rp4. Of course I realize this is an odd situation to be in, wanting to compile aarch64 on armhf, but I still would very much like to do it.

Anyone out there have any suggestions for me? I've looked at a number of binary distributions of cross compilers for aarch64, but of course they are mostly compiled for intel variants.

I wonder if I could install the stretch packages on buster, but that seems like a recipe for disaster.

Thank you all for your time.

User avatar
Posts: 4068
Joined: Wed Aug 28, 2013 3:31 am

Re: gcc-aarch64-linux-gnu on a RP4

Sat Jul 13, 2019 2:43 am

I use Gentoo64 on a 3B+ for aach64 native compiling.
Not much around on how to cross compile aarch32 on aarch64 Pi's yet.

Sakaki has got a test of Gentoo64 on a Pi4, not ready for release yet.

Plus she puts in a newer gcc version than Raspbian normally has.
I have had other compilers working in Gentoo64, gcc, Clang/LLVM, GO, Rust, FPC, Ponyc.
Even made a full cross compiler system for RISC-V, which took 13hrs and killed a 32GB uSD.
The Pi4 should make that much faster and faster USB3 will help.

There are some binary's that just worked, which saves that time in compiling the compiler ;)
Lost my link to the gcc binaries, I know one worked.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Posts: 1325
Joined: Wed Dec 07, 2016 2:29 pm

Re: gcc-aarch64-linux-gnu on a RP4

Sun Jul 14, 2019 2:33 am

Not tried it but I would imagine the official ARM pre-compiled should do the trick ... /downloads
Right hand side download the linux 64 bit version

Return to “Bare metal, Assembly language”