Dart and Raspberry Pi

539 views
Skip to first unread message

Federico De Faveri

unread,
Nov 15, 2014, 4:01:29 PM11/15/14
to mi...@dartlang.org
Hello,
I'm trying to build Dart for use it in my Raspberry Pi. I've followed the instruction in this page: https://code.google.com/p/dart/wiki/RaspberryPi

I've built the runtime version with cross compile but when I run the executable in the raspbian bash I get this error:

-bash: ./dart: No such file or directory

I've also tried to build it directly on the raspbian running it in the qemu emulator but the compilation terminate with this error:

LD_LIBRARY_PATH=/home/pi/dart/dart/out/ReleaseARM/lib.host:/home/pi/dart/dart/out/ReleaseARM/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd runtime; mkdir -p /home/pi/dart/dart/out/ReleaseARM/obj/gen; python -u ../tools/make_version.py --output "/home/pi/dart/dart/out/ReleaseARM/obj/gen/version.cc" --input vm/version_in.cc
make_version.py exception
[Errno 2] No such file or directory
make: *** [out/ReleaseARM/obj/gen/version.cc] Error 255
BUILD FAILED

Has anyone tried to build Dart for Raspberry? Any suggestion?

Nicolas François

unread,
Nov 22, 2014, 9:00:58 AM11/22/14
to General Dart Discussion
Hi
  
I also have some problems: I can build it, but it fail when I use pub get.
I build it on n1-stantard-1 GCE instance with Ubuntu 12.04 with this script :

#!/bin/sh

## Need by intance
sudo apt-get install subversion -y
sudo apt-get install git -y
sudo apt-get install git-svn -y
sudo apt-get install make -y
sudo apt-get install build-install g++ -y

## Preparing Machine  
chmod u+x install-build-deps.sh
echo y | ./install-build-deps.sh --no-chromeos-fonts 

sudo apt-get install libc6-dev-i386 g++-multilib -y

export PATH=$PATH:`pwd`/depot_tools

sudo apt-get install  openjdk-7-jre-headless -y

# Gettings sources

mkdir dart-repo
cd dart-repo
gclient sync -n && gclient runhooks


# Build VM

cd
git clone https://github.com/raspberrypi/tools.git raspberrypi-tools

cd dart-repo/dart

sudo ./tools/build.py -m release -a arm --toolchain=../../raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf runtime
sudo ./tools/build.py -m release -a arm --toolchain=../../raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf create_sdk

When build is finished, I tar out/ReleaseXARM/dart-sdk and download it to be deploy on my rapsberrry.

This WM works when I execute a simple hello world.
I try to use it with my own library

I have this error:

runtime/vm/object.h:2263: error: Handle check failed: saw -619649294 expected Function

or

Resolving dependencies... (27.8s)
+ args 0.12.1
+ ccompile 0.2.2
+ ccompilers 0.2.1
+ collection 1.1.0
+ map_parser 0.1.2 from git https://github.com/mezoni/map_parser
+ path 1.3.0
+ source_span 1.0.2
+ string_scanner 0.1.2
+ yaml 2.1.0
Downloading ccompile 0.2.2...
Downloading ccompilers 0.2.1...
Downloading path 1.3.0...
Downloading yaml 2.1.0...
Downloading args 0.12.1...
Downloading source_span 1.0.2...
Downloading string_scanner 0.1.2...
Downloading collection 1.1.0...
Bad UTF-8 encoding 0xa9
dart:io                                                                                                      Process.runSync
/home/nicolas_franc_gmail_com/dart-repo/dart/sdk/lib/_internal/pub_generated/lib/src/io.dart 868             _computeNoUnknownKeyword
/home/nicolas_franc_gmail_com/dart-repo/dart/sdk/lib/_internal/pub_generated/lib/src/io.dart 836             extractTarGz
/home/nicolas_franc_gmail_com/dart-repo/dart/sdk/lib/_internal/pub_generated/lib/src/source/hosted.dart 193  HostedSource._download.<fn>.<fn>
dart:isolate                                                                                                 _RawReceivePortImpl._handleMessage
This is an unexpected error. Please run

    pub --trace 'install'


My dart version is :

$ dart --version
Dart VM version: 1.8.0-edge.41866 (Thu Nov 20 21:40:23 2014) on "linux_arm"


my version of raspbian is supposed to be updated

Maybe it will try to build a version on a specific tag of sources.

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

kaop...@gmail.com

unread,
Nov 23, 2014, 3:15:58 AM11/23/14
to General Dart Discussion


從我的 BlackBerry 10 智慧型手機傳送。
寄件者: Nicolas François
已傳送: Saturday, November 22, 2014 22:00
收件者: General Dart Discussion
回覆至: mi...@dartlang.org
主旨: Re: [dart-misc] Dart and Raspberry Pi

Vyacheslav Egorov

unread,
Nov 24, 2014, 7:08:05 AM11/24/14
to General Dart Discussion
I have this error:
> runtime/vm/object.h:2263: error: Handle check failed: saw -619649294 expected Function

This might indicate a bug in the VM that we did not catch on our bots. 

We will try to repro it on actual Raspberry Pi hardware. 

// Vyacheslav Egorov

tomaszkubacki

unread,
Nov 24, 2014, 12:34:36 PM11/24/14
to mi...@dartlang.org
BTW Rasbian CI builds would be super nice for makers
Reply all
Reply to author
Forward
0 new messages