-
-
Notifications
You must be signed in to change notification settings - Fork 48
can't run avr-g++ on an aarch64 machine: official arm64 binary is probably compiled for arm32 #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've also seen the Note that the command output you provide in your issue shows However, looking at my
I downloaded and unpacked the aarch64 version (http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-aarch64-pc-linux-gnu.tar.bz2), which does seem to contain the aarch64 version?
I do not have an aarch64 system to test, could you try the same on your system to see if that works? So it seems the toolchain is compiled for the right architecture, which would suggest that either the IDE or arduino-cli (or both) is maybe misdetecting your machine architecture and installs the wrong tarball? Could you maybe try removing the |
in
I've downloaded the same http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-aarch64-pc-linux-gnu.tar.bz2
Cd'd to I've removed the aforementioned directory and reinstalled the AVR core with the IDE via https://downloads.arduino.cc/arduino-1.8.13-linuxaarch64.tar.xz:
in
Installing It's all so circular. I think that it's just compiled for the wrong architecture, like happened in the past. |
wait wait
From the last output, maybe I am on a 32 arm system. But, as mentioned in the sister bug, the 64-bit
Anyway, I've downloaded the 32bit arm tarball http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-arm-linux-gnueabihf.tar.bz2 and it works:
I don't know what kind of magic is this, and why some 64bit binaris work, others don't, 32bit ones shouldn't but do. |
I suspect you might have a 64-bit kernel and CPU with a 32-bit userspace. Then the "no such file or directory" might actually refer to a missing library (e.g. libc) for 64-bit (come to think of it, this was actually also the problem in my 32 vs 64 case). I suspect |
As told, this is a linux system (with Debian), if you have the few exact packages to install that solved your issue, it would be much appreciated. I've tried with |
I think all those packages are only to allow cross-compiling to arm64, probably not running arm64 binaries (that, or you're still missing libraries). Running For my 32 vs 64 problem, I ended up adding extra architectures to dpkg to allow installing To see the default architecture for installed libraries, use |
installing an extra architecture it's what I'm trying to avoid, I don't want to mess up things.
|
Sounds like you need just libc really, but apparently ldd doesn't work on "foreign" executables. Also sounds like you should maybe just install the 32-bit arduino-cli and/or IDE, since you're essentially running a 32-bit system. Ideally, that would solve your problem by installing the 32-bit compiler and you're all good. I think there might be a chance that either misinterprets your system, though, looking at the kernel and deciding to install 64-bit tools. If that would indeed happen, that would be a bug to be fixed, but if not, I think this issue can be closed for not being a bug but a system administration issue. |
Mixed systems (64bit kernel and 32bit userspace) always had issues being properly recognized. |
I'm running the system as provided by OSMC on the stable channel, I don't know when they will update to a full 64bit system. |
But they're not broken. The 64-bit binaries seem to be 64-bit, but you installed 64-bit Arduino on what is essentially a 32-bit system. Unless you installed 32-bit Arduino and this happened, there's nothing broken to be fixed.... |
so how can it be that the 64bt binary from https://downloads.arduino.cc/PR/arduino-cli/arduino-cli-152-PR307-linuxarm64.tar.bz2 works, while the official one doesn't? There are clearly some differences there. |
Ah, that's new info. Maybe that old version somehow accidentally installed the 32-bit binaries even though it is 64-bit itself and that was later fixed? Regardless, the fact that some older version worked, doesn't somehow mean that the newer version should also work. IMHO installing a 64-bit arduino-cli on a 32-bit system can be expected to break, regardless of what older versions did. Only if you install a recent 32-bit versions and that breaks too, I would consider this a bug. |
No, I cited it in the opening post indirectly (how could I have managed to post the output otherwise?) and in the linked sister bug, and again above more than once.
Literal definition of the presence of bugs. But it's ok, I accept that the "installer does not work as intended" is "not a bug", and that the strategy here is goalpost shifting. Both classic antipatterns. |
Ah, I see now. I hadn't properly read the linked report (somehow I assumed it was just a duplicate of this one) and hadn't noticed you linked to the PR version in later posts. So, not new information, but the point remains: the gcc binaries are compiled for the right architecture. I hadn't realized that you were using an
I don't see how this would solve anything (since AFAICS the aarch64 are compiled for aarch64 already), but maybe I'm misunderstanding something else. If you find that recompiling the binaries somehow helps, do post an update here. |
Bug similar to the one in arduino/arduino-cli#292 (comment)
From the link mentioned above:
A Vero 4K+ (by OSMC) is a Kodi box which has Debian with aarch64 (arm64) architecture. It's very versatile but it hasn't Xorg installed. It has its own debian repo
apt.osmc.tv
and uses the officialhttp://ftp.debian.org/debian stretch main contrib non-free
as well. Yes the stable version is still on Debian Stretch but it's very stable.It can be accessed on the command line via ssh over Wi-Fi. The default user is named
osmc
, who has sudo privileges as well.I can install the arduino ide from https://downloads.arduino.cc/arduino-1.8.13-linuxaarch64.tar.xz without problems on the command line, using the useful
install.sh
provided. it complains that it cannot find a desktop enviroment but all the toolchain is there.But the
avr-g++
binary from the installer has the same problem on this machine as thearduino-cli
one (issue 1004 on arduino-cli): running a normal command likearduino-cli compile --fqbn arduino:avr:uno Sketch01
, I'm getting a classic error:avr-g++
exists, but it's for the wrong arch for sure (it's typical behaviour with wrong arch binaries). But this problem cannot be solved removing the.arduino15
folder like suggested in many places.The text was updated successfully, but these errors were encountered: