Re: svn commit: r1920664 - /apr/apr-util/branches/1.7.x/CMakeLists.txt

2024-09-20 Thread Ivan Zhakov
On Wed, 18 Sept 2024 at 12:03, Graham Leggett via dev 
wrote:

> On 15 Sep 2024, at 18:57, Ivan Zhakov  wrote:
>
> > I would be happy to enable LDAP by default, but it doesn't work right
> now so I think it's better to disable it until it is fixed. I tried to fix
> it, but without success. I configured GitHub Actions job with LDAP enabled:
> >
> https://github.com/apache/apr-util/actions/runs/10871254641/job/30164847244
> >
> > Do you have any ideas how to fix it?
>
> Looking quickly, this symbol is in ldap//apr_ldap.c, which is missing from
> the cmake build:
>
> Ok, I added ldap/apr_ldap.c to CMake build in r1920813.

But compilation still with different error:
https://github.com/apache/apr-util/actions/runs/10963954953/job/30446537433
[[[
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(133): error C2065:
'LDAP_INSUFFICIENT_ACCESS': undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(133): error C2051: case
expression not constant
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(183): warning C4142:
'ldap_cleanup': benign redefinition of type
C:\Program Files (x86)\Windows
Kits\10\include\10.0.22621.0\um\winldap.h(2422): note: see declaration of
'ldap_cleanup'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(183): error C2491:
'ldap_cleanup': definition of dllimport function not allowed
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(273): error C2065: 'result':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(273): warning C4047: 'function':
'apr_ldap_err_t **' differs in levels of indirection from 'int *'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(273): warning C4024:
'apr_ldap_url_parse': different types for formal and actual parameter 4
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(490): warning C4311: 'type
cast': pointer truncation from 'void *' to 'ULONG'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(499): warning C4311: 'type
cast': pointer truncation from 'void *' to 'ULONG'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1051): error C2065:
'LDAP_OPT_SUCCESS': undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1090): warning C4133:
'function': incompatible types - from 'timeval *' to 'l_timeval *'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1320): error C2065:
'LDAP_SASL_QUIET': undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1322): warning C4013:
'ldap_sasl_interactive_bind' undefined; assuming extern returning int
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1481): warning C4133:
'function': incompatible types - from 'timeval *' to 'PLDAP_TIMEVAL'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1619): warning C4013: 'strndup'
undefined; assuming extern returning int
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1619): warning C4047: '=': 'char
*' differs in levels of indirection from 'int'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1624): warning C4267:
'function': conversion from 'size_t' to 'int', possible loss of data
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1639): warning C4267:
'function': conversion from 'size_t' to 'int', possible loss of data
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1660): warning C4267:
'function': conversion from 'size_t' to 'int', possible loss of data
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1671): error C2065:
'LDAP_RES_SEARCH_REFERENCE': undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1671): error C2051: case
expression not constant
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1914): error C2065:
'LDAP_SASL_QUIET': undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1916): error C2065:
'apr_ldap_bind_ctx_t': undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1916): error C2146: syntax
error: missing ';' before identifier 'payload'
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1916): error C2065: 'payload':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1918): error C2065: 'payload':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1918): error C2224: left of
'.ld' must have struct/union type
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1919): error C2065: 'payload':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1919): error C2224: left of
'.interact' must have struct/union type
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1920): error C2065: 'payload':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1920): error C2224: left of
'.ctx' must have struct/union type
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1921): error C2065: 'payload':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1921): error C2224: left of
'.status' must have struct/union type
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1961): error C2065: 'payload':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1961): error C2224: left of
'.status' must have struct/union type
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1963): error C2065: 'payload':
undeclared identifier
D:\a\apr-util\apr-util\apu\ldap\apr_ldap.c(1963): error C2224: left of
'.status' 

Re: svn commit: r1920664 - /apr/apr-util/branches/1.7.x/CMakeLists.txt

2024-09-18 Thread Graham Leggett via dev
On 15 Sep 2024, at 18:57, Ivan Zhakov  wrote:

> I would be happy to enable LDAP by default, but it doesn't work right now so 
> I think it's better to disable it until it is fixed. I tried to fix it, but 
> without success. I configured GitHub Actions job with LDAP enabled:
> https://github.com/apache/apr-util/actions/runs/10871254641/job/30164847244
> 
> Do you have any ideas how to fix it?

Looking quickly, this symbol is in ldap//apr_ldap.c, which is missing from the 
cmake build:

testldap.c.obj : error LNK2019: unresolved external symbol 
__imp_apr_ldap_search referenced in function test_ldap_bind_cb

This symbol is part of the Microsoft LDAP API, is cmake binding to the correct 
LDAP library on Windows?

testldap.c.obj : error LNK2019: unresolved external symbol __imp_ldap_unbind_s 
referenced in function test_legacy_ldap_connection

https://learn.microsoft.com/en-us/windows/win32/api/winldap/nf-winldap-ldap_bind_s

Regards,
Graham
--



Re: svn commit: r1920664 - /apr/apr-util/branches/1.7.x/CMakeLists.txt

2024-09-15 Thread Ivan Zhakov
On Sun, 15 Sept 2024 at 16:12, Graham Leggett via dev 
wrote:

> On 15 Sep 2024, at 01:44, [email protected] wrote:
>
> > Author: ivan
> > Date: Sun Sep 15 00:44:04 2024
> > New Revision: 1920664
> >
> > URL: http://svn.apache.org/viewvc?rev=1920664&view=rev
> > Log:
> > CMake: By default disable LDAP support on Windows -- it does not compile.
>
> Would it be possible to switch this on?
>
>
Any platform that doesn't support the new API must APR_ENOTIMPL rather than
> not compile, I'll fix this.
>
> I would be happy to enable LDAP by default, but it doesn't work right now
so I think it's better to disable it until it is fixed. I tried to fix it,
but without success. I configured GitHub Actions job with LDAP enabled:
https://github.com/apache/apr-util/actions/runs/10871254641/job/30164847244

Do you have any ideas how to fix it?


-- 
Ivan Zhakov


Re: svn commit: r1920664 - /apr/apr-util/branches/1.7.x/CMakeLists.txt

2024-09-15 Thread Graham Leggett via dev
On 15 Sep 2024, at 01:44, [email protected] wrote:

> Author: ivan
> Date: Sun Sep 15 00:44:04 2024
> New Revision: 1920664
> 
> URL: http://svn.apache.org/viewvc?rev=1920664&view=rev
> Log:
> CMake: By default disable LDAP support on Windows -- it does not compile.

Would it be possible to switch this on?

Any platform that doesn't support the new API must APR_ENOTIMPL rather than not 
compile, I'll fix this.

Regards,
Graham
--