On 4/6/2012 4:50 PM, Ben Noordhuis wrote:
On Fri, Apr 6, 2012 at 23:03, Tim Schumacher<[email protected]>  wrote:
Hi,
I am using fedora linux and I am trying to compile node with openssl.
The build process will not recognize my openssl even after trying to
tweak the install scripts a little bit.  I am using gcc-4.6.3.  It
seems to work if I configure without ssl, but I was hoping to make
this work with ssl.  Here is what I did, it seems pretty standard to
me, so maybe someone out there already figured this out:

I downloaded openssl-1.0.1 and did configure --prefix=/usr/local/
openssl-1.0.1, make, make install and verified everything is installed
properly at /usr/local/openssl-1.0.1.  includes and libs are all
there.

Next, I tried to configure node with
configure --prefix=/usr/local/node-0.6.14 --openssl-includes=/usr/
local/openssl-1.0.1/include --openssl-libpath=/usr/local/openssl-1.0.1/
lib

which fails with the message

Checking for function SSL_library_init   : not found
Checking for header openssl/crypto.h     : yes
/home/schumact/Download/node-v0.6.14/wscript:378: error: Could not
autodetect OpenSSL support. Make sure OpenSSL development packages are
installed. Use configure --without-ssl to disable this message.

Does anyone know where to look to fix this?  Or better yet, how to add
an option to configure --with-ssl=/my/ssl/location and have the
configure scripts find the include and lib?
Can you post the output of `./configure -vv` and `ls -lR
/usr/local/openssl-1.0.1`?


Thanks, I think I got it worked out.

The problem was I did not build a shared version of openssl, so while it found headers, it failed the dynamic link test.

I reconfigured openssl to also build the shared library so the configure passes. Then because I did not want to dynamically link openssl, I ended up modifying the final build command to produce the node executable and changed the tokens "-lssl -lcrypto" to "/usr/local/openssl-1.0.1/lib/libssl.a /usr/local/openssl-1.0.1/lib/libcrypto.a" and then verified with ``ldd'' that the node executable does not depend on libssl or libcrypto. I also replaced -lz with the path to the static version of libz to accomplish the same thing with libz.

Thanks!
Tim

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

Reply via email to