Compile Error: ldap.c:424: error: ‘LDAP_OP T_X_TLS_PROTOCOL’undeclared (first use in this func

Discussion in 'Ruby' started by Xeno Campanoli, Jun 3, 2009.

  1. root@leopard:~/libldap-ruby-0.9.7# make
    gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DUSE_OPENLDAP2
    -DUSE_OPENLDAP -DLDAP_DEPRECATED -D_REENTRANT -DHAVE_LDAP_H -DHAVE_LBER_H
    -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION -DHAVE_LDAP_GET_OPTION
    -DHAVE_LDAP_START_TLS_S -DHAVE_LDAP_MEMFREE -DHAVE_LDAP_PERROR
    -DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAP_SASL_BIND_S -DHAVE_LDAP_COMPARE_S
    -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S -DHAVE_LDAP_DELETE_EXT_S
    -DHAVE_LDAP_MODIFY_EXT_S -DHAVE_LDAP_SEARCH_EXT_S -DHAVE_LDAP_UNBIND_EXT_S
    -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c
    ldap.c
    ldap.c: In function ‘Init_ldap’:
    ldap.c:424: error: ‘LDAP_OPT_X_TLS_PROTOCOL’ undeclared (first use in this function)
    ldap.c:424: error: (Each undeclared identifier is reported only once
    ldap.c:424: error: for each function it appears in.)
    make: *** [ldap.o] Error 1
    root@leopard:~/libldap-ruby-0.9.7#
    ----snip----
    I followed the directions in the README under 'BUILDING'. I was able to get the
    extconf.rb to run after doing apt-get install libldap2-dev. I had already
    successfully built and installed ruby and openssl from source on this Ubuntu
    Server: root@leopard:~# uname -a
    Linux leopard 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 i686
    GNU/Linux
    openssl appears to be working, and is installed in the appropriate spot. This
    is probably just an omission I am not guessing. Can someone see something
    obvious? If not I'll file a bug tomorrow.

    Perhaps this is not a roadblock, but it appears to be a real bug if it cannot
    compile. I see not reference to the symbol LOAD_OPT_X_TLS_PROTOCOL in the
    directory tree.
     
    Xeno Campanoli, Jun 3, 2009
    #1
    1. Advertising

  2. Re: Compile Error: ldap.c:424: error: ‘LDAP_OPT_X_TLS_PROTOCOL’ undeclared (first u se in this function)

    Xeno Campanoli wrote:
    > root@leopard:~/libldap-ruby-0.9.7# make
    > gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DUSE_OPENLDAP2
    > -DUSE_OPENLDAP -DLDAP_DEPRECATED -D_REENTRANT -DHAVE_LDAP_H
    > -DHAVE_LBER_H -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION
    > -DHAVE_LDAP_GET_OPTION -DHAVE_LDAP_START_TLS_S -DHAVE_LDAP_MEMFREE
    > -DHAVE_LDAP_PERROR -DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAP_SASL_BIND_S
    > -DHAVE_LDAP_COMPARE_S -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S
    > -DHAVE_LDAP_DELETE_EXT_S -DHAVE_LDAP_MODIFY_EXT_S
    > -DHAVE_LDAP_SEARCH_EXT_S -DHAVE_LDAP_UNBIND_EXT_S
    > -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S -D_FILE_OFFSET_BITS=64 -fPIC -g
    > -O2 -c ldap.c
    > ldap.c: In function ‘Init_ldap’:
    > ldap.c:424: error: ‘LDAP_OPT_X_TLS_PROTOCOL’ undeclared (first use in
    > this function)
    > ldap.c:424: error: (Each undeclared identifier is reported only once
    > ldap.c:424: error: for each function it appears in.)
    > make: *** [ldap.o] Error 1
    > root@leopard:~/libldap-ruby-0.9.7#
    > ----snip----
    > I followed the directions in the README under 'BUILDING'. I was able to
    > get the extconf.rb to run after doing apt-get install libldap2-dev. I
    > had already successfully built and installed ruby and openssl from
    > source on this Ubuntu Server: root@leopard:~# uname -a
    > Linux leopard 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC
    > 2009 i686 GNU/Linux
    > openssl appears to be working, and is installed in the appropriate
    > spot. This is probably just an omission I am not guessing. Can someone
    > see something obvious? If not I'll file a bug tomorrow.
    >
    > Perhaps this is not a roadblock, but it appears to be a real bug if it
    > cannot compile. I see not reference to the symbol

    Sorry. I should have said LDAP_OPT_X_TLS_PROTOCOL does not exist in the tree
    except in conn.c and ldap.c.
    > LOAD_OPT_X_TLS_PROTOCOL in the directory tree.
    >
    >
     
    Xeno Campanoli, Jun 3, 2009
    #2
    1. Advertising

  3. Re: Compile Error: ldap.c:424: error: ‘LDAP_OPT_X_TLS_PROTOCOL’ undeclared (first u se in this

    This is standard C debugging, so I don't think it really belongs on a
    Ruby list any more.

    $ find /usr/include -type f | xargs grep LDAP_OPT_X_TLS_PROTOCOL
    /usr/include/ldap.h:/* #define LDAP_OPT_X_TLS_PROTOCOL 0x6007 */

    So the constant exists in the openldap headers, but is commented out for
    some reason. A note earlier in the file says this is an openldap private
    option.

    As to why ruby-ldap uses this option, but openldap doesn't provide it:
    well, that's something to do with the ruby-ldap library. If you look at
    the patches which the Ubuntu package applies to make it build, you'll
    probably find what they do to fix it.
    --
    Posted via http://www.ruby-forum.com/.
     
    Brian Candler, Jun 3, 2009
    #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. kyung seop kim
    Replies:
    2
    Views:
    1,105
    Asfand Yar Qazi
    Nov 11, 2004
  2. CRON
    Replies:
    24
    Views:
    203,871
    Adrienne Boswell
    Jun 20, 2006
  3. Johnny
    Replies:
    3
    Views:
    484
    Robert Kern
    Aug 23, 2005
  4. Peter Rothenbuecher
    Replies:
    4
    Views:
    925
    Larry I Smith
    Dec 10, 2005
  5. Blake
    Replies:
    2
    Views:
    352
    Michael Harris \(MVP\)
    May 29, 2004
Loading...

Share This Page