platform-linux_arm icon indicating copy to clipboard operation
platform-linux_arm copied to clipboard

The package 'toolchain-gccarmlinuxgnueabi' is not available

Open ivankravets opened this issue 8 years ago • 14 comments

Temporary solution

PlatformIO currently does not support cross-compilation for RaspberryPi and similar boards. Please use one of:

a) PlatformIO Core directly on a target device b) PIO Remote and work with your hardware from anywhere in the world.


Attempt to use the arm / raspberrypi platform. gets the error. Error: The package 'toolchain-gccarmlinuxgnueabi' is not available for your system 'linux_x86_64'

Also had this error under 64 bit windows.


Configuration

Operating system: Linux, x86_64 x-ubuntu

PlatformIO Version (platformio --version): PlatformIO, version 2.8.5

Description of problem

Steps to Reproduce

  1. Using the IDE, Initalise new project
  2. Select "Raspberry Pi 1 Model B"
  3. Click Initalize

Actual Results

PlaftormIO: Failed to initialize PlatformIO project! Error: The package 'toolchain-gccarmlinuxgnueabi' is not available for your system 'linux_x86_64'

Expected Results

I would expect to be able to cross compile to arm from 64 bit linux..


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ivankravets avatar Nov 27 '16 22:11 ivankravets

Temporary solution is http://docs.platformio.org/en/latest/plus/pio-remote.html

ivankravets avatar Feb 02 '17 15:02 ivankravets

Another data point. I see a similar error on Ubuntu aarch64:

lx@~/Downloads/blinky-light-strip/pio[master !?*] platformio --version
PlatformIO, version 3.3.0
lx@~/Downloads/blinky-light-strip/pio[master !?*] pio run -t build
[Thu Apr  6 19:38:47 2017] Processing teensylc (platform: teensy, board: teensy35, framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------
PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0
Error: Could not find a version that satisfies the requirement '>=1.40803.0,<1.40805.0' for your system 'linux_aarch64'

hoosierEE avatar Apr 06 '17 23:04 hoosierEE

@hoosierEE your issue has been fixed https://github.com/platformio/platform-linux_arm/commit/bc5f23c8af37883cf9487c29fcbbe9ce51f8312f

Could you re-test?

  1. pio platform uninstall linux_arm
  2. pio platform install https://github.com/platformio/platform-linux_arm.git

ivankravets avatar Apr 07 '17 16:04 ivankravets

Re-tested, no change.

To be clear, the target device which I want to program is a Teensy 3.5, the host machine (which runs PlatformIO) is Linux ARM aarch64.

[EDIT] I did another test, changing the platform to atmelavr and board to nanoatmega328, and got a similar failure message:

PackageManager: Installing toolchain-atmelavr @ ~1.40902.0
Error: Could not find a version that satisfies the requirement '~1.40902.0' for your system 'linux_aarch64'

hoosierEE avatar Apr 07 '17 20:04 hoosierEE

FYI, at least on Debian derivatives there is a system package crossbuild-essential-{arm64|armel|armhf} which installs ready toolchain system wide:

$ arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ apt-cache show crossbuild-essential-armhf
Package: crossbuild-essential-armhf
Priority: optional
Section: devel
Installed-Size: 15
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Matthias Klose <[email protected]>
Architecture: all
Source: build-essential
Version: 12.1ubuntu2
Depends: gcc-arm-linux-gnueabihf (>= 5.2), g++-arm-linux-gnueabihf (>= 5.2), dpkg-cross
Filename: pool/main/b/build-essential/crossbuild-essential-armhf_12.1ubuntu2_all.deb

Since the toolchain is rather large, I'd suggest to fall back to download only if it is not already present.

zgoda avatar Jun 19 '17 13:06 zgoda

I seriously can't understand why the toolchain for linux_arm does only exist for darwin but not linux platforms. I was not able to find it, only for darwin. As this causes a but every 2 weeks, can you please add the proper entry and toolchain, please. It is obviously a wanted target.

  "toolchain-gccarmlinuxgnueabi": [
    {
      "sha1": "4606ce747ee2a59497e4859e6b22fce0c6df5904", 
      "system": [
        "darwin_x86_64", 
        "darwin_i386"
      ], 
      "url": "http://dl.platformio.org/packages/toolchain-gccarmlinuxgnueabi-darwin_x86_64-1.40802.0.tar.gz", 
      "version": "1.40802.0"
    }
  ], 

poelzi avatar Dec 18 '17 00:12 poelzi

We don't have toolchains for Linux which allow building source code for ARM GNU EABI. We have all toolchains for NONE EABI.

ivankravets avatar Dec 19 '17 13:12 ivankravets

а это вообще будет работать???))))

shaman7036 avatar Oct 28 '20 20:10 shaman7036

Is it possible to cross-compile yet (from Linux 64bit desktop for Linux ARM Raspberry Pi)? I cannot access my device with PIO Remote and do not have a similar device with me. I just want to be able to compile the source to a binary format and send it to my non-technical colleagues to test. Is there any way to build the output file at all? Even if the process is very tedious, I am willing to do it. Thanks.

JonnyTech avatar Dec 07 '20 22:12 JonnyTech

agreed, would be fantastic to cross-compile for the rpi. is it an IP issue?

sergerold avatar Apr 16 '21 19:04 sergerold

On Linux using qemu binfmt to emulate ARM build environment might be another workaround: On Debian based system (on e.g. x86 machine) you have to do the following:

sudo apt install qemu binfmt-support qemu-user-static
wget https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-arm32v7/buster/slim/rootfs.tar.xz
unp -u rootfs.tar.xz
cd rootfs
sudo mount -o bind /sys ./sys
sudo mount -o bind /proc ./proc
sudo chroot ./
apt install python3-pip
pip3 install platformio

In this ARM based change root file system you can use any platformio command to compile the binary for your raspberry. E.g. download the examples from https://github.com/platformio/platform-linux_arm/tree/master/examples/wiringpi-blink, copy it to the newly created root file system and execute pio run in the project directory.

I have not yet tested it completely but so far it seems to work.

twischer avatar Apr 28 '21 17:04 twischer

This was asked again at https://community.platformio.org/t/raspbberry-pi-4-create-project-problem/22314/, official support would be good :(

maxgerhardt avatar Jul 04 '21 10:07 maxgerhardt

Ok... so 5 years have passed... is this still "temporary" half a decade later? or has this just become an accepted limitation that will never be resolved?

Personal Note: This is deeply frustrating to me (and I'm probably not the only one that finds it frustrating), the whole reason I read up on PlatformIO and bothered to install it in the first place was to simplify dealing with cross-compiling C/C++ (Honestly I'd rather just use rust where this is is a solved problem with zero issues cross compiling, but I have a whole C SDK I need to use on a project, so I'm stuck dealing with c/c++ cross compile toolchains)

techdragon avatar Aug 09 '21 14:08 techdragon

@techdragon I couldn't agree more as indeed I just went thorough that same loop. Another hour of my life wasted. Grr.

sebeaumont avatar Mar 07 '22 17:03 sebeaumont