Problems installing on Heroku

361 views
Skip to first unread message

jnicklas

unread,
Jan 17, 2011, 3:54:17 AM1/17/11
to The Ruby Racer
Hi all,

first of all, thanks for a great library!

I'm having problems installing therubyracer on Heroku. It installs
fine locally. I tried on both the 1.8.7 and the 1.9.2 stacks with the
same result. I am using the 0.8.0 gem. This is the error message I am
getting: http://pastie.org/1469181

Has anyone else had this problem on Heroku, is there a known
workaround?

Thank you!

/Jonas Nicklas

Charles Lowell

unread,
Jan 17, 2011, 11:25:16 AM1/17/11
to therub...@googlegroups.com
Jonas,

Thanks for the shout out. I think this is the first time this has come up, but looking at the logs, it looks like a problem is with the V8 build itself.

A little background: V8 is actually bundled with the gem, and it compiles as part of the install. In fact, we actually bundle the SConstruct build tool with the gem as well, but that's another story.

It looks like SConstruct( the v8 build tool) installs correctly, but the first line of the V8 build fails:

scons: Building targets ...
       gcc -o obj/release/dtoa-config.o -c -Werror -Wno-uninitialized -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -fPIC -ansi -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -Isrc src/dtoa-config.c
       fatal: unrecognized command 'gcc -o "obj/release/dtoa-config.o" -c -Werror -Wno-uninitialized -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -fPIC -ansi -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEB
Is gcc available on heroku? Is it maybe called something else than gcc? `cc` maybe? Also, which version of python is on heroku?

cheers,
Charles

alex....@gmail.com

unread,
Jan 20, 2011, 3:14:24 PM1/20/11
to therub...@googlegroups.com
I have exactly the same problem.

Looks like Heroku has python and gcc installed. Here is the list of packages on Heroku http://bamboo-mri192-versions.heroku.com/


Charles Lowell

unread,
Jan 23, 2011, 11:27:04 PM1/23/11
to therub...@googlegroups.com
Hmm... I've never seen this bug before, but if the output can be trusted,  it looks like the command is getting truncated.

'gcc -o "obj/release/dtoa-config.o" -c -Werror -Wno-uninitialized -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -fPIC -ansi -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEB
I'm not sure what to attribute this to, but the problem is with the V8 build itself. You might try upgrading to python 2.6, although I'd want to debug the SConstruct script by hand to make sure.

You can run just the V8 build with

cd ext/v8/upstream
make

This will install SCons and try to build v8. Once SCons installs you can run it manually to try and find out why it is emitting invalid gcc commands. As a first step though, I'd use a new version of python.

cheers,
Charles

Jonas Nicklas

unread,
Jan 24, 2011, 2:52:32 AM1/24/11
to therub...@googlegroups.com
Kind of tricky since this is on Heroku ;) I guess we'll have to file
an issue with Heroku and see if they have any ideas.

/Jonas

Prathan Thananart

unread,
Jan 31, 2011, 4:44:41 AM1/31/11
to The Ruby Racer
Having this problem. Build fails at this line:

gcc -o obj/release/dtoa-config.o -c -Werror -Wno-uninitialized -m64 -
O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -fPIC -
ansi -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -
DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -Isrc src/dtoa-
config.c
fatal: unrecognized command 'gcc -o "obj/release/dtoa-config.o"
-c -Werror -Wno-uninitialized -m64 -O3 -fomit-frame-pointer -fdata-
sections -ffunction-sections -fPIC -ansi -DV8_TARGET_ARCH_X64 -
DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEB

which is weird given the bamboo stack has gcc 4.2/4.3 installed.

>> `which gcc`
=> "/usr/bin/gcc\n"

Has anyone come up with a solution?

-Prathan

On Jan 24, 2:52 pm, Jonas Nicklas <jonas.nick...@gmail.com> wrote:
> Kind of tricky since this is on Heroku ;) I guess we'll have to file
> an issue with Heroku and see if they have any ideas.
>
> /Jonas
>
> On Mon, Jan 24, 2011 at 5:27 AM, Charles Lowell
>
>
>
> <cowb...@thefrontside.net> wrote:
> > Hmm... I've never seen this bug before, but if the output can be trusted,
> >  it looks like the command is getting truncated.
>
> > 'gcc -o "obj/release/dtoa-config.o" -c -Werror -Wno-uninitialized -m64 -O3
> > -fomit-frame-pointer -fdata-sections -ffunction-sections -fPIC -ansi
> > -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING
> > -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEB
>
> > I'm not sure what to attribute this to, but the problem is with the V8 build
> > itself. You might try upgrading to python 2.6, although I'd want to debug
> > the SConstruct script by hand to make sure.
> > You can run just the V8 build with
> > cd ext/v8/upstream
> > make
> > This will install SCons and try to build v8. Once SCons installs you can run
> > it manually to try and find out why it is emitting invalid gcc commands. As
> > a first step though, I'd use a new version of python.
> > cheers,
> > Charles
>

Prathan Thananart

unread,
Jan 31, 2011, 5:00:24 AM1/31/11
to The Ruby Racer
Switching to this gem solves the problem for me:

https://github.com/aler/therubyracer-heroku

-Prathan

On Jan 24, 2:52 pm, Jonas Nicklas <jonas.nick...@gmail.com> wrote:
> Kind of tricky since this is on Heroku ;) I guess we'll have to file
> an issue with Heroku and see if they have any ideas.
>
> /Jonas
>
> On Mon, Jan 24, 2011 at 5:27 AM, Charles Lowell
>
>
>
> <cowb...@thefrontside.net> wrote:
> > Hmm... I've never seen this bug before, but if the output can be trusted,
> >  it looks like the command is getting truncated.
>
> > 'gcc -o "obj/release/dtoa-config.o" -c -Werror -Wno-uninitialized -m64 -O3
> > -fomit-frame-pointer -fdata-sections -ffunction-sections -fPIC -ansi
> > -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING
> > -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEB
>
> > I'm not sure what to attribute this to, but the problem is with the V8 build
> > itself. You might try upgrading to python 2.6, although I'd want to debug
> > the SConstruct script by hand to make sure.
> > You can run just the V8 build with
> > cd ext/v8/upstream
> > make
> > This will install SCons and try to build v8. Once SCons installs you can run
> > it manually to try and find out why it is emitting invalid gcc commands. As
> > a first step though, I'd use a new version of python.
> > cheers,
> > Charles
>

Charles Lowell

unread,
Jan 31, 2011, 10:11:08 AM1/31/11
to therub...@googlegroups.com
Prathan,

As you found Alex has been kind enough to provide a gem that works on heroku. The problem is that the V8 build (which is in python) appears to actually be truncating the gcc invocation. This might be a problem with the installed version of python, but unless I can get a hands on session, it's difficult to say.

I'm going to follow up with Heroku and see If they would let me debug this on one of their servers.

cheers,
Charles

Reply all
Reply to author
Forward
0 new messages