Compiling Ruby on OSX, OpenSSL error and possible fix

Discussion in 'Ruby' started by Juan Matias, Jan 21, 2009.

  1. Juan Matias

    Juan Matias Guest

    I got this error compiling Ruby (ruby-1.8.6-p287) on OSX (10.5.6, Darwin
    Kernel Version 9.6.0):

    openssl_missing.h:123: error: conflicting types for 'BN_rand_range'
    /usr/local/include/openssl/bn.h:411: error: previous declaration of
    'BN_rand_range' was here
    openssl_missing.h:124: error: conflicting types for
    'BN_pseudo_rand_range'
    /usr/local/include/openssl/bn.h:412: error: previous declaration of
    'BN_pseudo_rand_range' was here
    make[1]: *** [openssl_missing.o] Error 1

    These functions were declared in two different files. Once in
    include/openssl/bn.h and again in
    ruby-1.8.6-p287/ext/openssl/openssl_missing.h

    I solved it commenting these two lines in include/openssl/bn.h[411,412].
    --
    Posted via http://www.ruby-forum.com/.
     
    Juan Matias, Jan 21, 2009
    #1
    1. Advertising

  2. Juan Matias

    Juan Matias Guest

    Late, running Gem I got this error:

    $ gem update
    dyld: NSLinkModule() error
    dyld: Symbol not found: _EVP_CIPHER_CTX_block_size
    Referenced from:
    /usr/local/lib/ruby/1.8/i686-darwin9.6.0/openssl.bundle
    Expected in: flat namespace

    Trace/BPT trap


    Removing openssl port installed previously with macports all work fine!

    You forgive for this monologue.
    Juan Matias.

    Juan Matias wrote:
    > I got this error compiling Ruby (ruby-1.8.6-p287) on OSX (10.5.6, Darwin
    > Kernel Version 9.6.0):
    >
    > openssl_missing.h:123: error: conflicting types for 'BN_rand_range'
    > /usr/local/include/openssl/bn.h:411: error: previous declaration of
    > 'BN_rand_range' was here
    > openssl_missing.h:124: error: conflicting types for
    > 'BN_pseudo_rand_range'
    > /usr/local/include/openssl/bn.h:412: error: previous declaration of
    > 'BN_pseudo_rand_range' was here
    > make[1]: *** [openssl_missing.o] Error 1
    >
    > These functions were declared in two different files. Once in
    > include/openssl/bn.h and again in
    > ruby-1.8.6-p287/ext/openssl/openssl_missing.h
    >
    > I solved it commenting these two lines in include/openssl/bn.h[411,412].


    --
    Posted via http://www.ruby-forum.com/.
     
    Juan Matias, Jan 21, 2009
    #2
    1. Advertising

  3. Juan Matias

    Brian H. Guest

    I got the same error installing Ruby EE 1.8.6 and solved it by moving
    openssl out of my include path.

    $ sudo mv /usr/include/openssl/ ~/

    :)

    --
    Posted via http://www.ruby-forum.com/.
     
    Brian H., Oct 23, 2010
    #3
    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. Patrick Philippot
    Replies:
    0
    Views:
    474
    Patrick Philippot
    Apr 14, 2006
  2. Xah Lee
    Replies:
    22
    Views:
    1,155
    Tim Roberts
    Mar 21, 2006
  3. Xah Lee
    Replies:
    23
    Views:
    1,105
    Tim Roberts
    Mar 21, 2006
  4. Redd Vinylene
    Replies:
    6
    Views:
    311
    Jakub Pawlowicz
    Nov 18, 2008
  5. Xah Lee
    Replies:
    21
    Views:
    828
    Tim Roberts
    Mar 21, 2006
Loading...

Share This Page