Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Compile Error: ldap.c:424: error: ‘LDAP_OP T_X_TLS_PROTOCOL’undeclared (first use in this function)

Reply
Thread Tools

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

 
 
Xeno Campanoli
Guest
Posts: n/a
 
      06-03-2009
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.


 
Reply With Quote
 
 
 
 
Xeno Campanoli
Guest
Posts: n/a
 
      06-03-2009
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.
>
>



 
Reply With Quote
 
 
 
 
Brian Candler
Guest
Posts: n/a
 
      06-03-2009
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/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile directive for conditional compile for Java 1.4 versus Java 5 timjowers Java 7 02-02-2011 12:08 AM
How to compile the following source code in VC6// I have error inVC++6 but compile ok in GCC fAnSKyer C++ 2 06-07-2009 07:57 AM
computation at compile time i.e. compile time functions usingtemplates Carter C++ 2 03-04-2009 06:43 PM
Compile versus not compile (VS 2005)?? stupid48@gmail.com ASP .Net 1 04-11-2008 08:24 PM
cant compile on linux system.cant compile on cant compile onlinux system. Nagaraj C++ 1 03-01-2007 11:18 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57