views:

41

answers:

2

I'm trying to install Ruby 1.9 from source, and I can't seem to get it to figure out where the OpenSSL headers and libraries are located. ruby-1.9.2/ext/openssl/extconf.rb says it can't find openssl/ssl.h -- which I've very definitely installed in ~/.local/include (the corresponding OpenSSL library is in ~/.local/lib).

How can I tell Ruby where to look for C libraries and headers when compiling?

EDIT: fixed it, --with-openssl-dir=/home/<user>/.local/ was what I needed.

A: 

Did you try -I ?

Tass
`-I` tells ruby where to look for ruby libraries. I need to pass `-I` through to gcc somehow...
Doches
A: 

Export CFLAGS with -I:

export CFLAGS="-I~/.local/include"

I'm not sure if ~ expansion will be done. If not, try using absolute paths:

export CFLAGS="-I/home/user/.local/include"
Lekensteyn
No luck. I've tried that already (also setting CPATH and C_INCLUDE_PATH). Thanks, though.
Doches