This repository has been archived by the owner. It is now read-only.

openssl not compiling properly on ARMV6 (Raspberry Pi) #3685

Closed
gflarity opened this Issue Jul 10, 2012 · 9 comments

Comments

Projects
None yet
2 participants

I tried to get Node building on the Raspberry Pi by following the instructions laid out in:
http://www.raspberrypi.org/phpBB3//viewtopic.php?f=34&t=9929

Note this works in v0.6.x which I believe just links to the locally installed openssl libraries. On v0.8.x everything builds (eventually) but if you try to use npm to install something you get:

npm ERR! Error: 1074237440:error:1408D108:SSL routines:SSL3_GET_KEY_EXCHANGE:wrong signature length:../deps/openssl/openssl/ssl/s3_clnt.c:1617:
npm ERR! 
npm ERR!     at CleartextStream._puller (tls.js:519:24)
npm ERR!     at CleartextStream.CryptoStream._pull (tls.js:453:19)
npm ERR!     at SecurePair.cycle (tls.js:743:20)
npm ERR!     at EncryptedStream.CryptoStream.write (tls.js:131:13)
npm ERR!     at Socket.ondata (stream.js:38:26)
npm ERR!     at Socket.EventEmitter.emit (events.js:88:17)
npm ERR!     at TCP.onread (net.js:397:14)
npm ERR!  [Error: 1074237440:error:1408D108:SSL routines:SSL3_GET_KEY_EXCHANGE:wrong signature length:../deps/openssl/openssl/ssl/s3_clnt.c:1617:
Member

bnoordhuis commented Jul 10, 2012

Does it work when you link to the system openssl libraries? ./configure --help | grep openssl prints the relevant configure options.

I was configuring like so:
./configure --openssl-libpath=/usr/lib/ssl

But I see now that the config param has changed, or the instructions are just wrong.

I'm rebuilding now, looks like openssl isn't being compiled anymore but I won't know for sure until it's done compiling.

Confirmed, it's working now. I've put up new instructions and a patch here:

https://github.com/gflarity/node_pi

Member

bnoordhuis commented Jul 11, 2012

Okay, good. Does the bundled openssl work when you run configure without any switches?

The error above is the result of compiling the openssl included under /deps. I believe the error has to do with the bundled openssl not being compiled properly.

I think the command I used before './configure --openssl-libpath=/usr/lib/ssl' is essentially the same as running configure by itself. I saw openssl compile from deps.

Does this help?

Member

bnoordhuis commented Jul 11, 2012

You probably built a franken-binary. --openssl-libpath is deprecated and doesn't show anymore in ./configure --help but it still works.

I suspect that your binary was compiled against the bundled openssl but linked against the system openssl. If they're different versions, things won't work well.

Ya, this sounds about right.

Is there any advantage to using the openssl that comes bundled with node? Using the pre-compiled debian version saves over 30 minutes of compile time.

Member

bnoordhuis commented Jul 11, 2012

If your distro is anything like the debian distros that are installed on my ARM devices, then you'll have a pretty outdated version of openssl. You won't get nice things like NPN (what you need for SPDY) but, more importantly, you won't profit from the memory savings that recent versions of openssl allow.

@bnoordhuis bnoordhuis closed this Jul 11, 2012

Thanks for your help. I'm going to try to compile using the bundled dependency, see if I can get it working.

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