Ruby/LDAP on Windows

G

gregarican

Here is a message I sent to the maintainer of this particular project.
I was wondering if there were broader effects of this, as extconf.rb on
the Win32 platform using the ruby-mswin32 build seems to quirk out on
other projects as well. Does anyone fall into the same problems as me?

Below is the message I sent off:

-----------------

I am attempting to build the Ruby/LDAP v0.9.1 package on my Windows
2000 development box. I have installed Open-LDAP v2.2.26 on the local
C: drive. Using the extconf.rb script I specify this as 'ruby
extconf.rb --with-openldap2 --with-ldap-dir=c:/openldap-2.2.26' Below
are the contents of the mkmf.log:

have_header: checking for ldap.h... -------------------- no

"cl -IC:/ruby/ruby-ldap-0.9.1 -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 -DUSE_OPENLDAP2
-DUSE_OPENLDAP -Ic:/openldap-2.2.26/include -D_REENTRANT conftest.c
-P" checked program was:
/* begin */
#include <ldap.h>
/* end */

--------------------

have_header: checking for lber.h... -------------------- no

"cl -IC:/ruby/ruby-ldap-0.9.1 -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 -DUSE_OPENLDAP2
-DUSE_OPENLDAP -Ic:/openldap-2.2.26/include -D_REENTRANT conftest.c
-P" checked program was:
/* begin */
#include <lber.h>
/* end */

--------------------

have_header: checking for ldap_ssl.h... -------------------- no

"cl -IC:/ruby/ruby-ldap-0.9.1 -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 -DUSE_OPENLDAP2
-DUSE_OPENLDAP -Ic:/openldap-2.2.26/include -D_REENTRANT conftest.c
-P" checked program was:
/* begin */
#include <ldap_ssl.h>
/* end */

--------------------

I have verified that the header files are located in the specified
OpenLDAP directory. I have tried any combination of specifying the
directory, such as --with-ldap-dir="c:\\openldap-2.2.26",
--with-ldap-dir=c:\openldap-2.2.26, etc. Any suggestions how I can get
the script to find the header files I have in place? I am looking to
deploy an application that will use LDAP on the back-end and would love
to get this done on my Windows 2000 box. I have FreeBSD here as well
and could move things over to there as a last resort, but my Win2K
laptop is more portable :)
 
G

gregarican

gregarican said:
Here is a message I sent to the maintainer of this particular project.
I was wondering if there were broader effects of this, as extconf.rb on
the Win32 platform using the ruby-mswin32 build seems to quirk out on
other projects as well. Does anyone fall into the same problems as me?


Below is the message I sent off:


-----------------


I am attempting to build the Ruby/LDAP v0.9.1 package on my Windows
2000 development box. I have installed Open-LDAP v2.2.26 on the local
C: drive. Using the extconf.rb script I specify this as 'ruby
extconf.rb --with-openldap2 --with-ldap-dir=c:/openldap-2.­2.26' Below
are the contents of the mkmf.log:


have_header: checking for ldap.h... -------------------- no


"cl -IC:/ruby/ruby-ldap-0.9.1 -Ic:/ruby/lib/ruby/1.8/i386-ms­win32 -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 -DUSE_OPENLDAP2
-DUSE_OPENLDAP -Ic:/openldap-2.2.26/include -D_REENTRANT conftest.c
-P" checked program was:
/* begin */
#include <ldap.h>
/* end */


--------------------


have_header: checking for lber.h... -------------------- no


"cl -IC:/ruby/ruby-ldap-0.9.1 -Ic:/ruby/lib/ruby/1.8/i386-ms­win32 -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 -DUSE_OPENLDAP2
-DUSE_OPENLDAP -Ic:/openldap-2.2.26/include -D_REENTRANT conftest.c
-P" checked program was:
/* begin */
#include <lber.h>
/* end */


--------------------


have_header: checking for ldap_ssl.h... -------------------- no


"cl -IC:/ruby/ruby-ldap-0.9.1 -Ic:/ruby/lib/ruby/1.8/i386-ms­win32 -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 -DUSE_OPENLDAP2
-DUSE_OPENLDAP -Ic:/openldap-2.2.26/include -D_REENTRANT conftest.c
-P" checked program was:
/* begin */
#include <ldap_ssl.h>
/* end */


--------------------


I have verified that the header files are located in the specified
OpenLDAP directory. I have tried any combination of specifying the
directory, such as --with-ldap-dir="c:\\openldap-­2.2.26",
--with-ldap-dir=c:\openldap-2.­2.26, etc. Any suggestions how I can get
the script to find the header files I have in place? I am looking to
deploy an application that will use LDAP on the back-end and would love
to get this done on my Windows 2000 box. I have FreeBSD here as well
and could move things over to there as a last resort, but my Win2K
laptop is more portable :)

I am still banging my head against the wall trying to get this compiled
on Windows 2000. I have tried compiling a Cygwin version, also to no
avail. Basically in either environment the extconf.rb routine fails to
find the header files using the have_header function that's part of
mkmf.rb. No matter if I specify --with-ldap-dir= or --with-ldapinc= or
--with-ldaplib= the extconf.rb routine doesn't find them. I tried
e-mailing the project maintainer a couple of times but didn't hear
anything back.

As an alternative to the OpenLDAP source files I have looked for the
Microsoft LDAP API source files. I can't seem to locate them. The only
thing I have found close is something called Microsoft ADAM (Active
Directory Application Mode), which is only intended for Windows XP and
2003. It won't install on my Windows 2000 box.

I sincerely hate to be a pest, but does anyone have a successfully
compiled ldap.so that resulted from installing Ruby/LDAP in the mswin32
environment? I used the Ruby One-Click Installer and didn't manually
install Ruby via Cygwin, MinGW, Borland, etc. Just wondering, because I
would love to start communication with my local LDAP server using Ruby
but am running into major roadblocks...
 
C

Clifford Heath

gregarican said:
As an alternative to the OpenLDAP source files I have looked for the
Microsoft LDAP API source files. I can't seem to locate them.

winldap.h and winber.h are both in c:/Program Files/Microsoft Visual
Studio .NET 2003/Vc7/PlatformSDK/Include for me. The Windows LDAP
library has a few things extra to the UMich standard version,
including a WCHAR version, auto reconnect, SSP-based security, etc.

Sorry, but I haven't used it with Ruby.
 
G

gregarican

Clifford said:
winldap.h and winber.h are both in c:/Program Files/Microsoft Visual
Studio .NET 2003/Vc7/PlatformSDK/Include for me. The Windows LDAP
library has a few things extra to the UMich standard version,
including a WCHAR version, auto reconnect, SSP-based security, etc.

Looks like I am off to download the hundreds of megs of MS Platform SDK
bloat :) and give that a shot. Hopefully that will be the silver
bullet I am looking for. Thanks for the suggestion!
 
G

gregarican

gregarican said:
Looks like I am off to download the hundreds of megs of MS Platform SDK
bloat :) and give that a shot. Hopefully that will be the silver
bullet I am looking for. Thanks for the suggestion!

As the final nail in the coffin I downloaded the just the 32-bit x86
Build Environment portion of the PSDK to get my include and lib
directory contents. After doing so when I tried to nmake Ruby/LDAP I
received an error about there being a missing sys/time.h include file.
This file isn't part of the typical mswin32 compiler/linker
environment, as it is typically included in the mingw environment IIRC.
So at this point I think I will look into my FreeBSD box to start
playing around with Ruby/LDAP :-( Oh well, life goes on.
 
I

Ian Macdonald

Here is a message I sent to the maintainer of this particular project.
I was wondering if there were broader effects of this, as extconf.rb on
the Win32 platform using the ruby-mswin32 build seems to quirk out on
other projects as well. Does anyone fall into the same problems as me?

Apologies for the shamefully late response. My wife recently gave birth
to our first child and I am in the midst of winding up my full-time job
and planning an international move.

It's bad news, I'm afraid. I inherited the maintainer position of
Ruby/LDAP from Takaaki Tateishi and, at that time, it appeared that
there was some support for compiling on Windows. Unfortunately, I don't
use Windows at all, so the support for that platform has remained
completely stagnant. I don't even know if it's still possible to build
Ruby/LDAP on that platform.

If anyone is willing to contribute patches for the Windows architecture,
I'd be happy to look at adding them in the future.

Ian
--
Ian Macdonald | "Zaphod grinned two manic grins, sauntered
(e-mail address removed) | over to the bar and bought most of it."
http://www.caliban.org/ | - Zaphod in paradise.
|
|
 
G

gregarican

Ian said:
Apologies for the shamefully late response. My wife recently gave birth
to our first child and I am in the midst of winding up my full-time job
and planning an international move.

No apologies necessary! Congratulations and it sounds as if you have
your hands full in many respects. As for the Ruby/LDAP project
compiling on Windows I would think that using a Cygwin setup one could
get this done. The problem is that my Ruby environment was created
using the one-click installer and is registered as mswin32. I do have
Cygwin on my system but Ruby wasn't compiled in it. Then to make
matters worse I have a couple of different IDE's on my system,
including Bloodshed Dev-C++ (which comes with a mingw compiler) and
Widestudio (which comes with a GNU compiler), in addition to my
Microsoft Visual C++ Toolkit 2003 environment. I guess I could play
around with things until I get it done for Ruby/LDAP, but don't have to
time nor ingenuity I guess :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top