ruby-191-p243 or ruby-192-preview Compile error with openssl

Discussion in 'Ruby' started by Philippe Philos, Nov 3, 2009.

  1. Hi,

    Fails to compile openssl extension for ruby-187 latest, ruby-191-p243
    and ruby-192-preview with this environnement :

    uname : Linux 2.6.26.8-57.fc8 #1 SMP ... i686 i686 i386 GNU/Linux
    openssl : OpenSSL 1.0.0-beta4-dev. The latest version
    gcc : gcc 4.1.2 20070925 (Red Hat 4.1.2-33)

    For ruby-191 and ruby-191, i have the following errors messages :

    gcc -I. -I../../.ext/include/i686-linux -I../../../include
    -I../../../ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\"
    -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses -fPIC -o
    ossl_pkcs7.o -c ../../../ext/openssl/ossl_pkcs7.c
    ../../../ext/openssl/ossl_pkcs7.c:575:
    error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’
    token


    Of course, it works fine if i use olders versions of openssl (0.9*)

    regards
    --
    Posted via http://www.ruby-forum.com/.
     
    Philippe Philos, Nov 3, 2009
    #1
    1. Advertising

  2. Philippe Philos

    Peter Havens Guest

    On Nov 3, 2:21 pm, Philippe Philos <> wrote:
    >
    > Fails to compile openssl extension for ruby-187 latest...


    I'm also having this problem. I'm trying to use gcc 4.2.2 to compile
    Ruby
    1.8.7-p174 on Fedora 12 Linux which includes OpenSSL 1.0.0 beta4. Here
    is the
    ouput of my attempt:

    ../configure && make
    [snip]
    compiling openssl
    make[1]: Entering directory `/usr/local/src/ruby/ruby-1.8.7-p174/ext/
    openssl'
    gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=
    \"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c
    ossl_pkey_rsa.c
    gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=
    \"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c ossl_bio.c
    gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=
    \"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c
    ossl_ns_spki.c
    ossl_ns_spki.c: In function ‘ossl_spki_initialize’:
    ossl_ns_spki.c:67: warning: passing argument 2 of ‘d2i_NETSCAPE_SPKI’
    from incompatible pointer type
    /usr/include/openssl/x509.h:843: note: expected ‘const unsigned char
    **’ but argument is of type ‘unsigned char **’
    gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=
    \"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c
    ossl_x509req.c
    gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=
    \"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c ossl_ssl.c
    ossl_ssl.c:101: warning: initialization from incompatible pointer type
    ossl_ssl.c:102: warning: initialization from incompatible pointer type
    ossl_ssl.c:103: warning: initialization from incompatible pointer type
    ossl_ssl.c:104: warning: initialization from incompatible pointer type
    ossl_ssl.c:105: warning: initialization from incompatible pointer type
    ossl_ssl.c:106: warning: initialization from incompatible pointer type
    ossl_ssl.c:107: warning: initialization from incompatible pointer type
    ossl_ssl.c:108: warning: initialization from incompatible pointer type
    ossl_ssl.c:109: warning: initialization from incompatible pointer type
    ossl_ssl.c:110: warning: initialization from incompatible pointer type
    ossl_ssl.c:111: warning: initialization from incompatible pointer type
    ossl_ssl.c:112: warning: initialization from incompatible pointer type
    ossl_ssl.c: In function ‘ossl_sslctx_get_ciphers’:
    ossl_ssl.c:626: error: ‘STACK’ undeclared (first use in this function)
    ossl_ssl.c:626: error: (Each undeclared identifier is reported only
    once
    ossl_ssl.c:626: error: for each function it appears in.)
    ossl_ssl.c:626: error: expected expression before ‘)’ token
    ossl_ssl.c:629: error: expected expression before ‘)’ token
    ossl_ssl.c:629: error: too few arguments to function ‘sk_value’
    ossl_ssl.c: In function ‘ossl_ssl_get_peer_cert_chain’:
    ossl_ssl.c:1199: warning: passing argument 1 of ‘sk_num’ from
    incompatible pointer type
    /usr/include/openssl/stack.h:79: note: expected ‘const struct _STACK
    *’ but argument is of type ‘struct stack_st_X509 *’
    ossl_ssl.c:1202: warning: passing argument 1 of ‘sk_value’ from
    incompatible pointer type
    /usr/include/openssl/stack.h:80: note: expected ‘const struct _STACK
    *’ but argument is of type ‘struct stack_st_X509 *’
    ossl_ssl.c: In function ‘ossl_ssl_get_cipher’:
    ossl_ssl.c:1224: warning: assignment discards qualifiers from pointer
    target type
    make[1]: *** [ossl_ssl.o] Error 1
    make[1]: Leaving directory `/usr/local/src/ruby/ruby-1.8.7-p174/ext/
    openssl'
    make: *** [all] Error 1

    --
    Pete
     
    Peter Havens, Nov 25, 2009
    #2
    1. Advertising

  3. Philippe Philos

    Peter Havens Guest

    On Nov 25, 10:03 am, Peter Havens <> wrote:
    > On Nov 3, 2:21 pm, Philippe Philos <> wrote:
    >
    > ...
    > ossl_ssl.c: In function ‘ossl_sslctx_get_ciphers’:
    > ossl_ssl.c:626: error: ‘STACK’ undeclared (first use in this function)
    > ...


    I should note that I've attempted to replace "STACK" with "_STACK" (a
    quick
    hackish attempt at making this work after looking at some OpenSSL
    headers),
    but that just resulted in different errors.

    --
    Pete
     
    Peter Havens, Nov 25, 2009
    #3
  4. Philippe Philos

    Kannav R. Guest

    Run these:

    rvm package install openssl
    rvm install 1.8.7-p174 -C --with-openssl-dir=$HOME/.rvm/usr



    Cheers :)

    --
    Posted via http://www.ruby-forum.com/.
     
    Kannav R., Nov 11, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    481
  2. Redd Vinylene
    Replies:
    6
    Views:
    306
    Jakub Pawlowicz
    Nov 18, 2008
  3. Daniel Moore
    Replies:
    10
    Views:
    297
    Lars Haugseth
    Feb 17, 2009
  4. Yugui (Yuki Sonoda)
    Replies:
    8
    Views:
    135
    Roger Pack
    Aug 3, 2009
  5. Richard Lee
    Replies:
    0
    Views:
    75
    Richard Lee
    Oct 27, 2009
Loading...

Share This Page