Skip to content

Instantly share code, notes, and snippets.

@igrigorik
Created May 2, 2012 02:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save igrigorik/47b77852c50cb8f57961 to your computer and use it in GitHub Desktop.
$ 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
$
@igrigorik
Copy link
Author

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

main.dart

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

Procfile:

web: dart main.dart

@igrigorik
Copy link
Author

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

@kr
Copy link

kr commented May 2, 2012

Hmm, that is really weird.

@kr
Copy link

kr commented May 2, 2012

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 $ 

@kr
Copy link

kr commented May 2, 2012

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

@kr
Copy link

kr commented May 2, 2012

Does that path exist on your local machine?

@kr
Copy link

kr commented May 2, 2012

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

@igrigorik
Copy link
Author

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

@kr
Copy link

kr commented May 2, 2012

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

@nzoschke
Copy link

nzoschke commented May 4, 2012

@igrigorik
Copy link
Author

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)

@nzoschke
Copy link

nzoschke commented May 4, 2012

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.

@igrigorik
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment