Re: [nodejs] Unable to compile node v0.8 RC7 on ARM (Beaglebone)

1,188 views
Skip to first unread message

Ben Noordhuis

unread,
Jun 22, 2012, 9:51:29 AM6/22/12
to nod...@googlegroups.com
On Fri, Jun 22, 2012 at 3:39 PM, Ewan Leith <ewan....@gmail.com> wrote:
> Hi all, I'm trying to compile node v0.8 rc7 on my beaglebone, and the
> configure script it falling over. It does work fine on the 0.6 branch. Has
> anyone built node v0.8 or v0.7 on ARM?
>
> Running configure (with or without -det-cpu=arm) gives the following output:
>
> ./configure --dest-cpu=arm
> { 'target_defaults': { 'cflags': [],
>                        'default_configuration': 'Release',
>                        'defines': [],
>                        'include_dirs': [],
>                        'libraries': []},
>   'variables': { 'host_arch': 'arm',
>                  'node_install_npm': 'true',
>                  'node_install_waf': 'true',
>                  'node_prefix': '',
>                  'node_shared_openssl': 'false',
>                  'node_shared_v8': 'false',
>                  'node_shared_zlib': 'false',
>                  'node_use_dtrace': 'false',
>                  'node_use_etw': 'false',
>                  'node_use_openssl': 'true',
>                  'strict_aliasing': 'true',
>                  'target_arch': 'arm',
>                  'v8_use_snapshot': 'true'}}
> creating  ./config.gypi
> creating  ./config.mk
> Traceback (most recent call last):
>   File "tools/gyp_node", line 58, in <module>
>     run_gyp(gyp_args)
>   File "tools/gyp_node", line 18, in run_gyp
>     rc = gyp.main(args)
>   File "./tools/gyp/pylib/gyp/__init__.py", line 471, in main
>     options.circular_check)
>   File "./tools/gyp/pylib/gyp/__init__.py", line 111, in Load
>     depth, generator_input_info, check, circular_check)
>   File "./tools/gyp/pylib/gyp/input.py", line 2289, in Load
>     depth, check)
>   File "./tools/gyp/pylib/gyp/input.py", line 433, in LoadTargetBuildFile
>     includes, depth, check)
>   File "./tools/gyp/pylib/gyp/input.py", line 387, in LoadTargetBuildFile
>     build_file_path)
>   File "./tools/gyp/pylib/gyp/input.py", line 984, in
> ProcessVariablesAndConditionsInDict
>     ProcessConditionsInDict(the_dict, is_late, variables, build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 861, in
> ProcessConditionsInDict
>     variables, build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 1010, in
> ProcessVariablesAndConditionsInDict
>     build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 1025, in
> ProcessVariablesAndConditionsInList
>     ProcessVariablesAndConditionsInDict(item, is_late, variables,
> build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 1010, in
> ProcessVariablesAndConditionsInDict
>     build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 1025, in
> ProcessVariablesAndConditionsInList
>     ProcessVariablesAndConditionsInDict(item, is_late, variables,
> build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 984, in
> ProcessVariablesAndConditionsInDict
>     ProcessConditionsInDict(the_dict, is_late, variables, build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 861, in
> ProcessConditionsInDict
>     variables, build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 984, in
> ProcessVariablesAndConditionsInDict
>     ProcessConditionsInDict(the_dict, is_late, variables, build_file)
>   File "./tools/gyp/pylib/gyp/input.py", line 842, in
> ProcessConditionsInDict
>     if eval(ast_code, {'__builtins__': None}, variables):
>   File "<string>", line 1, in <module>
> NameError: name 'armv7' is not defined while evaluating condition 'armv7==1'
> in /tmp/node-v0.8.0/deps/v8/tools/gyp/v8.gyp while loading dependencies of
> /tmp/node-v0.8.0/node.gyp while trying to load /tmp/node-v0.8.0/node.gyp
>
>
> Hacking "deps/v8/tools/gyp/v8.gyp" to just remove the condition that it's
> complaining about at line 997, lets the build continue and complete, but it
> then crashes when built (probably because I'm excluding relevant switches to
> gcc by changing the configure output).
>
> The section of v8.gyp is around line 149:
>
>                   'conditions': [
>                     ['armv7==1', {
>
> Has anyone built node v0.8 or v0.7 on ARM or have some ideas of how to
> resolve this?

Gah, I'm still waiting for my BeagleBone.

Does it work when you add `'armv7%':'1'` (sans backticks) to the
variables section of config.gypi or common.gypi?

Ewan Leith

unread,
Jun 22, 2012, 10:06:10 AM6/22/12
to nod...@googlegroups.com
Thanks Ben, I added armv7 then it started complaining about arm_neon, so I've added that too, to deps/v8/build/common.gypi

I've added these 2 lines at the top, just inside the variables section:

    'armv7%':'1',
    'arm_neon%':'1',

configure completes now, so I'll try a straight make without any additional compiler flags and see what happens.

Thanks,
Ewan

On Friday, 22 June 2012 14:51:29 UTC+1, Ben Noordhuis wrote:

Tim Caswell

unread,
Jun 22, 2012, 10:44:59 AM6/22/12
to nod...@googlegroups.com
Also, I've recently noticed that archlinux ARM has nodejs in their repository.  It's usually quite up to date.  They support many arm devices including the beaglebone and the raspberry pi.  Even if you don't want to switch to archlinux or just want a newer node than the one they are packaging, their PKGBUILD should be up somewhere to see how it's done for each platform.

http://archlinuxarm.org/platforms/armv7/beaglebone
http://archlinuxarm.org/packages - search for armv7 and nodejs.  Currently it has v0.6.19

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Ewan Leith

unread,
Jun 22, 2012, 11:36:31 AM6/22/12
to nod...@googlegroups.com
The compile completes with those 2 additional lines to deps/v8/build/common.gypi but running make test raises various errors like

[00:44|%   7|+  27|-   4]: release test-tls-npn-server-client*** glibc detected *** out/Release/node: free(): invalid pointer: 0x00717308 ***


so I'll take a look and see if I can work out what's going on.

Thanks,
Ewan





On Friday, 22 June 2012 15:44:59 UTC+1, Tim Caswell wrote:
Also, I've recently noticed that archlinux ARM has nodejs in their repository.  It's usually quite up to date.  They support many arm devices including the beaglebone and the raspberry pi.  Even if you don't want to switch to archlinux or just want a newer node than the one they are packaging, their PKGBUILD should be up somewhere to see how it's done for each platform.

http://archlinuxarm.org/platforms/armv7/beaglebone
http://archlinuxarm.org/packages - search for armv7 and nodejs.  Currently it has v0.6.19

Jeroen Janssen

unread,
Jun 22, 2012, 4:54:40 PM6/22/12
to nodejs
Hi,

I'm going to try building node master on my Synology 211j again
(Feroceon 88FR131 rev 1 (v5l))

I remember from past experience that I had to patch SConstruct to pass
-march=armv5t and have armeabi to soft (default was softfp).

It seems now (maybe back then aswell) you I can actually pass --dest-
cpu=armv5t to the configure script (it could be that this also works
for armv7)

Since it takes a looooooooooooong time to compile, I don't know yet if
I'll hit any other roadblocks.

Best regards,

Jeroen

On Jun 22, 3:51 pm, Ben Noordhuis <i...@bnoordhuis.nl> wrote:

rtweed

unread,
Jun 23, 2012, 3:17:42 AM6/23/12
to nodejs
On a related note, I wanted to install the 0.6.x build of Node on my
Raspberry Pi. I followed the instructions at:

http://blog.tomg.co/post/21322413373/how-to-install-node-js-on-your-raspberry-pi

I found that the latest 0.6.19 failed during the make process.
However, 0.6.15 installed OK. Not sure why, just wanted to give folks
the heads-up

Rob

FleetCommand

unread,
Oct 21, 2012, 9:15:59 AM10/21/12
to nod...@googlegroups.com
Thanks to Ewan and Ben..
adding those two lines to common.gypi worked...
I am able to compile and install node.js on ubuntu ( exynos processor).
I should upload the compiled version to some where so any body can download and use
directly ... any Idea where should I upload it?
Reply all
Reply to author
Forward
0 new messages