Open Hixie opened 8 years ago
@whesse We have ARM downloads at https://www.dartlang.org/install/archive, but perhaps we aren't building or upload corresponding Debian packages?
Yes, that is true - we have only the amd64 architecture debian package in our repo. We currently make a zip file of the arm SDK, where we just build the arm SDK by copying the arm dart executable in over the x64 executable. So you install dart on a raspberry pi by unzipping the SDK, and adding the path to the binaries to your PATH. But we don't make a debian package for it.
Another short-term fix might just to install the arm64 debian package (if you can override the architecture, so it installs), and then just copy the dart executable from the sdk zip file over the executable installed by the debian package. It is probably easier to just unzip the arm sdk zip where you want it, and add it to your path.
I can see adding the other architectures to the debian repo, but it won't happen immediately. We also need to know which glibc versions we need to support, and which arm processors, and make sure that is specified.
I'll make a note on the linux instructions that the package repo is just for amd64 right now, or file an issue to add that note.
I just checked out the repo and built it on the raspberry pi directly. It took a few hours but it worked fine. :-)
I would like to know if the zipped arm SDK, from the download archive, works, but I can try that myself on the rPI I have. I think in the long run, we should have amd64, arm, and arm64 in the debian repo.
I've tested the zip version of the SDK and it works fine with raspberry pi running arch linux.
I tested the Zipped ARM SDK on rPi(2) with Raspbian and it worked fine as well.
If I run 'pub' from the zip file on my rpi2, it says ... Snapshot not compatible with the current VM configuration: the snapshot requires 'release no-asserts no-type-checks x64-sysv' but the VM has 'release no-asserts no-type-checks arm-eabi hardfp'.
This is a bug, because now our snapshots include native code in them, and we haven't been building a full SDK for arm, just copying the arm version of the dart executable into an X64 SDK. The solution to this is to configure the SDK builder to also build the XARM target and upload it to storage. Changing the title of this bug and reopening.
A corrected ARM sdk is uploaded to the dev channel (1.23.0-dev.2.0 and latest) and to the stable channel (1.22.1 and latest). The build recipe still needs to be changed so the builders do it automatically.
Just tried to install it on Raspi - apt-cache search
can't find the dart packages.
And yes - dart is in my sources.list.d but the problem is it's contents
deb [arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main
Tried to change the architecture to arm, armhf - nothing worked.
wget https://storage.googleapis.com/dart-archive/channels/stable/release/1.22.1/sdk/dartsdk-linux-arm-release.zip
works!
Guys please!!!! automate this process! For 1.24.1 on Raspi apt update && apt full-upgrade does not work.
Again I had to
wget https://storage.googleapis.com/dart-archive/channels/stable/release/1.24.1/sdk/dartsdk-linux-arm-release.zip
It's nice that you provide a version for Raspi but very annoying that it is not possible to install it via `apt install``
BTW version-file in unziped folder shows 1.24.0
Will be releasing 1.24.2 in an hour or so, including ARM builds. This will be available as a download at the usual location: wget https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-arm-release.zip I will check the 1.24.1 build, to see why the version file is wrong.
I'm guessing this has been resolved. Closing, but feel free to reopen.
We are still building the ARM sdks manually, and uploading them to release with a script. This still should change to building them on the SDK builders. The issue about adding them to the Debian repo is separate, and also needs to be resolved.
I just tried to install the Dart SDK on my RPI4 4GB, running latest Raspbian, following the official get Dart, Install using apt-get section, and I've faced the same issue. Is this supposed to be resolved, or still an issue?
Any comment? I'm looking to start a home project, where I'd like to run some dart backend on the RPI4, and would prefer the apt-get
approach.
Yes, I closed it because I mistakenly thought this issue is about building and uploading the ARM Dart SDK on official builders which was fixed, but it's actually about the debian package which is still outstanding.
Any updates on this? It's unfortunate that there are already binaries available, but not downloadable simply using apt
.
What needs to be changed or done to get this resolved?
I was able to install Dart SDK manually on a Raspberry Pi 4 by downloading the ARMv7 zip file from dart.dev/tools/sdk/archive. But the default apt-get
route didn't work (for the same reason that @Hixie reported 5 years ago).
We already have the binaries. Maybe I'm wrong, but this seems like a relatively easy issue to fix. If so, I can take it — especially if someone can give me pointers to what needs to be done.
There are now tens of millions of Raspberry Pis out there, and this number is growing by as much as 640K units per month. Raspberry Pis (and other ARM-based SBCs) also happen to be a great tinkering devices — which makes them that much more important for Dart adoption.
I can confirm that the ARMv7 version works just fine on the Pi, but there is still no apt
support.
Trying to automate a Dart docker container build across all 3 architectures would be SO MUCH easier/possible with apt support.. Any idea why this is still not done ?
Our current debian package pipeline is in a bad state and it will take a while to clean up. #45724 is an effort that would also help the packages not tied to a specific distribution.
We're currently working on getting official docker images for Dart (see https://github.com/dart-lang/dart-docker). Those will use the zips as well. Perhaps they can already help others trying to automate their own docker builds: https://github.com/dart-lang/dart-docker/blob/main/stable/buster/Dockerfile.
I had the same issues trying to automate Dart SDK installation with bash scripts.
The easiest thing would be to installing it via apt like sudo apt install dart
.
In the meantime i'm doing this, think will help
# Creating temp file
tdir=$(mktemp -d -t dart.XXX)
tzip="$tdir/dartsdk-linux-arm64-release.zip"
tsha="$tdir/dartsdk-linux-arm64-release.zip.sha256sum"
# Downloading latest stable dist
wget -qO "$tzip" 'https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-arm64-release.zip'
wget -qO "$tsha" 'https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-arm64-release.zip.sha256sum'
chmod -R +rwx $tdir
cd $tdir
cat $tsha | sha256sum -c > /dev/null
# Check if checksum matched
if ! [ $? -eq 0 ]; then
>&2 echo "ERROR: SHA-256 checksum not matching"
rm -r "$tdir"
exit 1
fi
# Unzipping to lib location
sudo unzip -d /usr/lib $tzip > /dev/null
# Enabling write and execution for the dark-sdk folder
sudo chmod -R +rx /usr/lib/dart-sdk
# Adding dart to path
export PATH="$PATH:/usr/lib/dart-sdk/bin"
# Removing tmp files
rm -r "$tdir"
Some option requires sudo operations
@LoKy-dev Thanks for the script. I think that you meant for the following line to use chmod
not chown
.
sudo chown -R +rx /usr/lib/dart-sdk
Unfortunately, even with that change, I couldn't get dart
to run for me on my Raspberry Pi 4b with Raspbian.
pi@raspberrypi:~ $ /usr/lib/dart-sdk/bin/dart
-bash: /usr/lib/dart-sdk/bin/dart: cannot execute binary file: Exec format error
@LoKy-dev Thanks for the script. I think that you meant for the following line to use
chmod
notchown
.
Thanks, I've modified the comment. If you have problems troubleshooting you can reach me here on Twitter at @PecchioLorenzo.
New to Dart and can't get it to install on my RPI4 with Ubuntu. I just made a new image of the Ubuntu Desktop and I'm starting over. Can someone please list the steps to install Dart on an ARM64 RPI4? I'm assuming I download this:
2.13.4 (ref 065872e) | Linux | ARMv8 (ARM64) | Dart SDK (SHA-256) from here: https://dart.dev/tools/sdk/archive#stable-channel.
I have a couple of questions here:
Thanks.
I am seeing this issue when building a docker container on a Mac with M1 Arm processor.
RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/dart.gpg
RUN echo 'deb [signed-by=/usr/share/keyrings/dart.gpg] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | tee /etc/apt/sources.list.d/dart_stable.list
RUN apt-get update && apt-get install -y nodejs dart
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://storage.googleapis.com/download.dartlang.org/linux/debian stable InRelease' doesn't support architecture 'arm64
E: Unable to locate package dart
dart_stable.list only contains amd64
deb [arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main
@bcavileer you are following the linux installations step for a macOS machine, in this case you can simply use brew
as indicated in the official doc here (just switch tab on macOS)
For obvious reasons debian packages don't work on macOS.
@LoKy-dev I should have specified this is a Debian Bullseye docker container running on Apple M1 Silicon. So the instructions to install Dart should be the linux instructions.
We don't currently provide arm Dart SDK debian packages.
For docker specifically, you might be able to use the Dart official images instead (or repurpose the dockerfiles): https://hub.docker.com/_/dart https://github.com/dart-lang/dart-docker
I saw https://github.com/dart-lang/sdk/commit/c6181a003df4dcf783c2a7d064532fc71c79bbc8 at least enabled building the packages. With that work, is there any plan to upload arm64 Debian packages to the Google storage archives?
IIRC @sortie had a document about changes to Debian packages.
How does this apply to Flutter?
How does this apply to Flutter?
It doesn't, AFAIK.
I can update your knowledge here: it does, because the installation of the Dart SDK is a dependency for the Flutter SDK. I contribute to Veilid, and we instruct people to install the Flutter SDK. We became aware of this issue as a result of trying to support one of our users who was trying to install said SDK on a Raspberry Pi 4.
But it appears that Google doesn't want to support Flutter either, since they won't make a build that supports the 16k page size of the Raspberry Pi 5 (which we have also lost support and development time trying to support). After seeing how long this issue has been open, I find myself much less surprised at that. (The only surprise I actually have right now is that any part of the Cult of the Dead Cow ever considered Dart or Flutter for any part of its development.)
@kyanha Please review the code-of-conduct before posting here again.
Your initial question was without any context and this issue is not related to Flutter. The Flutter SDK doesn't use the Dart SDK Debian packages, it bundles it's own Dart SDK.
Regarding support for the "16k page size of the Raspberry Pi 5", please open a separate issue with additional details.
The 'official' installation instructions for Linux using apt on debian
https://dart.dev/get-dart#install
simply do not work for armhf or arm64.
I have some Raspberry PI devices around so I need to implement a REST API using Dart with the Alfred package. I came across this opened issue and decide to try the compiled ZIP files referred by @whesse back to 2017. I gave it a shot and it worked for me. So here's how I did it:
In my Ubuntu machine terminal (can be also macOS) I've accessed my PI device through SSH.
I've checked the CPU ARM version that I needed to use by issuing the lscpu command: A Google search for Cortex-A53 shows that it is an ARMv8-A version.
Then I went to Dart SDK Archive and downloaded the lastest stable version:
Right click on Dart SDK of the row for ARMv8 and "Copy link address". I've created a new folder 'dart' and 'cd' into it. After that I got the ZIP file with wget: wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.5.0/sdk/dartsdk-linux-arm64-release.zip
Next step was to unzip the file (I had to install zip: sudo apt install zip
which also installs unzip)
Finally I had to export location permanently adding it to .bashrc: echo "export PATH:$PATH:/path/to/unzipped/directory/dart-sdk/bin" >> ~/.baschrc
.
This way I was able to compile my Dart code and successfully run it in my Rapsberry PI 3B.
It would have been better using the APT, I agree. Anyway I was able to do what I needed. One up side of this is that having it installed in a device one can compile the code to use in other ARMv8 machines without the need of installing the Dart SDK. I have tested it copying the compiled file (Raspberry PI 3B) to a Raspberry PI 4 (which has an ARMv8 CPU) and it worked perfectly.
I got a raspberry pi with the Raspbian Jessie Lite distro installed. I then followed the steps on https://www.dartlang.org/install/linux:
Everything but the last command worked fine; the last command said: