Re: Out of tree build broken for APR 1.7.x and 1.8.x

2023-10-16 Thread Yann Ylavic
On Mon, Oct 16, 2023 at 11:41 AM Rainer Jung  wrote:
>
> This problem is in 1.7.x and 1.8.x. I did not check apr trunk.

Looks like apr_private_common.h does not exist in trunk (anymore?).

>
> Unfortunately I have no idea how to make autoheader to use
>
> #include "arch/apr_private_common.h"
>
> instead of
>
> #include "../apr_private_common.h"
>
> in the generated arch/unix/apr_private.h.in.
>
> Maybe someone has an idea?

The below seems to do it (and pass `make check` for me):

Index: configure.in
===
--- configure.in(revision 1910349)
+++ configure.in(working copy)
@@ -100,7 +100,7 @@ AH_BOTTOM([
 /*
  * Include common private declarations.
  */
-#include "../apr_private_common.h"
+#include "arch/apr_private_common.h"
 #endif /* APR_PRIVATE_H */
 ])

Index: include/arch/netware/apr_private.h
===
--- include/arch/netware/apr_private.h(revision 1910349)
+++ include/arch/netware/apr_private.h(working copy)
@@ -199,7 +199,7 @@ void* getStatCache();
 /*
  * Include common private declarations.
  */
-#include "../apr_private_common.h"
+#include "arch/apr_private_common.h"

 #endif  /*APR_PRIVATE_H*/
 #endif  /*NETWARE*/
Index: include/arch/win32/apr_private.h
===
--- include/arch/win32/apr_private.h(revision 1910349)
+++ include/arch/win32/apr_private.h(working copy)
@@ -169,7 +169,7 @@ APR_DECLARE_DATA int errno;
 /*
  * Include common private declarations.
  */
-#include "../apr_private_common.h"
+#include "arch/apr_private_common.h"

 #endif  /*APR_PRIVATE_H*/
 #endif  /*WIN32*/
--


Regards;
Yann.


Out of tree build broken for APR 1.7.x and 1.8.x

2023-10-16 Thread Rainer Jung
More precisely "make check" is broken for out of tree builds, although 
the core reason is not restricted to "make check". It was observed after 
r1909334 / r1909335, which introduce a dependency on 
arch/unix/apr_private.h to testpoll.c.


The header file arch/unix/apr_private.h (build tree) is generated from 
arch/unix/apr_private.h.in (source tree). But is contains


#include "../apr_private_common.h"

which will be looked up due to the relative path in the build tree, but 
actually is located in the source tree.


Currently arch/unix/apr_private.h is only used in testpoll.h, therefore 
the problem only shows up during make check. But in fact 
arch/unix/apr_private.h is broken for any potential use.


This problem is in 1.7.x and 1.8.x. I did not check apr trunk.

Unfortunately I have no idea how to make autoheader to use

#include "arch/apr_private_common.h"

instead of

#include "../apr_private_common.h"

in the generated arch/unix/apr_private.h.in.

Maybe someone has an idea?

Thanks and regards,

Rainer