Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Error compiling v0.10.30 on Raspberry Pi Model B #8062

Closed
nathanjohnson320 opened this issue Aug 2, 2014 · 107 comments
Closed

Error compiling v0.10.30 on Raspberry Pi Model B #8062

nathanjohnson320 opened this issue Aug 2, 2014 · 107 comments
Labels

Comments

@nathanjohnson320
Copy link

When I run

./configure
make

I get the error

/home/pi/node_arm/scripts/node/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/home/pi/node_arm/scripts/node/node-v0.10.30/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x474): first defined here
/home/pi/node_arm/scripts/node/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_rdtsc':
armcap.c:(.text+0x44): undefined reference to `_armv7_tick'
/home/pi/node_arm/scripts/node/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x138): undefined reference to `_armv7_neon_probe'
armcap.c:(.text.startup+0x150): undefined reference to `_armv7_tick'
collect2: ld returned 1 exit status
make[1]: *** [/home/pi/node_arm/scripts/node/node-v0.10.30/out/Release/node] Error 1
make[1]: Leaving directory `/home/pi/node_arm/scripts/node/node-v0.10.30/out'
make: *** [node] Error 2

This happens on all 3 Raspberry Pis that I have running the latest version of Raspbian.

@yorkie
Copy link

yorkie commented Aug 2, 2014

OpenSSL's bug produced by your processor and what's your processor? see https://github.com/joyent/node/blob/master/deps/openssl/openssl/crypto/cryptlib.c#L664-L666

Your processor macro seems not to be included, then #if !defined(OPENSSL_CPUID_SETUP) && !defined(OPENSSL_CPUID_OBJ) would be false, void OPENSSL_cpuid_setup(void) {} in line 723 will be defined, next, the build of your pi(ARM) will load armcap.c, such that the definition of OPENSSL_cpuid_setup redo, and the build breaks.

To fix it ASAP, you can define a macro listed before by hand here(https://github.com/joyent/node/blob/master/deps/openssl/openssl.gyp#L941-L943).

But for best fixup, openssl is the place to do IMO, but fixup(macro by hand) in node should be acceptable for us.

@nathanjohnson320
Copy link
Author

Is this what you are suggesting?


        ['target_arch=="arm"', {
          'defines': [
            '__i386',
          ],
          'sources': ['openssl/crypto/armcap.c'],
        }],

@yorkie
Copy link

yorkie commented Aug 3, 2014

Yeah, but i dont know if it can work, because of hacky, also dont know any side effect of it...

@nathanjohnson320
Copy link
Author

Tried that change and still get this error

../src/node_crypto.cc: In member function ‘size_t node::crypto::ClientHelloParser::Write(const uint8_t*, size_t)’:
../src/node_crypto.cc:830:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  flock /home/pi/node-v0.10.30/out/Release/linker.lock g++ -pthread -rdynamic -Wl,--whole-archive /home/pi/node-v0.10.30/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,--whole-archive /home/pi/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /home/pi/node-v0.10.30/out/Release/node -Wl,--start-group /home/pi/node-v0.10.30/out/Release/obj.target/node/src/fs_event_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/cares_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/handle_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_buffer.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_constants.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_extensions.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_file.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_http_parser.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_javascript.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_main.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_os.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_script.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_stat_watcher.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_string.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_zlib.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/pipe_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/signal_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/string_bytes.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/stream_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/slab_allocator.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/tcp_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/timer_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/tty_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/process_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/v8_typed_array.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/udp_wrap.o /home/pi/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o /home/pi/node-v0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a /home/pi/node-v0.10.30/out/Release/obj.target/deps/zlib/libchrome_zlib.a /home/pi/node-v0.10.30/out/Release/obj.target/deps/http_parser/libhttp_parser.a /home/pi/node-v0.10.30/out/Release/obj.target/deps/cares/libcares.a /home/pi/node-v0.10.30/out/Release/obj.target/deps/uv/libuv.a /home/pi/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /home/pi/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_snapshot.a -Wl,--end-group -lm -ldl -lrt
/home/pi/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/home/pi/node-v0.10.30/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x484): first defined here
/home/pi/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_rdtsc':
armcap.c:(.text+0x44): undefined reference to `_armv7_tick'
/home/pi/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x138): undefined reference to `_armv7_neon_probe'
armcap.c:(.text.startup+0x150): undefined reference to `_armv7_tick'
collect2: ld returned 1 exit status
make[1]: *** [/home/pi/node-v0.10.30/out/Release/node] Error 1
make[1]: Leaving directory `/home/pi/node-v0.10.30/out'
make: *** [node] Error 2

@yorkie
Copy link

yorkie commented Aug 3, 2014

add I386_ONLY and try again?

@nathanjohnson320
Copy link
Author

Still the same error

@mmalecki
Copy link

mmalecki commented Aug 5, 2014

I'm seeing the same error too:

➜  node-0.10 git:(v0.10) make -j2
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/tmp/node-0.10/out'
  flock /tmp/node-0.10/out/Release/linker.lock g++ -pthread -rdynamic -Wl,--whole-archive /tmp/node-0.10/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,--whole-archive /tmp/node-0.10/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /tmp/node-0.10/out/Release/node -Wl,--start-group /tmp/node-0.10/out/Release/obj.target/node/src/fs_event_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/cares_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/handle_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/node.o /tmp/node-0.10/out/Release/obj.target/node/src/node_buffer.o /tmp/node-0.10/out/Release/obj.target/node/src/node_constants.o /tmp/node-0.10/out/Release/obj.target/node/src/node_extensions.o /tmp/node-0.10/out/Release/obj.target/node/src/node_file.o /tmp/node-0.10/out/Release/obj.target/node/src/node_http_parser.o /tmp/node-0.10/out/Release/obj.target/node/src/node_javascript.o /tmp/node-0.10/out/Release/obj.target/node/src/node_main.o /tmp/node-0.10/out/Release/obj.target/node/src/node_os.o /tmp/node-0.10/out/Release/obj.target/node/src/node_script.o /tmp/node-0.10/out/Release/obj.target/node/src/node_stat_watcher.o /tmp/node-0.10/out/Release/obj.target/node/src/node_string.o /tmp/node-0.10/out/Release/obj.target/node/src/node_zlib.o /tmp/node-0.10/out/Release/obj.target/node/src/pipe_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/signal_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/string_bytes.o /tmp/node-0.10/out/Release/obj.target/node/src/stream_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/slab_allocator.o /tmp/node-0.10/out/Release/obj.target/node/src/tcp_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/timer_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/tty_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/process_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/v8_typed_array.o /tmp/node-0.10/out/Release/obj.target/node/src/udp_wrap.o /tmp/node-0.10/out/Release/obj.target/node/src/node_crypto.o /tmp/node-0.10/out/Release/obj.target/deps/openssl/libopenssl.a /tmp/node-0.10/out/Release/obj.target/deps/zlib/libchrome_zlib.a /tmp/node-0.10/out/Release/obj.target/deps/http_parser/libhttp_parser.a /tmp/node-0.10/out/Release/obj.target/deps/cares/libcares.a /tmp/node-0.10/out/Release/obj.target/deps/uv/libuv.a /tmp/node-0.10/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /tmp/node-0.10/out/Release/obj.target/deps/v8/tools/gyp/libv8_snapshot.a -Wl,--end-group -lm -ldl -lrt
/tmp/node-0.10/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/tmp/node-0.10/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x4b0): first defined here
/tmp/node-0.10/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_rdtsc':
armcap.c:(.text+0x48): undefined reference to `_armv7_tick'
/tmp/node-0.10/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x130): undefined reference to `_armv7_tick'
armcap.c:(.text.startup+0x16c): undefined reference to `_armv7_neon_probe'
collect2: error: ld returned 1 exit status
node.target.mk:170: recipe for target '/tmp/node-0.10/out/Release/node' failed
make[1]: *** [/tmp/node-0.10/out/Release/node] Error 1
make[1]: Leaving directory '/tmp/node-0.10/out'
Makefile:38: recipe for target 'node' failed
make: *** [node] Error 2

uname -a: Linux cb 3.4.0-ARCH #1 SMP Sun May 25 18:58:05 MDT 2014 armv7l GNU/Linux

gcc -dumpmachine: armv7l-unknown-linux-gnueabihf

(cc'ing @indutny because OpenSSL is involved)

@needforspeed
Copy link

I saw the similar issue for pogoplug (arm5). The setting works for all previous node cross compilations.

export PATH=/home/yzhang/arm/Nodejs-ARM-builder/x-tools/arm-unknown-linux-gnueabi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export TOOL_PREFIX=arm-unknown-linux-gnueabi
export CC=arm-unknown-linux-gnueabi-gcc
export CXX=arm-unknown-linux-gnueabi-g++
export AR=arm-unknown-linux-gnueabi-ar
export RANLIB=arm-unknown-linux-gnueabi-ranlib
export LINK=arm-unknown-linux-gnueabi-g++
export 'CCFLAGS=-march=armv5t -mfpu=softfp -marm'
export 'CXXFLAGS=-march=armv5t -mno-unaligned-access'
export OPENSSL_armcap=5
export 'GYPFLAGS=-Darmeabi=soft -Dv8_can_use_vfp_instructions=false -Dv8_can_use_unaligned_accesses=false -Darmv7=0'
export VFP3=off
export VFP2=off
PREFIX_DIR=/usr/local
cd node
./configure --without-snapshot --dest-cpu=arm --dest-os=linux --prefix=/usr/local
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'arm_fpu': 'vfpv2',
                 'arm_neon': 0,
                 'armv7': 0,
                 'clang': 0,
                 'gcc_version': 48,
                 'host_arch': 'arm',
                 'node_install_npm': 'true',
                 'node_prefix': '/usr/local',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_systemtap': 'false',
                 'python': '/usr/bin/python',
                 'target_arch': 'arm',
                 'v8_enable_gdbjit': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_use_arm_eabi_hardfloat': 'false',
                 'v8_use_snapshot': 'false',
                 'want_separate_host_toolset': 0}}
creating  ./config.gypi
creating  ./config.mk
make -j 2
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out'

.
.
.

  arm-unknown-linux-gnueabi-g++ -pthread -rdynamic -Wl,--whole-archive /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,--whole-archive /home/yzhang/arm/Nodejs-ARM-builder/ node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node -Wl,--start-group /home/yzhang/arm/Nodejs-ARM-builder/ node-v0.10.30/out/Release/obj.target/node/src/fs_event_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/cares_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.   target/node/src/handle_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_buffer.o /home/     yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_constants.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_extensions.o /home/yzhang/arm/Nodejs-ARM-     builder/node-v0.10.30/out/Release/obj.target/node/src/node_file.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_http_parser.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/     Release/obj.target/node/src/node_javascript.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_main.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/    node_os.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_script.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_stat_watcher.o /home/yzhang/arm/ Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_string.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_zlib.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/   out/Release/obj.target/node/src/pipe_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/signal_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/    string_bytes.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/stream_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/slab_allocator.o /home/yzhang/   arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/tcp_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/timer_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/ out/Release/obj.target/node/src/tty_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/process_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/    v8_typed_array.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/udp_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o /home/yzhang/arm/   Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/zlib/libchrome_zlib.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/http_parser/libhttp_parser.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/cares/libcares.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.  target/deps/uv/libuv.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/        libv8_nosnapshot.a -Wl,--end-group -lm -ldl -lrt
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x4a4): first defined here
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_rdtsc':
armcap.c:(.text+0x44): undefined reference to `_armv7_tick'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x118): undefined reference to `_armv7_tick'
armcap.c:(.text.startup+0x150): undefined reference to `_armv7_neon_probe'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node] Error 1
make[1]: Leaving directory `/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out'
make: *** [node] Error 2
+ make install DESTDIR=/tmp/installARMv5
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out'
  arm-unknown-linux-gnueabi-g++ -pthread -rdynamic -Wl,--whole-archive /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,--whole-archive /home/yzhang/arm/Nodejs-ARM-builder/ node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node -Wl,--start-group /home/yzhang/arm/Nodejs-ARM-builder/ node-v0.10.30/out/Release/obj.target/node/src/fs_event_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/cares_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.   target/node/src/handle_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_buffer.o /home/     yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_constants.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_extensions.o /home/yzhang/arm/Nodejs-ARM-     builder/node-v0.10.30/out/Release/obj.target/node/src/node_file.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_http_parser.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/     Release/obj.target/node/src/node_javascript.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_main.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/    node_os.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_script.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_stat_watcher.o /home/yzhang/arm/ Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_string.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_zlib.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/   out/Release/obj.target/node/src/pipe_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/signal_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/    string_bytes.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/stream_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/slab_allocator.o /home/yzhang/   arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/tcp_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/timer_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/ out/Release/obj.target/node/src/tty_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/process_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/    v8_typed_array.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/udp_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o /home/yzhang/arm/   Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/zlib/libchrome_zlib.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/http_parser/libhttp_parser.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/cares/libcares.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.  target/deps/uv/libuv.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/        libv8_nosnapshot.a -Wl,--end-group -lm -ldl -lrt
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x4a4): first defined here
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_rdtsc':
armcap.c:(.text+0x44): undefined reference to `_armv7_tick'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x118): undefined reference to `_armv7_tick'
armcap.c:(.text.startup+0x150): undefined reference to `_armv7_neon_probe'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node] Error 1
make[1]: Leaving directory `/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out'
make: *** [node] Error 2

@trevnorris trevnorris added the arm label Aug 5, 2014
@cokron
Copy link

cokron commented Aug 7, 2014

I'm having the same error, please keep us updated if there are any news on this. (Also on Raspberry PI model B with latest debian wheezy). Thanks!

@cscalfani
Copy link

Also, having this problem with Raspberry PI model B. Any help would be greatly appreciated. Thanks.

@tjfontaine
Copy link

The two candidate changes are 93390ff and 9f36c0d, please try and revert the first one, and if that's not enough try the second.

@cscalfani
Copy link

93390ff built for me. Thanks.

@bendavis78
Copy link

I'm still seeing this in 0.10.30 (which should to contain the previously mentioned changes). I'm using the following configure options:

--without-snapshot --prefix=/usr --dest-cpu=arm --with-arm-float-abi=hard

Output at the end of failed make command:

  flock /build/nodejs/nodejs-0.10.30/out/Release/linker.lock g++ -pthread -rdynamic -Wl,--whole-archive /build/nodejs/nodejs-0.10.30/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,--whole-archive /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /build/nodejs/nodejs-0.10.30/out/Release/node -Wl,--start-group /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/fs_event_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/cares_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/handle_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_buffer.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_constants.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_extensions.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_file.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_http_parser.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_javascript.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_main.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_os.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_script.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_stat_watcher.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_string.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_zlib.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/pipe_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/signal_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/string_bytes.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/stream_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/slab_allocator.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/tcp_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/timer_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/tty_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/process_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/v8_typed_array.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/udp_wrap.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/node/src/node_crypto.o /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/zlib/libchrome_zlib.a /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/http_parser/libhttp_parser.a /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/cares/libcares.a /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/uv/libuv.a /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /build/nodejs/nodejs-0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a -Wl,--end-group -lm -ldl -lrt
/build/nodejs/nodejs-0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/build/nodejs/nodejs-0.10.30/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x2cc): first defined here
/build/nodejs/nodejs-0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_rdtsc':
armcap.c:(.text+0x2c): undefined reference to `_armv7_tick'
/build/nodejs/nodejs-0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0xda): undefined reference to `_armv7_neon_probe'
armcap.c:(.text.startup+0xea): undefined reference to `_armv7_tick'
collect2: ld returned 1 exit status
make[2]: *** [/build/nodejs/nodejs-0.10.30/out/Release/node] Error 1
make[2]: Leaving directory `/build/nodejs/nodejs-0.10.30/out'
make[1]: *** [node] Error 2
make[1]: Leaving directory `/build/nodejs/nodejs-0.10.30'
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Build command 'cd nodejs-0.10.30 && dpkg-buildpackage -b -uc' failed.
E: Child process failed

@needforspeed
Copy link

@ tjfontaine
I tried to revert, but saw this error message:

Firstly, I checkout v0.10.30:

 % git checkout v0.10.30 
Note: checking out 'v0.10.30'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at bc0ff83... 2014.07.31, Version 0.10.30 (Stable)

Then I revert the change:

 % git revert 93390ff   
error: could not revert 93390ff... test: fix  test-tls-server-verify
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

@bendavis78
Copy link

Scratch my last comment. I didn't realize 93390ff was the commit I needed to roll back to (thought it was the fix).

I was able to get it work compiling that version.

@needforspeed just do:

git checkout 93390ff

in the source dir. It will give a message about being in detached HEAD but you can ignore that.

@tjfontaine
Copy link

@indutny the configuration we use for openssl and its cli seems to have broken arm builds, at least for 0.10 /cc @TooTallNate

@sxa
Copy link
Member

sxa commented Aug 11, 2014

Agreed - having seen the problem myself it seems to be the change that introduced -Wl,--whole-archive on libopenssl.a in the top level node.ftp that's exposed the issue.

@indutny
Copy link
Member

indutny commented Aug 11, 2014

ooooh... --whole-archive thing.

@indutny
Copy link
Member

indutny commented Aug 11, 2014

Wait, is it openssl-cli or whole-archive?

@tjfontaine
Copy link

the commit he referenced was cli

@indutny
Copy link
Member

indutny commented Aug 11, 2014

Does following patch fix the problem for you:

diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp
index b3ae004..cc4a425 100644
--- a/deps/openssl/openssl.gyp
+++ b/deps/openssl/openssl.gyp
@@ -939,7 +939,10 @@
           ],
         }],
         ['target_arch=="arm"', {
-          'sources': ['openssl/crypto/armcap.c'],
+          'sources': [
+            'openssl/crypto/armcap.c',
+            'openssl/crypto/armv4cpuid.S',
+          ],
         }],
       ],
       'include_dirs': [

@needforspeed
Copy link

@indutny

I got multiple definition of `OPENSSL_cpuid_setup'

../src/v8_typed_array_bswap.h: In function 'T v8_typed_array::LoadAndSwapBytes(void*) [with T = float]':
../src/v8_typed_array_bswap.h:155:16: warning: typedef 'VerifySizesAreEqual' locally defined but not used [-Wunused-local-typedefs]
   typedef char VerifySizesAreEqual[sizeof(uint32_t) == sizeof(float) ? 1 : -1];
                ^
../src/v8_typed_array_bswap.h: In function 'T v8_typed_array::LoadAndSwapBytes(void*) [with T = double]':
../src/v8_typed_array_bswap.h:166:16: warning: typedef 'VerifySizesAreEqual' locally defined but not used [-Wunused-local-typedefs]
   typedef char VerifySizesAreEqual[sizeof(uint64_t) == sizeof(double) ? 1 : -1];
                ^
../src/v8_typed_array_bswap.h: In function 'void v8_typed_array::SwapBytesAndStore(void*, T) [with T = float]':
../src/v8_typed_array_bswap.h:183:16: warning: typedef 'VerifySizesAreEqual' locally defined but not used [-Wunused-local-typedefs]
   typedef char VerifySizesAreEqual[sizeof(uint32_t) == sizeof(float) ? 1 : -1];
                ^
../src/v8_typed_array_bswap.h: In function 'void v8_typed_array::SwapBytesAndStore(void*, T) [with T = double]':
../src/v8_typed_array_bswap.h:192:16: warning: typedef 'VerifySizesAreEqual' locally defined but not used [-Wunused-local-typedefs]
   typedef char VerifySizesAreEqual[sizeof(uint64_t) == sizeof(double) ? 1 : -1];
                ^
  arm-unknown-linux-gnueabi-g++ '-DNODE_WANT_INTERNALS=1' '-DARCH="arm"' '-DPLATFORM="linux"' '-DNODE_TAG=""' '-DHAVE_OPENSSL=1' '-D__POSIX__' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_POSIX_C_SOURCE=200112' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj/gen -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -pthread -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/.deps//home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/udp_wrap.o.d.raw -march=armv5t -mno-unaligned-access -c -o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/udp_wrap.o ../src/udp_wrap.cc
  arm-unknown-linux-gnueabi-g++ '-DNODE_WANT_INTERNALS=1' '-DARCH="arm"' '-DPLATFORM="linux"' '-DNODE_TAG=""' '-DHAVE_OPENSSL=1' '-D__POSIX__' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_POSIX_C_SOURCE=200112' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj/gen -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -pthread -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/.deps//home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o.d.raw -march=armv5t -mno-unaligned-access -c -o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o ../src/node_crypto.cc
  arm-unknown-linux-gnueabi-g++ -pthread -rdynamic -Wl,--whole-archive /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,--whole-archive /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node -Wl,--start-group /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/fs_event_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/cares_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/handle_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_buffer.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_constants.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_extensions.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_file.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_http_parser.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_javascript.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_main.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_os.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_script.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_stat_watcher.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_string.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_zlib.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/pipe_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/signal_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/string_bytes.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/stream_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/slab_allocator.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/tcp_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/timer_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/tty_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/process_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/v8_typed_array.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/udp_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/zlib/libchrome_zlib.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/http_parser/libhttp_parser.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/cares/libcares.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/uv/libuv.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a -Wl,--end-group -lm -ldl -lrt
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x4a4): first defined here
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armv4cpuid.o): In function `OPENSSL_cleanse':
(.text+0x60): multiple definition of `OPENSSL_cleanse'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(mem_clr.o):mem_clr.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node] Error 1
make[1]: Leaving directory `/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out'
make: *** [node] Error 2

@indutny
Copy link
Member

indutny commented Aug 11, 2014

Gosh, I totally don't get, how it could produce multiple definitions, considering that these functions are behind:

#if defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
    defined(__INTEL__) || \
    defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)

@indutny
Copy link
Member

indutny commented Aug 11, 2014

What about this:

diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp
index b3ae004..cc4a425 100644
--- a/deps/openssl/openssl.gyp
+++ b/deps/openssl/openssl.gyp
@@ -939,7 +939,10 @@
           ],
         }],
         ['target_arch=="arm"', {
-          'sources': ['openssl/crypto/armcap.c'],
+          'sources': [
+            'openssl/crypto/armcap.c',
+            'openssl/crypto/armv4cpuid.S',
+          ],
         }],
       ],
       'include_dirs': [
diff --git a/deps/openssl/openssl/crypto/cryptlib.c b/deps/openssl/openssl/crypto/cryptlib.c
index 0b77d8b..d16986d 100644
--- a/deps/openssl/openssl/crypto/cryptlib.c
+++ b/deps/openssl/openssl/crypto/cryptlib.c
@@ -661,9 +661,11 @@ const char *CRYPTO_get_lock_name(int type)
        return(sk_OPENSSL_STRING_value(app_locks,type-CRYPTO_NUM_LOCKS));
    }

-#if    defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
+#if    !defined(_ARM_ARCH__) && \
+   (defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
    defined(__INTEL__) || \
-   defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
+   defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
+   defined(_M_X64))

 unsigned int  OPENSSL_ia32cap_P[2];
 unsigned long *OPENSSL_ia32cap_loc(void)

@indutny
Copy link
Member

indutny commented Aug 11, 2014

Actually, better this one:

diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp
index b3ae004..231c449 100644
--- a/deps/openssl/openssl.gyp
+++ b/deps/openssl/openssl.gyp
@@ -667,7 +667,6 @@
             'openssl/crypto/camellia/cmll_misc.c',
             'openssl/crypto/des/des_enc.c',
             'openssl/crypto/des/fcrypt_b.c',
-            'openssl/crypto/mem_clr.c',
             'openssl/crypto/rc4/rc4_enc.c',
             'openssl/crypto/rc4/rc4_skey.c',
             'openssl/crypto/whrlpool/wp_block.c'
@@ -922,6 +921,11 @@
             }]
           ]
         }],
+        ['target_arch!="ia32" and target_arch!="x64" and target_arch!="arm"', {
+          'sources': [
+            'openssl/crypto/mem_clr.c',
+          ],
+        }],
         ['OS=="win"', {
           'link_settings': {
             'libraries': [
@@ -939,7 +943,10 @@
           ],
         }],
         ['target_arch=="arm"', {
-          'sources': ['openssl/crypto/armcap.c'],
+          'sources': [
+            'openssl/crypto/armcap.c',
+            'openssl/crypto/armv4cpuid.S',
+          ],
         }],
       ],
       'include_dirs': [
diff --git a/deps/openssl/openssl/crypto/cryptlib.c b/deps/openssl/openssl/crypto/cryptlib.c
index 0b77d8b..d16986d 100644
--- a/deps/openssl/openssl/crypto/cryptlib.c
+++ b/deps/openssl/openssl/crypto/cryptlib.c
@@ -661,9 +661,11 @@ const char *CRYPTO_get_lock_name(int type)
        return(sk_OPENSSL_STRING_value(app_locks,type-CRYPTO_NUM_LOCKS));
    }

-#if    defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
+#if    !defined(_ARM_ARCH__) && \
+   (defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
    defined(__INTEL__) || \
-   defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
+   defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
+   defined(_M_X64))

 unsigned int  OPENSSL_ia32cap_P[2];
 unsigned long *OPENSSL_ia32cap_loc(void)

@needforspeed
Copy link

Got a new error: undefined reference to `cleanse_ctr'

  touch /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/v8.stamp
  arm-unknown-linux-gnueabi-g++ -pthread -rdynamic  -o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/openssl-cli -Wl,--start-group /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/app_rand.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/apps.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/asn1pars.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ca.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ciphers.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/cms.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/crl.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/crl2p7.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dgst.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dh.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dhparam.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dsa.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/dsaparam.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ec.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ecparam.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/enc.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/engine.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/errstr.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/gendh.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/gendsa.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/genpkey.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/genrsa.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/nseq.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ocsp.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/openssl.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/passwd.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkcs12.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkcs7.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkcs8.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkey.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkeyparam.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/pkeyutl.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/prime.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/rand.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/req.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/rsa.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/rsautl.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_cb.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_client.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_server.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_socket.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_time.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/sess_id.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/smime.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/speed.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/spkac.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/srp.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/ts.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/verify.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/version.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/x509.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a -Wl,--end-group -ldl
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a(mem.o): In function `CRYPTO_malloc_locked':
mem.c:(.text+0x518): undefined reference to `cleanse_ctr'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/openssl/libopenssl.a(mem.o): In function `CRYPTO_malloc':
mem.c:(.text+0x638): undefined reference to `cleanse_ctr'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/openssl-cli] Error 1
make[1]: Leaving directory `/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out'
make: *** [node] Error 2

@indutny
Copy link
Member

indutny commented Aug 11, 2014

Ok, new diff:

diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp
index b3ae004..cc4a425 100644
--- a/deps/openssl/openssl.gyp
+++ b/deps/openssl/openssl.gyp
@@ -939,7 +939,10 @@
           ],
         }],
         ['target_arch=="arm"', {
-          'sources': ['openssl/crypto/armcap.c'],
+          'sources': [
+            'openssl/crypto/armcap.c',
+            'openssl/crypto/armv4cpuid.S',
+          ],
         }],
       ],
       'include_dirs': [
diff --git a/deps/openssl/openssl/crypto/cryptlib.c b/deps/openssl/openssl/crypto/cryptlib.c
index 0b77d8b..d16986d 100644
--- a/deps/openssl/openssl/crypto/cryptlib.c
+++ b/deps/openssl/openssl/crypto/cryptlib.c
@@ -661,9 +661,11 @@ const char *CRYPTO_get_lock_name(int type)
        return(sk_OPENSSL_STRING_value(app_locks,type-CRYPTO_NUM_LOCKS));
    }

-#if    defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
+#if    !defined(_ARM_ARCH__) && \
+   (defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
    defined(__INTEL__) || \
-   defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
+   defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
+   defined(_M_X64))

 unsigned int  OPENSSL_ia32cap_P[2];
 unsigned long *OPENSSL_ia32cap_loc(void)
diff --git a/deps/openssl/openssl/crypto/mem_clr.c b/deps/openssl/openssl/crypto/mem_clr.c
index add1f78..bfb9c64 100644
--- a/deps/openssl/openssl/crypto/mem_clr.c
+++ b/deps/openssl/openssl/crypto/mem_clr.c
@@ -61,6 +61,8 @@

 unsigned char cleanse_ctr = 0;

+#if    !defined(_ARM_ARCH__)
+
 void OPENSSL_cleanse(void *ptr, size_t len)
    {
    unsigned char *p = ptr;
@@ -75,3 +77,4 @@ void OPENSSL_cleanse(void *ptr, size_t len)
        ctr += (63 + (size_t)p);
    cleanse_ctr = (unsigned char)ctr;
    }
+#endif

@needforspeed
Copy link

@indutny

multiple definition of `OPENSSL_cpuid_setup' error comes back again.

  arm-unknown-linux-gnueabi-g++ '-DNODE_WANT_INTERNALS=1' '-DARCH="arm"' '-DPLATFORM="linux"' '-DNODE_TAG=""' '-DHAVE_OPENSSL=1' '-D__POSIX__' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_POSIX_C_SOURCE=20
0112' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj/gen -I../deps/openssl/openssl/include -I../deps/v8/include -I../deps/zlib -I../de
ps/http_parser -I../deps/cares/include -I../deps/uv/include  -Wall -Wextra -Wno-unused-parameter -pthread -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/y
zhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/.deps//home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o.d.raw -march=armv5t -mno-unaligned-access -c -o /home/
yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o ../src/node_crypto.cc
  arm-unknown-linux-gnueabi-g++ -pthread -rdynamic -Wl,--whole-archive /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,--whole-archive /home/yzhang/arm/Nodej
s-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node -Wl,--start-group /home/yz
hang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/fs_event_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/cares_wrap.o /home/yzhang/arm/Nodejs-AR
M-builder/node-v0.10.30/out/Release/obj.target/node/src/handle_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/ou
t/Release/obj.target/node/src/node_buffer.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_constants.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.ta
rget/node/src/node_extensions.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_file.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/nod
e_http_parser.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_javascript.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_main.o /
home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_os.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_script.o /home/yzhang/arm/Nodejs-
ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_stat_watcher.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_string.o /home/yzhang/arm/Nodejs-ARM-builder/n
ode-v0.10.30/out/Release/obj.target/node/src/node_zlib.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/pipe_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Releas
e/obj.target/node/src/signal_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/string_bytes.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/
src/stream_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/slab_allocator.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/tcp_wrap.o /
home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/timer_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/tty_wrap.o /home/yzhang/arm/Nodejs-
ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/process_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/v8_typed_array.o /home/yzhang/arm/Nodejs-ARM-builder/nod
e-v0.10.30/out/Release/obj.target/node/src/udp_wrap.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/node/src/node_crypto.o /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release
/obj.target/deps/openssl/libopenssl.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/zlib/libchrome_zlib.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/
deps/http_parser/libhttp_parser.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/cares/libcares.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/uv/libuv.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a -Wl,--end-group -lm -ldl -lrt
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(cryptlib.o):cryptlib.c:(.text+0x4a4): first defined here
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(armv4cpuid.o): In function `OPENSSL_cleanse':
(.text+0x60): multiple definition of `OPENSSL_cleanse'
/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/libopenssl.a(mem_clr.o):mem_clr.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out/Release/node] Error 1
make[1]: Leaving directory `/home/yzhang/arm/Nodejs-ARM-builder/node-v0.10.30/out'
make: *** [node] Error 2

@indutny
Copy link
Member

indutny commented Aug 28, 2014

And a bt at that point?

@lutzbickhardt
Copy link

sorry for answering so late, there is no beep for incoming mail (and there will never be !)

Program received signal SIGSEGV, Segmentation fault.

0x00000000 in ?? ()

(gdb) disas _armv7_tick

Dump of assembler code for function _armv7_tick:

0x00235bc8 <+0>: mrc 15, 0, r0, cr9, cr13, {0}

0x00235bcc <+4>: bx lr

End of assembler dump.

(gdb) bt

#0 0x00000000 in ?? ()

#1 0x3060a15c in ?? ()

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

(gdb)?

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. L?opold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe ? Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoy? : jeudi 28 ao?t 2014 15:57
? : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

And a bt at that point?

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53722830.

@indutny
Copy link
Member

indutny commented Aug 28, 2014

No problem! What does disas 0x3060a15c say? (Sorry for lots of instructions, I just can't reproduce it on my pi).

@lutzbickhardt
Copy link

not sure at what point I shall do this. Here is what I did:

(gdb) run

Starting program: /usr/local/bin/node

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.

0x00235bc8 in _armv7_tick ()

(gdb) disas 0x3060a15c

No function contains specified address.

(gdb) bt

#0 0x00235bc8 in _armv7_tick ()

#1 0x0017684c in OPENSSL_cpuid_setup ()

#2 0x00444dfe in __libc_csu_init ()

#3 0xb6d815ee in __libc_start_main (main=0x176a59

, argc=1,

argv=0xbefff644, init=0x444dd1 <__libc_csu_init>,

fini=0x444e11 <__libc_csu_fini>, rtld_fini=0xb6fea4c5 <_dl_fini>,

stack_end=0xbefff644) at libc-start.c:246

#4 0x00176bfc in _start ()

(gdb) disas 0x3060a15c

No function contains specified address.

(gdb) disas _armv7_tick

Dump of assembler code for function _armv7_tick:

=> 0x00235bc8 <+0>: mrc 15, 0, r0, cr9, cr13, {0}

0x00235bcc <+4>: bx lr

End of assembler dump.

(gdb) disas 0x3060a15c

No function contains specified address.

(gdb)?

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. L?opold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe ? Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoy? : jeudi 28 ao?t 2014 19:16
? : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

No problem! What does disas 0x3060a15c say? (Sorry for lots of instructions, I just can't reproduce it on my pi).

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53758820.

@indutny
Copy link
Member

indutny commented Aug 28, 2014

@lutzbickhardt is there any way I could ssh to this machine and debug it a bit? :)

@lutzbickhardt
Copy link

?Sorry no, I have not (yet) DynDNSed my router. But I am happy to carry out your instructions. Please bear with me though, I have never used gdb before.

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. L?opold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe ? Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoy? : jeudi 28 ao?t 2014 21:11
? : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

@lutzbickhardthttps://github.com/lutzbickhardt is there any way I could ssh to this machine and debug it a bit? :)

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53780243.

@indutny
Copy link
Member

indutny commented Aug 28, 2014

@lutzbickhardt no problem, I was just afraid that there are too much instructions and you are probably tired of them :)

Could you please do following thing:

  1. Start gdb
  2. handle SIGILL nostop
  3. b OPENSSL_cpuid_setup
  4. r
  5. n
  6. Press enter until it will segfault (not SIGILL).

@lutzbickhardt
Copy link

here it is; I did not even have to do any ENTER, it segfaulted right after "n"

root@odroid:~# node

Segmentation fault

root@odroid:~# gdb --args node

GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "arm-linux-gnueabihf".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

http://www.gnu.org/software/gdb/bugs/.

Find the GDB manual and other documentation resources online at:

http://www.gnu.org/software/gdb/documentation/.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from node...done.

(gdb) handle SIGILL nostop

Signal Stop Print Pass to program Description

SIGILL No Yes Yes Illegal instruction

(gdb) b OPENSSL_cpuid_setup

Breakpoint 1 at 0x176778

(gdb) r

Starting program: /usr/local/bin/node

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Breakpoint 1, 0x00176778 in OPENSSL_cpuid_setup ()

(gdb) n

Single stepping until exit from function OPENSSL_cpuid_setup,

which has no line number information.

Program received signal SIGILL, Illegal instruction.

[New Thread 0xb6fde450 (LWP 2626)]

Program received signal SIGSEGV, Segmentation fault.

0x00000000 in ?? ()

(gdb)

?

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. L?opold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe ? Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoy? : jeudi 28 ao?t 2014 21:31
? : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

@lutzbickhardthttps://github.com/lutzbickhardt no problem, I was just afraid that there are too much instructions and you are probably tired of them :)

Could you please do following thing:

  1. Start gdb
  2. handle SIGILL nostop
  3. b OPENSSL_cpuid_setup
  4. r
  5. n
  6. Press enter until it will segfault (not SIGILL).

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53782964.

@indutny
Copy link
Member

indutny commented Aug 28, 2014

Oh gosh... Could you please do a debug build: BUILDTYPE=Debug make -C out/? And try it with ./out/Debug/node instead of just node ?

@JohnNavratil
Copy link

idutny,

I would be happy to set my pi up for you to ssh in, if you like. If have 10.31 downloaded and mostly made. Email me at john(dot)navratil@sbcglobal(dot)net if I can help.

@indutny
Copy link
Member

indutny commented Aug 28, 2014

@JohnNavratil hm... does it segfault for you on your pi? It doesn't seem to on mine.

@JohnNavratil
Copy link

I'm still at the point where compilation fails and have not made any of the patches this thread proposes.

@lutzbickhardt
Copy link

it started like that, may take some time:

root@odroid:~# cd node

root@odroid:~/node# BUILDTYPE=Debug make -C out

make: Entering directory `/root/node/out'

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_cancel.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares__close_sockets.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_data.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_destroy.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_expand_name.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_expand_string.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_fds.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_free_hostent.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_free_string.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_gethostbyaddr.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_gethostbyname.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares__get_hostent.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_getnameinfo.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_getopt.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_getsock.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_init.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_library_init.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_llist.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_mkquery.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_nowarn.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_options.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_aaaa_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_a_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_mx_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_naptr_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_ns_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_ptr_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_soa_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_srv_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_parse_txt_reply.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_process.o

../deps/cares/src/ares_process.c: In function ‘read_udp_packets’:

../deps/cares/src/ares_process.c:481:35: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness [-Wpointer-sign]

                               0, &from.sa, &fromlen);

                               ^

In file included from ../deps/cares/src/ares_process.c:21:0:

/usr/include/arm-linux-gnueabihf/sys/socket.h:174:16: note: expected ‘socklen_t * restrict’ but argument is of type ‘ares_socklen_t *’

extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,

            ^

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_query.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares__read_line.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_search.o

CC(target) /root/node/out/Debug/obj.target/cares/deps/cares/src/ares_send.o

CC(target) /root​

....

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. Léopold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe à Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoyé : jeudi 28 août 2014 21:48
À : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

Oh gosh... Could you please do a debug build: BUILDTYPE=Debug make -C out/? And try it with ./out/Debug/node instead of just node ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53785590.

@lutzbickhardt
Copy link

and it fails like this:

...

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/arm/lithium-codegen-arm.o

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/arm/lithium-gap-resolver-arm.o

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/arm/macro-assembler-arm.o

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/arm/regexp-macro-assembler-arm.o

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/arm/simulator-arm.o

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/arm/stub-cache-arm.o

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/platform-linux.o

CXX(target) /root/node/out/Debug/obj.target/v8_base/deps/v8/src/platform-posix.o

ACTION _root_node_deps_v8_tools_gyp_v8_gyp_postmortem_metadata_target_gen_postmortem_metadata /root/node/out/Debug/obj/gen/debug-support.cc

CXX(target) /root/node/out/Debug/obj.target/v8_base/gen/debug-support.o

AR(target) /root/node/out/Debug/obj.target/deps/v8/tools/gyp/libv8_base.a

COPY /root/node/out/Debug/libv8_base.a

CXX(target) /root/node/out/Debug/obj.target/v8_nosnapshot/gen/libraries.o

CXX(target) /root/node/out/Debug/obj.target/v8_nosnapshot/gen/experimental-libraries.o

CXX(target) /root/node/out/Debug/obj.target/v8_nosnapshot/deps/v8/src/snapshot-empty.o

AR(target) /root/node/out/Debug/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a

COPY /root/node/out/Debug/libv8_nosnapshot.a

CXX(target) /root/node/out/Debug/obj.target/mksnapshot/deps/v8/src/mksnapshot.o

LINK(target) /root/node/out/Debug/mksnapshot

LINK(target) /root/node/out/Debug/mksnapshot: Finished

ACTION _root_node_deps_v8_tools_gyp_v8_gyp_v8_snapshot_target_run_mksnapshot /root/node/out/Debug/obj.target/v8_snapshot/geni/snapshot.cc

Fatal error in ../deps/v8/src/serialize.cc, line 542

CHECK(key == __null || index >= 0) failed

Trace/breakpoint trap

make: *** [/root/node/out/Debug/obj.target/v8_snapshot/geni/snapshot.cc] Error 133

make: Leaving directory `/root/node/out'

root@odroid:~/node#

?

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. L?opold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe ? Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoy? : jeudi 28 ao?t 2014 21:48
? : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

Oh gosh... Could you please do a debug build: BUILDTYPE=Debug make -C out/? And try it with ./out/Debug/node instead of just node ?

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53785590.

@indutny
Copy link
Member

indutny commented Aug 28, 2014

Ok, this is much more informative now, thank you!

@indutny
Copy link
Member

indutny commented Aug 29, 2014

@lutzbickhardt sorry, but I still need to see a bt output from that v8 assertion... Would you please mind trying to update it from gdb and paste here?

@lutzbickhardt
Copy link

How would I do that? The linker falls back to command line level!

Trace/breakpoint trap

make: *** [/root/node/out/Debug/obj.target/v8_snapshot/geni/snapshot.cc] Error 133

make: Leaving directory `/root/node/out'

root@odroid:~/node# bt

-bash: bt: command not found

root@odroid:~/node#?

Or do you mean like that?

root@odroid:~/node# gdb --args node

GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "arm-linux-gnueabihf".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

http://www.gnu.org/software/gdb/bugs/.

Find the GDB manual and other documentation resources online at:

http://www.gnu.org/software/gdb/documentation/.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from node...done.

(gdb) run

Starting program: /root/node/node

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.

0x00235bc8 in _armv7_tick ()

(gdb) bt

#0 0x00235bc8 in _armv7_tick ()

#1 0x0017684c in OPENSSL_cpuid_setup ()

#2 0x00444dfe in __libc_csu_init ()

#3 0xb6d815ee in __libc_start_main (main=0x176a59

, argc=1, argv=0xbefff644, init=0x444dd1 <__libc_csu_init>, fini=0x444e11 <__libc_csu_fini>,

rtld_fini=0xb6fea4c5 <_dl_fini>, stack_end=0xbefff644) at libc-start.c:246

#4 0x00176bfc in _start ()

(gdb)

Fedor, where do you live? You are awake all the time?

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. L?opold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe ? Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoy? : vendredi 29 ao?t 2014 10:58
? : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

@lutzbickhardthttps://github.com/lutzbickhardt sorry, but I still need to see a bt output from that v8 assertion... Would you please mind trying to update it from gdb and paste here?

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53852489.

@indutny
Copy link
Member

indutny commented Aug 29, 2014

  1. gdb --args ./out/Debug/node
  2. c until SEGFAULT (not SIGILL)
  3. bt

@lutzbickhardt
Copy link

I have no idea what you are doing, but this is what I got (sort of expected):

root@odroid:~/node# gdb --args ./out/Debug/node

GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "arm-linux-gnueabihf".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

http://www.gnu.org/software/gdb/bugs/.

Find the GDB manual and other documentation resources online at:

http://www.gnu.org/software/gdb/documentation/.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

./out/Debug/node: No such file or directory.?

Cordialement


Lutz BICKHARDT
[email protected]

23/25, av. L?opold II, F-75016 Paris, France
Graumannsweg 42, D-22087 Hamburg, Germany

SKYPE: bickhardt
+33 9 60405114 (telephone fixe ? Paris)
+33 6 18386906 (portable francais/ French cell phone)
+49 40 22758122 (Festnetz in Hamburg)
+49 172 3846086 (deutsches Handy / German cell phone)


De : Fedor Indutny [email protected]
Envoy? : vendredi 29 ao?t 2014 13:05
? : joyent/node
Cc : Bickhardt, Lutz
Objet : Re: [node] Error compiling v0.10.30 on Raspberry Pi Model B (#8062)

  1. gdb --args ./out/Debug/node
  2. c until SEGFAULT (not SIGILL)
  3. bt

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-53862910.

@indutny
Copy link
Member

indutny commented Aug 29, 2014

Aaaah, sorry. I just realized that it has failed during build... oh gosh...

indutny added a commit to indutny/node that referenced this issue Sep 2, 2014
@indutny
Copy link
Member

indutny commented Sep 2, 2014

@lutzbickhardt I'm sorry to say this, but I have failed to find any solution that would fix the issue for you. The only thing that I could do for you is #8304 . Could you please try building node.js with this patch, but configuring it with --openssl-no-asm?

@lutzbickhardt
Copy link

Thanks for the effort...

hmmm; same thing (see below). What did I do wrong?

root@odroid:~/node# make clean

rm -rf out/Makefile node node_g out/Release/node blog.html email.md

find out/ -name '.o' -o -name '.a' | xargs rm -rf

rm -rf node_modules

root@odroid:~/node# ./configure --openssl-no-asm

{ 'target_defaults': { 'cflags': [],

                   'default_configuration': 'Release',

                   'defines': [],

                   'include_dirs': [],

                   'libraries': []},

'variables': { 'arm_fpu': 'vfpv3',

             'arm_neon': 0,

             'armv7': 1,

             'clang': 0,

             'gcc_version': 48,

             'host_arch': 'arm',

             'node_install_npm': 'true',

             'node_prefix': '',

             'node_shared_cares': 'false',

             'node_shared_http_parser': 'false',

             'node_shared_libuv': 'false',

             'node_shared_openssl': 'false',

             'node_shared_v8': 'false',

             'node_shared_zlib': 'false',

             'node_tag': '',

             'node_unsafe_optimizations': 0,

             'node_use_dtrace': 'false',

             'node_use_etw': 'false',

             'node_use_openssl': 'true',

             'node_use_perfctr': 'false',

             'node_use_systemtap': 'false',

             'openssl_no_asm': 1,

             'python': '/usr/bin/python',

             'target_arch': 'arm',

             'v8_enable_gdbjit': 0,

             'v8_no_strict_aliasing': 1,

             'v8_use_arm_eabi_hardfloat': 'true',

             'v8_use_snapshot': 'true',

             'want_separate_host_toolset': 0}}

creating ./config.gypi

creating ./config.mk

root@odroid:~/node# make

make -C out BUILDTYPE=Release V=1

make[1]: Entering directory `/root/node/out'

cc '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DHAVE_CONFIG_H' '-DCARES_STATICLIB' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/linux -Wall -Wextra -Wno-unused-parameter -pthread -g --std=gnu89 -pedantic -Wall -Wextra -Wno-unused-parameter -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -MMD -MF /root/node/out/Release/.deps//root/node/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o.d.raw -c -o /root/node/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o ../deps/cares/src/ares_cancel.c

....

ps/openssl/libopenssl.a /root/node/out/Release/obj.target/deps/zlib/libchrome_zlib.a /root/node/out/Release/obj.target/deps/http_parser/libhttp_parser.a /root/node/out/Release/obj.target/deps/cares/libcares.a /root/node/out/Release/obj.target/deps/uv/libuv.a /root/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /root/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_snapshot.a -Wl,--end-group -lm -ldl -lrt

LINK(target) /root/node/out/Release/node: Finished

make[1]: Leaving directory `/root/node/out'

ln -fs out/Release/node node

root@odroid:~/node# sudo make install

make -C out BUILDTYPE=Release V=1

make[1]: Entering directory `/root/node/out'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/root/node/out'

ln -fs out/Release/node node

/usr/bin/python tools/install.py install

installing /usr/local/bin/node

...

installing /usr/local/include/node/v8.h

installing /usr/local/include/node/zconf.h

installing /usr/local/include/node/zlib.h

root@odroid:~/node# node

Segmentation fault

root@odroid:~/node# gdb --args node

GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "arm-linux-gnueabihf".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

http://www.gnu.org/software/gdb/bugs/.

Find the GDB manual and other documentation resources online at:

http://www.gnu.org/software/gdb/documentation/.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from node...done.

(gdb) run

Starting program: /root/node/node

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

[New Thread 0xb6fde450 (LWP 4053)]

Program received signal SIGSEGV, Segmentation fault.

0x00000000 in ?? ()

(gdb) bt

#0 0x00000000 in ?? ()

#1 0x47b0a15c in ?? ()

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

(gdb)

?

Reply to this email directly or view it on GitHubhttps://github.com//issues/8062#issuecomment-54142268.

@indutny
Copy link
Member

indutny commented Sep 2, 2014

Hm... I have no idea! :) But I think it is unrelated to OpenSSL changes. May be @TooTallNate has some ideas?

indutny added a commit that referenced this issue Sep 3, 2014
@blunden
Copy link

blunden commented Sep 25, 2014

@indutny So which of the branches of node on your github contains most of these fixes? There are so many it's hard to keep track of them. :)

@indutny
Copy link
Member

indutny commented Sep 25, 2014

I think all of them has landed into v0.10 branch of joyent/node

mscdex pushed a commit to mscdex/node that referenced this issue Dec 25, 2014
mscdex pushed a commit to mscdex/node that referenced this issue Dec 25, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests