BF Failure on Bandicoot
Bandicoot is currently failing on HEAD with the following error shown in
a message box during make check:
---------------------------
postgres.exe - Entry Point Not Found
---------------------------
The procedure entry point ldap_start_tls_sA could not be located in the
dynamic link library wldap32.dll.
---------------------------
OK
---------------------------
The failure hangs up the build farm run so it doesn't report back. It
appears to occur in initdb, which subsequently cannot be killed :-(
Regards, Dave.
Hi All
I am looking for a C/C++ library which can talk to postgresql/postgis other
than libpqxx!!
thanx in advance
sandeep
Ühel kenal päeval, R, 2006-07-21 kell 17:14, kirjutas Sandeep
Jakkaraju(Navolve):
Hi All
I am looking for a C/C++ library which can talk to postgresql/postgis
other than libpqxx!!
Why ?
thanx in advance
sandeep
--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia
Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com
"Dave Page" <dpage@vale-housing.co.uk> writes:
Bandicoot is currently failing on HEAD with the following error shown in
a message box during make check:
The procedure entry point ldap_start_tls_sA could not be located in the
dynamic link library wldap32.dll.
Just guessing from the function name, but does this go away if you don't
configure --with-ldap?
If so it's presumably a portability issue in this recent patch:
2006-03-06 12:41 momjian
* configure, configure.in, src/backend/libpq/auth.c,
src/backend/libpq/hba.c, src/backend/libpq/pg_hba.conf.sample,
src/include/pg_config.h.in, src/include/libpq/hba.h: This patch
adds native LDAP auth, for those platforms that don't have PAM
(such as Win32, but also unixen without PAM). On Unix, uses
OpenLDAP. On win32, uses the builin WinLDAP library.
Magnus Hagander
I'd counsel just leaving --with-ldap off until Magnus gets back from
vacation. We can always revert the patch later if he can't fix it.
(There's some fairly ugly stuff going on at lines 69-89 of
backend/libpq/auth.c, which I bet is the root of the trouble, but
I'm not going to dig further --- I've wasted more than enough time
on Windows this week ;-))
regards, tom lane
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 21 July 2006 15:20
To: Dave Page
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] BF Failure on Bandicoot"Dave Page" <dpage@vale-housing.co.uk> writes:
Bandicoot is currently failing on HEAD with the following
error shown in
a message box during make check:
The procedure entry point ldap_start_tls_sA could not be
located in the
dynamic link library wldap32.dll.
Just guessing from the function name, but does this go away
if you don't
configure --with-ldap?If so it's presumably a portability issue in this recent patch:
2006-03-06 12:41 momjian
* configure, configure.in, src/backend/libpq/auth.c,
src/backend/libpq/hba.c, src/backend/libpq/pg_hba.conf.sample,
src/include/pg_config.h.in, src/include/libpq/hba.h: This patch
adds native LDAP auth, for those platforms that don't have PAM
(such as Win32, but also unixen without PAM). On Unix, uses
OpenLDAP. On win32, uses the builin WinLDAP library.Magnus Hagander
I'd counsel just leaving --with-ldap off until Magnus gets back from
vacation. We can always revert the patch later if he can't fix it.
(There's some fairly ugly stuff going on at lines 69-89 of
backend/libpq/auth.c, which I bet is the root of the trouble, but
I'm not going to dig further --- I've wasted more than enough time
on Windows this week ;-))
Yeah, I spotted that ugliness. I'll turn it off for now, and CC this to
Magnus so he has no excuse for forgetting :-p
Regards, Dave.
Just guessing from the function name, but does this go away if you
don't configure --with-ldap?If so it's presumably a portability issue in this recent patch:
2006-03-06 12:41 momjian
* configure, configure.in, src/backend/libpq/auth.c,
src/backend/libpq/hba.c,
src/backend/libpq/pg_hba.conf.sample,
src/include/pg_config.h.in, src/include/libpq/hba.h: This
patch
adds native LDAP auth, for those platforms that don't have
PAM
(such as Win32, but also unixen without PAM). On Unix, uses
OpenLDAP. On win32, uses the builin WinLDAP library.Magnus Hagander
I'd counsel just leaving --with-ldap off until Magnus gets back
from vacation. We can always revert the patch later if he can't
fix it.
(There's some fairly ugly stuff going on at lines 69-89 of
backend/libpq/auth.c, which I bet is the root of the trouble, but
I'm not going to dig further --- I've wasted more than enough time
on Windows this week ;-))
Looking at the MSDN documentation it seems this function only exists on
Windows 2003 and Windows XP. Which is very interesting, because I have
it working on one of my 2000 boxes. But I guess I got it through some
patch or other.
I'm going to have to redo it to dynamically load that function and exit
with a proper error message if it's not found. Shouldn't be too hard,
I'll get to it as soon as I can get down for a coding session.
The ugly stuff I assume is the stuff about the mingw broken headers? If
so, no, not related in any way.
//Magnus
The procedure entry point ldap_start_tls_sA could not be located in
the
dynamic link library wldap32.dll.
I'd counsel just leaving --with-ldap off until Magnus gets back
from vacation. We can always revert the patch later if he can't
fix it.Looking at the MSDN documentation it seems this function only
exists on
Windows 2003 and Windows XP. Which is very interesting, because I have
it working on one of my 2000 boxes. But I guess I got it through some
patch or other.I'm going to have to redo it to dynamically load that
function and exit
with a proper error message if it's not found. Shouldn't be too hard,
I'll get to it as soon as I can get down for a coding session.
On my Windows 2000 (5.00.2195) Service Pack 4,
the LDAP library does not contain any ldap_start_tls*
File version of WLDAP32.DLL is 5.0.2195.7017.
Yours,
Laurenz Albe
Import Notes
Resolved by subject fallback
The procedure entry point ldap_start_tls_sA could not be
located in
thedynamic link library wldap32.dll.
I'd counsel just leaving --with-ldap off until Magnus gets back
from
vacation. We can always revert the patch later if he can't fix
it.
Looking at the MSDN documentation it seems this function only
exists
on Windows 2003 and Windows XP. Which is very interesting,
because I
have it working on one of my 2000 boxes. But I guess I got it
through
some patch or other.
I'm going to have to redo it to dynamically load that function
and
exit with a proper error message if it's not found. Shouldn't be
too
hard, I'll get to it as soon as I can get down for a coding
session.
On my Windows 2000 (5.00.2195) Service Pack 4, the LDAP library
does not contain any ldap_start_tls*File version of WLDAP32.DLL is 5.0.2195.7017.
Yeah, I have somehow got a version 5.2 DLL in there. I wonder where the
heck it came from :-) I'm set up with a different test box now that
clearly shows the problem, so I'll get to work on fixing it.
//Magnus
Just guessing from the function name, but does this go away if you
don't configure --with-ldap?If so it's presumably a portability issue in this recent patch:
2006-03-06 12:41 momjian
* configure, configure.in, src/backend/libpq/auth.c,
src/backend/libpq/hba.c,
src/backend/libpq/pg_hba.conf.sample,
src/include/pg_config.h.in, src/include/libpq/hba.h: This patch
adds native LDAP auth, for those platforms that don't have PAM
(such as Win32, but also unixen without PAM). On Unix, uses
OpenLDAP. On win32, uses the builin WinLDAP library.Magnus Hagander
I'd counsel just leaving --with-ldap off until Magnus gets
back from
vacation. We can always revert the patch later if he can't fix it.
(There's some fairly ugly stuff going on at lines 69-89 of
backend/libpq/auth.c, which I bet is the root of thetrouble, but I'm
not going to dig further --- I've wasted more than enough time on
Windows this week ;-))
Attached is a patch that fixes this issue at least in my test machine
(yes, I found one 2000 machine that was broken as well)
//Magnus
Attachments:
ldap.patchapplication/octet-stream; name=ldap.patchDownload
Index: doc/src/sgml/client-auth.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v
retrieving revision 1.91
diff -c -r1.91 client-auth.sgml
*** doc/src/sgml/client-auth.sgml 18 Jun 2006 15:38:35 -0000 1.91
--- doc/src/sgml/client-auth.sgml 21 Aug 2006 18:21:27 -0000
***************
*** 938,944 ****
and the LDAP server. The connection between the client and the
PostgreSQL server is not affected by this setting. To make use of
TLS encryption, you may need to configure the LDAP library prior
! to configuring PostgreSQL.
</para>
<para>
If no port is specified, the default port as configured in the
--- 938,945 ----
and the LDAP server. The connection between the client and the
PostgreSQL server is not affected by this setting. To make use of
TLS encryption, you may need to configure the LDAP library prior
! to configuring PostgreSQL. Note that encrypted LDAP is not available
! on all platforms, depending on the systems LDAP library.
</para>
<para>
If no port is specified, the default port as configured in the
Index: src/backend/libpq/auth.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/libpq/auth.c,v
retrieving revision 1.139
diff -c -r1.139 auth.c
*** src/backend/libpq/auth.c 14 Jul 2006 14:52:19 -0000 1.139
--- src/backend/libpq/auth.c 21 Aug 2006 18:12:35 -0000
***************
*** 73,85 ****
#define LDAP_DEPRECATED 1
#include <ldap.h>
#else
- /* Header broken in MingW */
- #define ldap_start_tls_sA __BROKEN_LDAP_HEADER
#include <winldap.h>
- #undef ldap_start_tls_sA
/* Correct header from the Platform SDK */
! WINLDAPAPI ULONG ldap_start_tls_sA (
IN PLDAP ExternalHandle,
OUT PULONG ServerReturnValue,
OUT LDAPMessage **result,
--- 73,82 ----
#define LDAP_DEPRECATED 1
#include <ldap.h>
#else
#include <winldap.h>
/* Correct header from the Platform SDK */
! typedef ULONG (WINLDAPAPI *__ldap_start_tls_sA)(
IN PLDAP ExternalHandle,
OUT PULONG ServerReturnValue,
OUT LDAPMessage **result,
***************
*** 713,718 ****
--- 710,716 ----
static int
CheckLDAPAuth(Port *port)
{
+ static __ldap_start_tls_sA _ldap_start_tls_sA = NULL;
char *passwd;
char server[128];
char basedn[128];
***************
*** 810,816 ****
#ifndef WIN32
if ((r = ldap_start_tls_s(ldap, NULL, NULL)) != LDAP_SUCCESS)
#else
! if ((r = ldap_start_tls_sA(ldap, NULL, NULL, NULL, NULL)) != LDAP_SUCCESS)
#endif
{
ereport(LOG,
--- 808,842 ----
#ifndef WIN32
if ((r = ldap_start_tls_s(ldap, NULL, NULL)) != LDAP_SUCCESS)
#else
! if (_ldap_start_tls_sA == NULL)
! {
! /* Need to load this function dynamically because it does not exist on Windows 2000,
! * and causes a load error for the whole exe if referenced.
! */
! HANDLE ldaphandle;
!
! ldaphandle = LoadLibrary("WLDAP32.DLL");
! if (ldaphandle == NULL)
! {
! /* should never happen since we import other files from wldap32, but check anyway */
! ereport(LOG,
! (errmsg("could not load wldap32.dll")));
! return STATUS_ERROR;
! }
! _ldap_start_tls_sA = (__ldap_start_tls_sA)GetProcAddress(ldaphandle, "ldap_start_tls_sA");
! if (_ldap_start_tls_sA == NULL)
! {
! ereport(LOG,
! (errmsg("could not load function _ldap_start_tls_sA in wldap32.dll. LDAP over SSL is not supported on this platform.")));
! return STATUS_ERROR;
! }
!
! /* Leak ldaphandle on purpose, because we need the library to stay open. This is ok because
! * it will only ever be leaked once per process and is automatically cleaned up on process
! * exit.
! */
! }
! if ((r = _ldap_start_tls_sA(ldap, NULL, NULL, NULL, NULL)) != LDAP_SUCCESS)
#endif
{
ereport(LOG,
"Magnus Hagander" <mha@sollentuna.net> writes:
Attached is a patch that fixes this issue at least in my test machine
(yes, I found one 2000 machine that was broken as well)
Applied. Dave, would you re-enable the LDAP option on bandicoot so
we can verify this fixes it?
regards, tom lane
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 21 August 2006 20:24
To: pgsql-hackers@postgresql.org; Magnus Hagander
Cc: Dave Page; pgsql-patches@postgresql.org
Subject: Re: [PATCHES] [HACKERS] BF Failure on Bandicoot"Magnus Hagander" <mha@sollentuna.net> writes:
Attached is a patch that fixes this issue at least in my
test machine
(yes, I found one 2000 machine that was broken as well)
Applied. Dave, would you re-enable the LDAP option on bandicoot so
we can verify this fixes it?
Done. I think the next run is in a few hours on that box.
Regards, Dave.