Skip to content

Loading…

configure error: name 'arm_neon' is not defined (on ARM-linux) #4142

Closed
aapo opened this Issue · 10 comments

4 participants

@aapo

On ARM-linux with version 0.8.12

./configure ends with error:

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 511, in main
    return gyp_main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 494, in gyp_main
    options.circular_check)
  File "./tools/gyp/pylib/gyp/__init__.py", line 133, in Load
    depth, generator_input_info, check, circular_check)
  File "./tools/gyp/pylib/gyp/input.py", line 2378, in Load
    depth, check)
  File "./tools/gyp/pylib/gyp/input.py", line 430, in LoadTargetBuildFile
    includes, depth, check)
  File "./tools/gyp/pylib/gyp/input.py", line 384, in LoadTargetBuildFile
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "./tools/gyp/pylib/gyp/input.py", line 1027, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 904, in ProcessConditionsInDict
    variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1053, in ProcessVariablesAndConditionsInDict
    build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1068, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1053, in ProcessVariablesAndConditionsInDict
    build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1068, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1027, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 904, in ProcessConditionsInDict
    variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1027, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 904, in ProcessConditionsInDict
    variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1027, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 885, in ProcessConditionsInDict
    if eval(ast_code, {'__builtins__': None}, variables):
  File "<string>", line 1, in <module>
NameError: name 'arm_neon' is not defined while evaluating condition 'arm_neon!=1 and arm_fpu!="vfpv3" and arm_fpu!="vfpv3-d16"' in node-v0.8.12/deps/v8/tools/gyp/v8.gyp while loading dependencies of node-v0.8.12/node.gyp while trying to load node-v0.8.12/node.gyp

With this patch, configure success:

--- node-v0.8.12/deps/v8/build/common.gypi      2012-09-27 19:39:23.000000000 +0300
+++ common.gypi 2012-10-14 09:01:40.174694109 +0300
@@ -29,6 +29,8 @@

 {
   'variables': {
+    'armv7%':'1',
+    'arm_neon%':'1',
     'use_system_v8%': 0,
     'msvs_use_common_release': 0,
     'gcc_version%': 'unknown',

Should/Can these be passed as parameters to configure?

@TooTallNate

Out of curiosity, what ARM device are you targeting?

@aapo

Nokia N900/Maemo5: #4076 (comment)

@TooTallNate

@bnoordhuis Maybe we should backport bbf6b4e to v0.8?

@aapo

configure from git HEAD works out of box.

@bnoordhuis bnoordhuis added a commit that closed this issue
@bnoordhuis bnoordhuis configure: turn on VFPv3 on ARMv7
Fixes a V8 build error caused by missing arm_fpu and arm_neon settings.

This is a back-port of commit bbf6b4e from the master branch.

Fixes #4142.
1205734
@bnoordhuis
Node.js Foundation member

@TooTallNate Sure. Back-ported in 1205734.

@Pitel

I tried building git master branch on Raspberry Pi, but ended with this error. I guess this issue should be reopened!

Traceback (most recent call last):
  File "tools/gyp_node", line 57, 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 523, in main
    return gyp_main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 499, in gyp_main
    options.circular_check)
  File "./tools/gyp/pylib/gyp/__init__.py", line 129, in Load
    params['parallel'])
  File "./tools/gyp/pylib/gyp/input.py", line 2556, in Load
    variables, includes, depth, check, True)
  File "./tools/gyp/pylib/gyp/input.py", line 441, in LoadTargetBuildFile
    includes, depth, check, load_dependencies)
  File "./tools/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "./tools/gyp/pylib/gyp/input.py", line 1213, in ProcessVariablesAndConditionsInDict
    build_file, key)
  File "./tools/gyp/pylib/gyp/input.py", line 1194, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1071, in ProcessConditionsInDict
    variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1194, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 1052, in ProcessConditionsInDict
    if eval(ast_code, {'__builtins__': None}, variables):
  File "<string>", line 1, in <module>
NameError: name 'arm_neon' is not defined while evaluating condition 'v8_can_use_vfp2_instructions=="true" or arm_neon==1 or              arm_fpu=="vfpv3" or arm_fpu=="vfpv3-d16"' in /home/pi/node/deps/v8/tools/gyp/v8.gyp while loading dependencies of /home/pi/node/node.gyp while trying to load /home/pi/node/node.gyp
@bnoordhuis
Node.js Foundation member

@Pitel How did you invoke configure? Can you post the output of cc -v and uname -a?

@Pitel
git clone git://github.com/joyent/node.git
cd node
./configure
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-12+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-12+rpi1)
Linux raspberrypi 3.6.11+ #348 PREEMPT Tue Jan 1 16:33:22 GMT 2013 armv6l GNU/Linux
@bnoordhuis
Node.js Foundation member

Looks okay to me. I suspect that the is_arch_armv7 check in configure is failing. I don't have time or inclination to look into it (I don't have a Pi) but if you manage to fix it, send a pull request and I'll merge it.

@Pitel

i don't know if I put it in the proper place, and I didn't actualy compiled it and run some js code with it, but with this patch. at least it configures. I took the "default" values from v0.8-16, which compiled just fine on my Raspberry Pi.

diff --git a/deps/v8/build/common.gypi b/deps/v8/build/common.gypi
index 6d18b46..184a644 100644
--- a/deps/v8/build/common.gypi
+++ b/deps/v8/build/common.gypi
@@ -50,6 +50,8 @@
     # probing when running on the target.
     'v8_can_use_vfp2_instructions%': 'false',
     'v8_can_use_vfp3_instructions%': 'false',
+    'arm_neon%': 0,
+    'arm_fpu%': 'vfpv3',

     # Similar to vfp but on MIPS.
     'v8_can_use_fpu_instructions%': 'true',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.