It’s just data

Building Dart

Trying to follow the PreparingYourMachine instructions.

First impression:

# source install-build-deps.sh 
Only Ubuntu 10.04 (lucid) through 11.04 (natty) are currently supported

... I was trying using 11.10, which is still in beta.  Understandable.

Second impression:

Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom bison-doc dh-make krb5-doc
  php-pear libasound2-doc cairo-perf-utils libcairo2-doc libcurl3-dbg
  libgcrypt11-doc libglib2.0-doc python-subunit gnutls-doc gnutls-bin
  guile-gnutls krb5-user libgtk2.0-doc libpango1.0-doc imagemagick sqlite3-doc
  php5-suhosin libmail-box-perl alien rpm-i18n ri ruby-dev ruby1.8-examples
  ri1.8 subversion-tools db4.8-util xserver-xfree86 xserver xfs
The following NEW packages will be installed:
  apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common bison
  cabextract comerr-dev curl debhelper elfutils firefox-locale-fr flex gperf
  html2text krb5-multidev language-pack-fr language-pack-fr-base
  libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libasm1 libasound2-dev libatk1.0-dbg libatk1.0-dev
  libavahi-client-dev libavahi-common-dev libbz2-dev libc6-dbg
  libcairo-script-interpreter2 libcairo2-dbg libcairo2-dev libcups2-dev
  libcurl3 libcurl4-gnutls-dev libdbus-1-dev libdbus-glib-1-dev libdrm-dev
  libdw1 libelf-dev libexpat1-dev libfontconfig1-dbg libfontconfig1-dev
  libfreetype6-dev libgconf2-dev libgcrypt11-dev libgdk-pixbuf2.0-dev
  libgl1-mesa-dev libglib2.0-0-dbg libglib2.0-dev libglu1-mesa-dev
  libgnome-keyring-dev libgnutls-dev libgpg-error-dev libgssrpc4
  libgtk2.0-0-dbg libgtk2.0-dev libice-dev libidl-dev libidn11-dev
  libjpeg62-dev libkadm5clnt-mit7 libkadm5srv-mit7 libkdb5-4 libkms1
  libkrb5-dev libldap2-dev libmail-sendmail-perl libnspr4-dbg libnspr4-dev
  libnss3-dbg libnss3-dev liborbit2-dev libpam0g-dev libpango1.0-0-dbg
  libpango1.0-dev libpcre3-dbg libpcrecpp0 libpixman-1-0-dbg libpixman-1-dev
  libpng12-dev libpthread-stubs0 libpthread-stubs0-dev libpulse-dev
  libreadline5 librpm1 librpmbuild1 librpmio1 libruby1.8 libsctp-dev libsctp1
  libsm-dev libsqlite3-0-dbg libsqlite3-dev libssl-dev libsvn1
  libsys-hostname-long-perl libtasn1-3-dev libx11-6-dbg libx11-dev libxau-dev
  libxau6-dbg libxcb-render0-dev libxcb-shm0-dev libxcb1-dbg libxcb1-dev
  libxcomposite-dev libxcomposite1-dbg libxcursor-dev libxcursor1-dbg
  libxdamage-dev libxdamage1-dbg libxdmcp-dev libxdmcp6-dbg libxext-dev
  libxext6-dbg libxfixes-dev libxfixes3-dbg libxft-dev libxi-dev libxi6-dbg
  libxinerama-dev libxinerama1-dbg libxml2-dev libxrandr-dev libxrandr2-dbg
  libxrender-dev libxrender1-dbg libxslt1-dev libxss-dev libxt-dev libxtst-dev
  libxtst6-dbg lksctp-tools m4 mesa-common-dev orbit2 php5-cgi php5-cli
  php5-common po-debconf python-dev python2.7-dev rpm rpm-common rpm2cpio ruby
  ruby1.8 subversion ttf-bengali-fonts ttf-devanagari-fonts ttf-gujarati-fonts
  ttf-indic-fonts ttf-kannada-fonts ttf-kochi-gothic ttf-kochi-mincho
  ttf-malayalam-fonts ttf-mscorefonts-installer ttf-oriya-fonts
  ttf-sazanami-mincho ttf-tamil-fonts ttf-telugu-fonts wdiff
  x11proto-composite-dev x11proto-core-dev x11proto-damage-dev
  x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev
  x11proto-record-dev x11proto-render-dev x11proto-scrnsaver-dev
  x11proto-xext-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev
  zlib1g-dbg zlib1g-dev

Whoa... that’s a lot of stuff.  Presumably most of that stuff is only needed to build chrome, and dash only needs a small portion of that.

Third impression:

Gold is a new linker that links Chrome 5x faster than GNU ld.

Wow.  Replacing the linker is clearly hard-core stuff.

Fourth impression:

*******************************************************************************
* WARNING: Can't download DumpRenderTree! This is required to test client apps.
* You need to do a one-time configuration step to access Google Storage.
* Please run this command and follow the instructions:
*     third_party/gsutil/20110627/gsutil config
*
* NOTE: When prompted you can leave "project-id" blank. Just hit enter.
*******************************************************************************

OK, this is starting to **** me off.  They need my Google identity in order to simply build a compiler?  Grr.

Fifth impression:

Please navigate your browser to http://code.google.com/apis/console,
then click "Services" on the left side panel and ensure you have Storage
activated, then click "Storage" on the left side panel and find the "x-goog-project-id" on that page.
What is your project-id?

I don’t see a left side panel or “Services” anywhere on the page.  Stuck for now.  Will move onto other tasks and come back later.

I wonder how many people who are diss’ing Dart on Twitter and elsewhere have actually tried the language?


OK, so the next step is you push the only button on the screen ("Create project..."), and THEN you see a panel on the left with a Storage menu item.  Then the option appears to be called “Google Cloud Storage”, as that is the only option with the word “Storage” in it..  Turning it on, you find out that:

You must sign up for billing before you will be able to create any buckets.

Posted by Sam Ruby at

Sam Ruby: Building Dart

submitted by realstevejobs [link] [comment]...

Excerpt from a community to check out googles new web language at

Glanced at the Windows requirements.

The work required exceeds the interest.

Posted by Shelley at

The warning in your fourth impression:

* NOTE: When prompted you can leave “project-id” blank. Just hit enter.

...is saying you don’t need to do whatever is in the fifth impression part, no?

Posted by Noah at

When prompted you can leave “project-id” blank. Just hit enter.

That works.  The installation then completes with:

No default project ID entered. You will need to edit the default_project_id
value
in your boto config file before using "gsutil ls gs://" or "mb" commandswith
the default API version 2.

Boto config file "/home/rubys/.boto" created. If you need to use
a proxy to access the Internet please see the instructions in that file.

Since the next commands aren’t gsutil or mb, I’ll ignore that for now and press on:

$ ../tools/build.py --arch=ia32
make -j 1 BUILDTYPE=Debug_ia32 all
  ACTION Generating
/home/rubys/dart/runtime/out/Debug_ia32/obj/gen/corelib_gen.cc file.
out/Debug_ia32/obj/gen/corelib_gen.cc
  TOUCH out/Debug_ia32/obj.target/runtime/generate_corelib_cc_file.stamp
  ACTION Generating
/home/rubys/dart/runtime/out/Debug_ia32/obj/gen/corelib_impl_gen.cc file.
out/Debug_ia32/obj/gen/corelib_impl_gen.cc
  TOUCH out/Debug_ia32/obj.target/runtime/generate_corelib_impl_cc_file.stamp
  CXX(target) out/Debug_ia32/obj.target/libdart_lib/gen/corelib_gen.o
In file included from /usr/include/features.h:388:0,
                 from /usr/include/inttypes.h:26,
                 from ../runtime/vm/globals.h:32,
                 from ../runtime/vm/assert.h:16,
                 from ../runtime/vm/allocation.h:8,
                 from ../runtime/vm/bootstrap.h:8,
                 from out/Debug_ia32/obj/gen/corelib_gen.cc:5:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or
directory
compilation terminated.
make: *** [out/Debug_ia32/obj.target/libdart_lib/gen/corelib_gen.o] Error 1
BUILD FAILED

That’s probably it for tonight.  I’ll likely resume tomorrow.

Posted by Sam Ruby at

I get further if I use ../tools/build.py --arch=x64.  Current failure:

CXX(target) out/Debug_x64/obj.target/libdart/runtime/vm/dart_api_impl.o
cc1plus: warnings being treated as errors
../runtime/vm/dart_api_impl.cc: In function ‘void*
dart::Dart_CreateIsolate(void*, void*)’:
../runtime/vm/dart_api_impl.cc:38:71: error: declaration of ‘void*
dart::Dart_CreateIsolate(void*, void*)’ with C language linkage
../runtime/include/dart_api.h:185:26: error: conflicts with previous
declaration ‘void* Dart_CreateIsolate(const Dart_Snapshot*, void*)’
../runtime/vm/dart_api_impl.cc: In function ‘Dart_Result
dart::Dart_PostIntArray(Dart_Port, intptr_t, intptr_t*)’:
../runtime/vm/dart_api_impl.cc:1485:57: error: declaration of ‘Dart_Result
dart::Dart_PostIntArray(Dart_Port, intptr_t, intptr_t*)’ with C language
linkage
../runtime/include/dart_api.h:380:25: error: conflicts with previous
declaration ‘Dart_Result Dart_PostIntArray(Dart_Port, int, intptr_t*)’
make: *** [out/Debug_x64/obj.target/libdart/runtime/vm/dart_api_impl.o] Error
1
BUILD FAILED

I gather that I am not the first to see this error.

Posted by Sam Ruby at

Starting over, trying again, this time on Ubuntu 11.10.  All it takes is to comment out the exit 1 statement after the message about which versions of Ubuntu are currently supported.  This time I get a different error:

CXX(target) out/Debug_x64/obj.target/libdart_vm/runtime/vm/parser.o
../runtime/vm/parser.cc: In member function ‘dart::CaseNode* dart::Parser::ParseCaseClause(dart::LocalVariable*, dart::SourceLabel*)’:
../runtime/vm/parser.cc:3666:12: error: variable ‘expr_pos’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

Commenting out three lines (3666, 3675, 3689), allows me to proceed to the next error:

CXX(target) out/Debug_x64/obj.target/libjscre/runtime/third_party/jscre/pcre_compile.o
../runtime/third_party/jscre/pcre_compile.cpp: In function ‘bool dart::jscre::compileBranch(int, int*, unsigned char**, const UChar**, const UChar*, dart::jscre::ErrorCode*, int*, int*, dart::jscre::CompileData&)’:
../runtime/third_party/jscre/pcre_compile.cpp:569:18: error: variable ‘tempptr’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

Again, commenting out lines 569 and 1567 lets me progress.  This time, to the same error in the previous comment.

Posted by Sam Ruby at

Picking up the following from bleeding_edge:

--- dart_api_impl.cc.1	2011-10-10 20:37:11.000000000 -0400
+++ dart_api_impl.cc	2011-10-11 10:02:27.872669038 -0400
@@ -35,8 +35,7 @@
 }
 
 
-DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot,
-                                            void* data) {
+DART_EXPORT Dart_Isolate Dart_CreateIsolate(void* snapshot, void* data) {
   ASSERT(Isolate::Current() == NULL);
   Isolate* isolate = Dart::CreateIsolate(snapshot, data);
   START_TIMER(time_total_runtime);
@@ -1482,8 +1481,7 @@
 }
 
 
-DART_EXPORT Dart_Result Dart_PostIntArray(Dart_Port port,
-                                          int field_count,
+DART_EXPORT Dart_Result Dart_PostIntArray(Dart_Port port, intptr_t field_count,
                                           intptr_t* data) {
   uint8_t* buffer = NULL;
   MessageWriter writer(&buffer, &allocator);

I get the following:

CXX(target) out/Debug_x64/obj.target/libdart/runtime/vm/dart_api_impl.o
../runtime/vm/dart_api_impl.cc: In function ‘void* dart::Dart_CreateIsolate(const Dart_Snapshot*, void*)’:
../runtime/vm/dart_api_impl.cc:41:56: error: invalid conversion from ‘const Dart_Snapshot* {aka const void*}’ to ‘void*’ [-fpermissive]
../runtime/vm/dart.h:22:19: error:   initializing argument 1 of ‘static dart::Isolate* dart::Dart::CreateIsolate(void*, void*)’ [-fpermissive]
make: *** [out/Debug_x64/obj.target/libdart/runtime/vm/dart_api_impl.o] Error 1
BUILD FAILED
Posted by Sam Ruby at

Next up: svn switch http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/, after undoing the previous changes.  This results in a successful build:

$ out/Debug_x64/dart
dart [<vm-flags>] <dart-script-file> [<dart-options>]
Posted by Sam Ruby at

I guess declaring “success” was a bit premature:

$ cat ../hello.dart 
main() {
  var name = 'World';
  print('Hello, ${name}!');
} 
$ out/Debug_x64/dart ../hello.dart 
../runtime/vm/assembler_x64.h:86: error: unimplemented code
Aborted (core dumped)
Posted by Sam Ruby at

I didn’t have quite so hard a time building dart (albeit on xubunut 11.04).  I’ve detailed step by step on my blog.

Posted by Chris Buckett at

Doesn’t look materially different than what I did.  Later today, or possibly tomorrow, I’ll try again from scratch following your instructions.

Posted by Sam Ruby at

I take it back.  Your instructions differ in two material ways: you use gcc-4.4, and you install Java.  Looking at your screen capture, Java was a part of the build, which initially was puzzling as it wasn’t a part of my sources:

find . -name *.java
./language/grammar/TestGrammar.java

An svn up later, and I had plenty of Java (why there would be any Java in Dart is another mystery to investigate).  Meanwhile, a clean rebuild of trunk does compile everything now (even with gcc-4.5), including a closure_out/Compiler.jar.

The build then fails with:

make: *** No rule to make target
`compiler/java/com/google/dart/runner/TestRunner.java', needed by
`out/Debug_ia32/obj.target/geni/dartc/tests.jar'.  Stop.

I seem to have a “d8” executable (which appears to be JS not Dart - example: string interpolation doesn’t work), and no dart executables.

It looks like Dart is a rapidly moving target at this point.

Posted by Sam Ruby at

Simply waiting a day, installing nothing new, and with a fresh sync of the source, I was able to build the standalone VM, and run Hello World.

Ubuntu 11.04.  gcc 4.5.2.

Posted by Sam Ruby at

Building on these instructions, here are instructions for building on Ubuntu 11.10:

sudo apt-get install libc6-dev:i386
sudo apt-get install build-essential subversion libssl-dev ia32-libs
sudo apt-get install gcc-multilib g++-multilib
sudo apt-get install gcc-4.4 gcc-4.4-multilib g++-4.4 g++-4.4-multilib
mkdir build
cd build
svn checkout http://src.chromium.org/svn/trunk/tools/depot_tools
export PATH=~/build/depot_tools:$PATH
mkdir dart-vm-only
cd dart-vm-only
gclient config http://dart.googlecode.com/svn/trunk/deps/standalone.deps
gclient sync
cd runtime
../tools/build.py --arch=ia32

Note: the installation of libc6-dev:i386 must be before and separate from the installation of build-essentials.  They fail to install together, and attempts to install libc6-dev:i386 after build-essentials will cause build-essentials and a few other packages to be uninstalled.

Posted by Sam Ruby at

Gold is more than 3 years old: [link]

Posted by James at

Add your comment