yet more node.js + openssl issues

73 views
Skip to first unread message

davin

unread,
Aug 26, 2010, 12:31:53 PM8/26/10
to nodejs
when including a module that has a crypto dependancy i realised that
my nodejs wasnt compiled with openssl support. which is funny
considering that i have openssl (0.9.8g). i read some threads about
the ./configure reporting false negatives, although my symptoms seem
different, what with the error report on the bottom.

i would be glad for some enlightenment... thanks guys!

oh, and im running ubuntu 9.04

davin@ubuntu:/etc/nodejs/ry-node-51224f1$ sudo ./configure
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for library dl : yes
Checking for library execinfo : not found
Checking for openssl : not found
Checking for function SSL_library_init : not found
Checking for header openssl/crypto.h : not found
Checking for library rt : yes
--- libeio ---
Checking for library pthread : yes
Checking for function pthread_create : yes
Checking for function pthread_atfork : yes
Checking for futimes(2) : yes
Checking for readahead(2) : yes
Checking for fdatasync(2) : yes
Checking for pread(2) and pwrite(2) : yes
Checking for sendfile(2) : yes
Checking for sync_file_range(2) : yes
--- libev ---
Checking for header sys/inotify.h : yes
Checking for function inotify_init : yes
Checking for header sys/epoll.h : yes
Checking for function epoll_ctl : yes
Checking for header port.h : not found
Checking for header poll.h : yes
Checking for function poll : yes
Checking for header sys/event.h : not found
Checking for header sys/queue.h : yes
Checking for function kqueue : not found
Checking for header sys/select.h : yes
Checking for function select : yes
Checking for header sys/eventfd.h : yes
Checking for function eventfd : yes
Checking for SYS_clock_gettime : yes
Checking for library rt : yes
Checking for function clock_gettime : yes
Checking for function nanosleep : yes
Checking for function ceil : yes
Checking for fdatasync(2) with c++ : yes
'configure' finished successfully (4.350s)
Traceback (most recent call last):
File "/etc/nodejs/ry-node-51224f1/tools/waf-light", line 158, in
<module>
Scripting.prepare(t, cwd, VERSION, wafdir)
File "/etc/nodejs/ry-node-51224f1/tools/wafadmin/Scripting.py", line
145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/etc/nodejs/ry-node-51224f1/tools/wafadmin/Scripting.py", line
135, in prepare_impl
main()
File "/etc/nodejs/ry-node-51224f1/tools/wafadmin/Scripting.py", line
186, in main
fun()
File "/etc/nodejs/ry-node-51224f1/wscript", line 574, in shutdown
if not Options.options.use_openssl:
AttributeError: Values instance has no attribute 'use_openssl'

mscdex

unread,
Aug 26, 2010, 4:09:47 PM8/26/10
to nodejs
Have you also installed libssl-dev?

davin

unread,
Aug 27, 2010, 7:12:37 AM8/27/10
to nodejs
indeed, i hadnt.
fixed.

cheers!


On Aug 26, 11:09 pm, mscdex <msc...@gmail.com> wrote:
> Have you also installed libssl-dev?

Gunnlaugur Briem

unread,
Sep 5, 2010, 10:16:11 AM9/5/10
to nodejs
For others: if that doesn't do it for you, you may also be missing pkg-
config --- the configure script uses that to check for openssl.

- Gulli

mscdex

unread,
Sep 5, 2010, 1:12:54 PM9/5/10
to nodejs
On Sep 5, 10:16 am, Gunnlaugur Briem <gunnlau...@gmail.com> wrote:
> For others: if that doesn't do it for you, you may also be missing pkg-
> config --- the configure script uses that to check for openssl.

You don't need pkg-config as long as you have the openssl development
headers installed (properly).

Gunnlaugur Briem

unread,
Sep 6, 2010, 5:53:57 AM9/6/10
to nodejs
On Sep 5, 5:12 pm, mscdex <msc...@gmail.com> wrote:
> You don't need pkg-config as long as you have the openssl development
> headers installed (properly).

Hm ... I have openssl and libssl-dev up-to-date on Debian stable.

Just now removed pkg-config and tried configure. It says openssl is
not found, and build/config.log says:

Checking for openssl
pkg-config --errors-to-stdout --print-errors --cflags --libs openssl
/bin/sh: pkg-config: command not found
not found

If you're still sure this is about openssl development headers and not
pkg-config, could you explain, or point somewhere that explains?

Thanks,

- Gulli

mscdex

unread,
Sep 6, 2010, 11:54:18 AM9/6/10
to nodejs
The wscript that comes with node does several checks for determining
openssl support. One of them is through pkg-config. If it doesn't find
pkg-config or openssl headers installed under pkg-config, it then
checks manually for the header files in the usual/expected paths.

Gabriel Farrell

unread,
Sep 13, 2010, 12:55:58 AM9/13/10
to nod...@googlegroups.com
Confirmed on Ubuntu Lucid that openssl is not found with libssl-dev
installed but not pkg-config.

> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>

mscdex

unread,
Sep 13, 2010, 2:21:14 AM9/13/10
to nodejs
On Sep 13, 12:55 am, Gabriel Farrell <gsf...@gmail.com> wrote:
> Confirmed on Ubuntu Lucid that openssl is not found with libssl-dev
> installed but not pkg-config.

I suspect there's something fishy going on then. I have libssl-dev
installed and pkg-config not installed on an Ubuntu lucid server
machine and it compiles and packages node with SSL support just fine.

FWIW this is the output I get on the aforementioned machine during ./
configure:
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : not found
Checking for function SSL_library_init : yes
Checking for header openssl/crypto.h : yes
Checking for library rt : yes

Not sure why you're having a problem unless the development headers
are somehow being installed to a directory other than one of the
expected locations that node's wscript looks in.

MilesTogoe

unread,
Sep 13, 2010, 1:37:37 PM9/13/10
to nod...@googlegroups.com
On 09/12/2010 11:21 PM, mscdex wrote:
> On Sep 13, 12:55 am, Gabriel Farrell<gsf...@gmail.com> wrote:
>> Confirmed on Ubuntu Lucid that openssl is not found with libssl-dev
>> installed but not pkg-config.
> I suspect there's something fishy going on then. I have libssl-dev
> installed and pkg-config not installed on an Ubuntu lucid server
> machine and it compiles and packages node with SSL support just fine.

yes, we found that libssl-dev was not installed with openssl - we had to
apt-get it - then node compiled fine.

Gabriel Farrell

unread,
Sep 13, 2010, 4:25:21 PM9/13/10
to nod...@googlegroups.com
Now I see. The "Checking for openssl" line is the pkg_config check,
and the two following are the manual checks. So even though
./configure says openssl is not found node will still compile with
crypto. Thanks for clarifying.

Franck Bret

unread,
Sep 20, 2010, 6:49:46 PM9/20/10
to nodejs
On centos 5.3 you will need to install openssl-devel in place of
debian libssl-dev package :
yum install gcc-c++
yum install openssl-devel
Reply all
Reply to author
Forward
0 new messages