secret
Created

  • Download Gist
dart.bash
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13
$ echo $PATH
bin:/app/bin:/usr/local/bin:/usr/bin:/bin
$ ls -alh bin
total 28M
drwx--x--x 2 u59290 59290 4.0K May 2 02:22 .
drwx------ 4 u59290 59290 4.0K May 2 02:30 ..
-rwx--x--x 1 u59290 59290 28M May 2 01:58 dart
-rwx--x--x 1 u59290 59290 194 May 2 01:58 frogc
-rwx--x--x 1 u59290 59290 719 May 2 01:58 frogc.dart
$ chmod +x bin/dart
$ bin/dart
sh: bin/dart: not found
$

Buildpack: https://github.com/igrigorik/heroku-buildpack-dart

main.dart

main() {
  print('Hello, Dartium!');
}

Procfile:

web: dart main.dart

local

~/tmp/dart-sdk/bin$ file dart
dart: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

and on heroku

$ file dart
dart: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

Hmm, that is really weird.

This is interesting:

~/bin $ file dart
dart: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
~/bin $ ldd dart
    not a dynamic executable
~/bin $ strings dart|head -5
/lib/ld-linux.so.2
2R(  
EY#x
i:a~X
]dNy
~/bin $ strings /bin/echo|head -5
/lib64/ld-linux-x86-64.so.2
__gmon_start__
libc.so.6
__printf_chk
setlocale
~/bin $ ls -l /lib/ld-linux*
lrwxrwxrwx 1 root root 12 Oct 31  2011 /lib/ld-linux-x86-64.so.2 -> ld-2.11.1.so
~/bin $ 

Maybe it's barfing because /lib/ld-linux.so.2 doesn't exist?

Does that path exist on your local machine?

Maybe we need to fix our 32-bit compatibility libraries in the cedar stack image.
Is there a 64-bit distribution of dart?

Yep, have ld-linux.so.2 on this machine:

~/tmp/dart-sdk/bin$ ldd dart
    linux-gate.so.1 =>  (0xf57fe000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76f2000)
    librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb76e9000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb76e4000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb75f8000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb75ce000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb75b0000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7434000)
    /lib/ld-linux.so.2 (0xb7717000)

And looks like you're right about the 32 vs 64 bit, here's the Dart bug (they only provide 32 bit right now): http://code.google.com/p/dart/issues/detail?id=2052 - few comments in there about Ubuntu.

Hmm, this makes it tricky.. There is obviously the wait approach until Dart team provides a 64bit version, but what are the odds of adding the necessary 32 bit libraries on Heroku? /cc @kr

We should seriously consider it. I'm a little surprised we don't
already have 32-bit libraries in place. It could be a bug, or it
could be a deliberate omission.

cc @nzoschke

Aha.. That's great news! So, does that mean we can expect to have those show up soon on Heroku? :)

/cc @nzoschke (not sure if it'll auto notify you)

For some definition of "soon". I have a couple other changes to the cedar stack image to evaluate, plus we do fairly slow rollouts of new stack images in production to be safe.

Figures. Well, definitely let me know when it makes it in. Would love to have this up and running!

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.