On 25 Mar 2025, at 14:03, Rainer Jung <rainer.j...@kippdata.de> wrote:

> I tried compiling httpd 2.4.63 against apr-util 1.7.x head. It fails during 
> compilation of the generated exports.c.
> 
> exports.c contains
> 
> ...
> #include "apr_ldap_common.h"
> #include "apr_ldap.h"
> #include "apr_ldap_init.h"
> #include "apr_ldap_option.h"
> #include "apr_ldap_rebind.h"
> #include "apr_ldap_url.h"
> ...
> 
> but apr_ldap.h must be included first. The order above comes from 
> server/export_files, which in turn is generated by server/Makefile. There the 
> list of header files is sorted using "sort".
> 
> With LANG=en_US.UTF-8 (as in my case) sort seems to make no distinction 
> between "." and "_", so "common.h" comes before "h" and the other files. With 
> LANG=X or POSIX, the order is the one we need. It seems we have to fix this.

Hmmm... a sort that isn't stable isn't repeatable.

Is the fix to add a LANG=POSIX in front of the sort?

> Another small problem: compiling apr-util 1.7.x with ldap is broken an SLES 
> 11 and RHEL 6. They use old compilers and do not allow (compatible) 
> redefinition of structs. So the compilation fails with:
> 
> /bin/bash /path/to/my/libtool --silent --mode=compile --tag=CC gcc ... -o 
> ldap/apr_ldap.lo -c /path/to/my/ldap/apr_ldap.c && touch ldap/apr_ldap.lo
> 
> /path/to/my/ldap/apr_ldap.c:91: error: redefinition of typedef 'apr_ldap_t'
> /path/to/my/include/apr_ldap_common.h:172: error: previous declaration of 
> 'apr_ldap_t' was here
> make[1]: *** [ldap/apr_ldap.lo] Error 1

I fixed this in r1924621, can you confirm for me?

Regards,
Graham
--

Reply via email to