You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Steve Hay <st...@googlemail.com> on 2019/08/29 12:31:45 UTC

Trouble building 2.4.41 on Windows with CMake

I'm getting errors about missing prerequisites when building
httpd-2.4.41 on Windows using CMake (version 3.15.2).

The modules in question are all optional so should simply be skipped
rather than stopping the build (I'm building with -DENABLE_MODULES=a),
but CMake is giving me an error:

CMake Error at CMakeLists.txt:770 (IF):
  if given arguments:

    "NOT" "OPENSSL_FOUND" "CURL_FOUND" "JANSSON_FOUND"
"HAVE_OPENSSL_102" "STREQUAL" ""

  Unknown arguments specified

Building with the same command-line worked fine in 2.4.39:

cmake -DCMAKE_INSTALL_PREFIX=D:\Dev\Temp\mp2\apache -G "NMake
Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_MODULES=a

Output is attached.

Any ideas what is going wrong here?

Re: Trouble building 2.4.41 on Windows with CMake

Posted by Stefan Eissing <st...@greenbytes.de>.

> Am 31.08.2019 um 04:23 schrieb William A Rowe Jr <wr...@rowe-clan.net>:
> 
> Thanks for the additional eyeballs and testing!
> 
> I'm working up a CI for release/asf release candidates/snapshot (across 
> all of our dependencies' development chains)... will share when I'm a bit
> closer to the goalpost. I'm happy to add the github-based mod_h2/_md
> "external" modules as well to that CI exam.

Cool! :-D

> On Fri, Aug 30, 2019 at 12:10 PM Steve Hay <st...@googlemail.com> wrote:
> I've tried the build again with the proper fix in place and all is well for me: mod_md now reports three missing prereqs:
> 
> -- mod_md was requested but couldn't be built due to a missing prerequisite (OPENSSL_FOUND)
> -- mod_md was requested but couldn't be built due to a missing prerequisite (CURL_FOUND)
> -- mod_md was requested but couldn't be built due to a missing prerequisite (JANSSON_FOUND)
> 
> The complete cmake output is attached in case it is of interest. This was using 3.15.2 - the latest version.
> 
> Thanks for fixing this.
> 
> 
> On Fri, 30 Aug 2019 at 09:32, William A Rowe Jr <wr...@rowe-clan.net> wrote:
> However, it fixed it by ignoring most of the troubles... I have my IP unblocked,
> so I'm able to get some further fixes in, I added the iterator, confirmed the 
> newest fixes and have committed to trunk and 2.4.x. Steve, please retest and
> report back?
>  
> There is no such thing as a _102 openssl result macro, that was a big whoops,
> since we never tested for that. And won't need to, ever again... deleted the 
> openssl rev test (who would build such an unsupported ancient thing anyways?
> Shame on them.) And immediately failed on curl and jansson but for two different
> reasons - reminding us that copy-paste isn't always our friend.
> 
> cmake has *long* had a FIND_PACKAGE for curl. Not so much for jansson.
> But we didn't follow the missing logic for jansson or for curl, and didn't invoke 
> the find facility for curl, so both were AWOL. Didn't matter with my hack, since 
> we didn't look for them to be found, and the way I build, all the libs and includes
> are found during the compilation at the anticipated paths... all but the
> libcurl_imp.lib which the existing cmake logic overlooked. Easily hardcoded as;
> cmake $(CMAKE_DEFAULTS)
> -D CMAKE_INSTALL_PREFIX=$(DESTDIR) \
> -D CURL_LIBRARIES=$(DESTDIR)/lib/libcurl_imp.lib
> 
> 
> The lesson in this is that there is more to script than what was copied,
> it was no different than asking configure.in to work given only half the
> necessary lines of configure script, and there are one of two different
> patterns that must be followed; either a FIND_PACKAGE implementation
> is available in common flavors of cmake for a specific package, or is not.
> I guess the ask is not to commit untested build changes, well at least
> don't backport them.
> 
> The current state of CMake against 3.14 carries the following warnings,
> I may or may not get around to addressing some or all of these, if anyone
> else is looking for some low hanging fruit...
> 
> 
> CMake Warning (dev) at CMakeLists.txt:563 (ELSEIF):
>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>   details.  Use the cmake_policy command to set the policy and suppress this
>   warning.
> 
>   Quoted variables like "i" will no longer be dereferenced when the policy is
>   set to NEW.  Since the policy is not set the OLD behavior will be used.
> This warning is for project developers.  Use -Wno-dev to suppress it.
> 
> CMake Warning (dev) at CMakeLists.txt:615 (GET_TARGET_PROPERTY):
>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>   Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
>   command to set the policy and suppress this warning.
> 
>   The LOCATION property should not be read from target "gen_test_char".  Use
>   the target name directly with add_custom_command, or use the generator
>   expression $<TARGET_FILE>, as appropriate.
> 
> This warning is for project developers.  Use -Wno-dev to suppress it.
> 
> CMake Warning (dev) at CMakeLists.txt:120 (ELSEIF):
>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>   details.  Use the cmake_policy command to set the policy and suppress this
>   warning.
> 
>   Quoted variables like "i" will no longer be dereferenced when the policy is
>   set to NEW.  Since the policy is not set the OLD behavior will be used.
> Call Stack (most recent call first):
>   CMakeLists.txt:757 (GET_MOD_ENABLE_RANK)
> This warning is for project developers.  Use -Wno-dev to suppress it.
> 
> CMake Warning (dev) at CMakeLists.txt:766 (IF):
>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>   details.  Use the cmake_policy command to set the policy and suppress this
>   warning.
> 
>   Quoted variables like "APR_HAS_LDAP" will no longer be dereferenced when
>   the policy is set to NEW.  Since the policy is not set the OLD behavior
>   will be used.
> This warning is for project developers.  Use -Wno-dev to suppress it.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Fri, Aug 30, 2019 at 2:24 AM Steve Hay <st...@googlemail.com> wrote:
> Thanks to you both - that was indeed the trouble, and the fix has
> sorted it out for me.
> 
> On Fri, 30 Aug 2019 at 08:16, Stefan Eissing
> <st...@greenbytes.de> wrote:
> >
> > Added to trunk in r1866119.
> > Merged to 2.4.x in r1866121.
> >
> > Thanks for this, Bill!
> >
> > > Am 29.08.2019 um 19:05 schrieb William A Rowe Jr <wr...@rowe-clan.net>:
> > >
> > > Index: httpd-2.x/CMakeLists.txt
> > > ===================================================================
> > > --- httpd-2.x/CMakeLists.txt  (revision 1866089)
> > > +++ httpd-2.x/CMakeLists.txt  (working copy)
> > > @@ -508,7 +508,9 @@
> > >    modules/lua/lua_vmprep.c           modules/lua/lua_dbd.c
> > >  )
> > >  SET(mod_lua_requires                 LUA51_FOUND)
> > > -SET(mod_md_requires                  OPENSSL_FOUND CURL_FOUND JANSSON_FOUND HAVE_OPENSSL_102)
> > > +# TODO: _requires does not currently iterate a list, substitute the following once it does;
> > > +# SET(mod_md_requires                OPENSSL_FOUND CURL_FOUND JANSSON_FOUND HAVE_OPENSSL_102)
> > > +SET(mod_md_requires                  CURL_FOUND)
> > >  SET(mod_md_extra_includes            ${OPENSSL_INCLUDE_DIR} ${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
> > >  SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
> > >  SET(mod_md_extra_sources
> > > @@ -763,6 +765,7 @@
> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/session
> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl
> > >    ${CMAKE_CURRENT_SOURCE_DIR}/server
> > > +  ${CMAKE_CURRENT_SOURCE_DIR}/server/mpm/winnt
> > >    ${APR_INCLUDE_DIR}
> > >    ${PCRE_INCLUDE_DIR}
> > >  )
> >


Re: Trouble building 2.4.41 on Windows with CMake

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
Thanks for the additional eyeballs and testing!

I'm working up a CI for release/asf release candidates/snapshot (across
all of our dependencies' development chains)... will share when I'm a bit
closer to the goalpost. I'm happy to add the github-based mod_h2/_md
"external" modules as well to that CI exam.



On Fri, Aug 30, 2019 at 12:10 PM Steve Hay <st...@googlemail.com>
wrote:

> I've tried the build again with the proper fix in place and all is well
> for me: mod_md now reports three missing prereqs:
>
> -- mod_md was requested but couldn't be built due to a missing
> prerequisite (OPENSSL_FOUND)
> -- mod_md was requested but couldn't be built due to a missing
> prerequisite (CURL_FOUND)
> -- mod_md was requested but couldn't be built due to a missing
> prerequisite (JANSSON_FOUND)
>
> The complete cmake output is attached in case it is of interest. This was
> using 3.15.2 - the latest version.
>
> Thanks for fixing this.
>
>
> On Fri, 30 Aug 2019 at 09:32, William A Rowe Jr <wr...@rowe-clan.net>
> wrote:
>
>> However, it fixed it by ignoring most of the troubles... I have my IP
>> unblocked,
>> so I'm able to get some further fixes in, I added the iterator, confirmed
>> the
>> newest fixes and have committed to trunk and 2.4.x. Steve, please retest
>> and
>> report back?
>>
>> There is no such thing as a _102 openssl result macro, that was a big
>> whoops,
>> since we never tested for that. And won't need to, ever again... deleted
>> the
>> openssl rev test (who would build such an unsupported ancient thing
>> anyways?
>> Shame on them.) And immediately failed on curl and jansson but for two
>> different
>> reasons - reminding us that copy-paste isn't always our friend.
>>
>> cmake has *long* had a FIND_PACKAGE for curl. Not so much for jansson.
>> But we didn't follow the missing logic for jansson or for curl, and
>> didn't invoke
>> the find facility for curl, so both were AWOL. Didn't matter with my
>> hack, since
>> we didn't look for them to be found, and the way I build, all the libs
>> and includes
>> are found during the compilation at the anticipated paths... all but the
>> libcurl_imp.lib which the existing cmake logic overlooked. Easily
>> hardcoded as;
>> cmake $(CMAKE_DEFAULTS)
>> -D CMAKE_INSTALL_PREFIX=$(DESTDIR) \
>> -D CURL_LIBRARIES=$(DESTDIR)/lib/libcurl_imp.lib
>>
>> The lesson in this is that there is more to script than what was copied,
>> it was no different than asking configure.in to work given only half the
>> necessary lines of configure script, and there are one of two different
>> patterns that must be followed; either a FIND_PACKAGE implementation
>> is available in common flavors of cmake for a specific package, or is not.
>> I guess the ask is not to commit untested build changes, well at least
>> don't backport them.
>>
>> The current state of CMake against 3.14 carries the following warnings,
>> I may or may not get around to addressing some or all of these, if anyone
>> else is looking for some low hanging fruit...
>>
>>
>> CMake Warning (dev) at CMakeLists.txt:563 (ELSEIF):
>>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>>   details.  Use the cmake_policy command to set the policy and suppress
>> this
>>   warning.
>>
>>   Quoted variables like "i" will no longer be dereferenced when the
>> policy is
>>   set to NEW.  Since the policy is not set the OLD behavior will be used.
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> CMake Warning (dev) at CMakeLists.txt:615 (GET_TARGET_PROPERTY):
>>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>>   Run "cmake --help-policy CMP0026" for policy details.  Use the
>> cmake_policy
>>   command to set the policy and suppress this warning.
>>
>>   The LOCATION property should not be read from target "gen_test_char".
>> Use
>>   the target name directly with add_custom_command, or use the generator
>>   expression $<TARGET_FILE>, as appropriate.
>>
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> CMake Warning (dev) at CMakeLists.txt:120 (ELSEIF):
>>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>>   details.  Use the cmake_policy command to set the policy and suppress
>> this
>>   warning.
>>
>>   Quoted variables like "i" will no longer be dereferenced when the
>> policy is
>>   set to NEW.  Since the policy is not set the OLD behavior will be used.
>> Call Stack (most recent call first):
>>   CMakeLists.txt:757 (GET_MOD_ENABLE_RANK)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> CMake Warning (dev) at CMakeLists.txt:766 (IF):
>>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>>   details.  Use the cmake_policy command to set the policy and suppress
>> this
>>   warning.
>>
>>   Quoted variables like "APR_HAS_LDAP" will no longer be dereferenced when
>>   the policy is set to NEW.  Since the policy is not set the OLD behavior
>>   will be used.
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Aug 30, 2019 at 2:24 AM Steve Hay <st...@googlemail.com>
>> wrote:
>>
>>> Thanks to you both - that was indeed the trouble, and the fix has
>>> sorted it out for me.
>>>
>>> On Fri, 30 Aug 2019 at 08:16, Stefan Eissing
>>> <st...@greenbytes.de> wrote:
>>> >
>>> > Added to trunk in r1866119.
>>> > Merged to 2.4.x in r1866121.
>>> >
>>> > Thanks for this, Bill!
>>> >
>>> > > Am 29.08.2019 um 19:05 schrieb William A Rowe Jr <
>>> wrowe@rowe-clan.net>:
>>> > >
>>> > > Index: httpd-2.x/CMakeLists.txt
>>> > > ===================================================================
>>> > > --- httpd-2.x/CMakeLists.txt  (revision 1866089)
>>> > > +++ httpd-2.x/CMakeLists.txt  (working copy)
>>> > > @@ -508,7 +508,9 @@
>>> > >    modules/lua/lua_vmprep.c           modules/lua/lua_dbd.c
>>> > >  )
>>> > >  SET(mod_lua_requires                 LUA51_FOUND)
>>> > > -SET(mod_md_requires                  OPENSSL_FOUND CURL_FOUND
>>> JANSSON_FOUND HAVE_OPENSSL_102)
>>> > > +# TODO: _requires does not currently iterate a list, substitute the
>>> following once it does;
>>> > > +# SET(mod_md_requires                OPENSSL_FOUND CURL_FOUND
>>> JANSSON_FOUND HAVE_OPENSSL_102)
>>> > > +SET(mod_md_requires                  CURL_FOUND)
>>> > >  SET(mod_md_extra_includes            ${OPENSSL_INCLUDE_DIR}
>>> ${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
>>> > >  SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES}
>>> ${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
>>> > >  SET(mod_md_extra_sources
>>> > > @@ -763,6 +765,7 @@
>>> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/session
>>> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl
>>> > >    ${CMAKE_CURRENT_SOURCE_DIR}/server
>>> > > +  ${CMAKE_CURRENT_SOURCE_DIR}/server/mpm/winnt
>>> > >    ${APR_INCLUDE_DIR}
>>> > >    ${PCRE_INCLUDE_DIR}
>>> > >  )
>>> >
>>>
>>

Re: Trouble building 2.4.41 on Windows with CMake

Posted by Steve Hay <st...@googlemail.com>.
I've tried the build again with the proper fix in place and all is well for
me: mod_md now reports three missing prereqs:

-- mod_md was requested but couldn't be built due to a missing prerequisite
(OPENSSL_FOUND)
-- mod_md was requested but couldn't be built due to a missing prerequisite
(CURL_FOUND)
-- mod_md was requested but couldn't be built due to a missing prerequisite
(JANSSON_FOUND)

The complete cmake output is attached in case it is of interest. This was
using 3.15.2 - the latest version.

Thanks for fixing this.


On Fri, 30 Aug 2019 at 09:32, William A Rowe Jr <wr...@rowe-clan.net> wrote:

> However, it fixed it by ignoring most of the troubles... I have my IP
> unblocked,
> so I'm able to get some further fixes in, I added the iterator, confirmed
> the
> newest fixes and have committed to trunk and 2.4.x. Steve, please retest
> and
> report back?
>
> There is no such thing as a _102 openssl result macro, that was a big
> whoops,
> since we never tested for that. And won't need to, ever again... deleted
> the
> openssl rev test (who would build such an unsupported ancient thing
> anyways?
> Shame on them.) And immediately failed on curl and jansson but for two
> different
> reasons - reminding us that copy-paste isn't always our friend.
>
> cmake has *long* had a FIND_PACKAGE for curl. Not so much for jansson.
> But we didn't follow the missing logic for jansson or for curl, and didn't
> invoke
> the find facility for curl, so both were AWOL. Didn't matter with my hack,
> since
> we didn't look for them to be found, and the way I build, all the libs and
> includes
> are found during the compilation at the anticipated paths... all but the
> libcurl_imp.lib which the existing cmake logic overlooked. Easily
> hardcoded as;
> cmake $(CMAKE_DEFAULTS)
> -D CMAKE_INSTALL_PREFIX=$(DESTDIR) \
> -D CURL_LIBRARIES=$(DESTDIR)/lib/libcurl_imp.lib
>
> The lesson in this is that there is more to script than what was copied,
> it was no different than asking configure.in to work given only half the
> necessary lines of configure script, and there are one of two different
> patterns that must be followed; either a FIND_PACKAGE implementation
> is available in common flavors of cmake for a specific package, or is not.
> I guess the ask is not to commit untested build changes, well at least
> don't backport them.
>
> The current state of CMake against 3.14 carries the following warnings,
> I may or may not get around to addressing some or all of these, if anyone
> else is looking for some low hanging fruit...
>
>
> CMake Warning (dev) at CMakeLists.txt:563 (ELSEIF):
>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>   details.  Use the cmake_policy command to set the policy and suppress
> this
>   warning.
>
>   Quoted variables like "i" will no longer be dereferenced when the policy
> is
>   set to NEW.  Since the policy is not set the OLD behavior will be used.
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at CMakeLists.txt:615 (GET_TARGET_PROPERTY):
>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>   Run "cmake --help-policy CMP0026" for policy details.  Use the
> cmake_policy
>   command to set the policy and suppress this warning.
>
>   The LOCATION property should not be read from target "gen_test_char".
> Use
>   the target name directly with add_custom_command, or use the generator
>   expression $<TARGET_FILE>, as appropriate.
>
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at CMakeLists.txt:120 (ELSEIF):
>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>   details.  Use the cmake_policy command to set the policy and suppress
> this
>   warning.
>
>   Quoted variables like "i" will no longer be dereferenced when the policy
> is
>   set to NEW.  Since the policy is not set the OLD behavior will be used.
> Call Stack (most recent call first):
>   CMakeLists.txt:757 (GET_MOD_ENABLE_RANK)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at CMakeLists.txt:766 (IF):
>   Policy CMP0054 is not set: Only interpret if() arguments as variables or
>   keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>   details.  Use the cmake_policy command to set the policy and suppress
> this
>   warning.
>
>   Quoted variables like "APR_HAS_LDAP" will no longer be dereferenced when
>   the policy is set to NEW.  Since the policy is not set the OLD behavior
>   will be used.
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
>
>
>
>
>
>
>
>
> On Fri, Aug 30, 2019 at 2:24 AM Steve Hay <st...@googlemail.com>
> wrote:
>
>> Thanks to you both - that was indeed the trouble, and the fix has
>> sorted it out for me.
>>
>> On Fri, 30 Aug 2019 at 08:16, Stefan Eissing
>> <st...@greenbytes.de> wrote:
>> >
>> > Added to trunk in r1866119.
>> > Merged to 2.4.x in r1866121.
>> >
>> > Thanks for this, Bill!
>> >
>> > > Am 29.08.2019 um 19:05 schrieb William A Rowe Jr <wrowe@rowe-clan.net
>> >:
>> > >
>> > > Index: httpd-2.x/CMakeLists.txt
>> > > ===================================================================
>> > > --- httpd-2.x/CMakeLists.txt  (revision 1866089)
>> > > +++ httpd-2.x/CMakeLists.txt  (working copy)
>> > > @@ -508,7 +508,9 @@
>> > >    modules/lua/lua_vmprep.c           modules/lua/lua_dbd.c
>> > >  )
>> > >  SET(mod_lua_requires                 LUA51_FOUND)
>> > > -SET(mod_md_requires                  OPENSSL_FOUND CURL_FOUND
>> JANSSON_FOUND HAVE_OPENSSL_102)
>> > > +# TODO: _requires does not currently iterate a list, substitute the
>> following once it does;
>> > > +# SET(mod_md_requires                OPENSSL_FOUND CURL_FOUND
>> JANSSON_FOUND HAVE_OPENSSL_102)
>> > > +SET(mod_md_requires                  CURL_FOUND)
>> > >  SET(mod_md_extra_includes            ${OPENSSL_INCLUDE_DIR}
>> ${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
>> > >  SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES}
>> ${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
>> > >  SET(mod_md_extra_sources
>> > > @@ -763,6 +765,7 @@
>> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/session
>> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl
>> > >    ${CMAKE_CURRENT_SOURCE_DIR}/server
>> > > +  ${CMAKE_CURRENT_SOURCE_DIR}/server/mpm/winnt
>> > >    ${APR_INCLUDE_DIR}
>> > >    ${PCRE_INCLUDE_DIR}
>> > >  )
>> >
>>
>

Re: Trouble building 2.4.41 on Windows with CMake

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
However, it fixed it by ignoring most of the troubles... I have my IP
unblocked,
so I'm able to get some further fixes in, I added the iterator, confirmed
the
newest fixes and have committed to trunk and 2.4.x. Steve, please retest and
report back?

There is no such thing as a _102 openssl result macro, that was a big
whoops,
since we never tested for that. And won't need to, ever again... deleted
the
openssl rev test (who would build such an unsupported ancient thing anyways?
Shame on them.) And immediately failed on curl and jansson but for two
different
reasons - reminding us that copy-paste isn't always our friend.

cmake has *long* had a FIND_PACKAGE for curl. Not so much for jansson.
But we didn't follow the missing logic for jansson or for curl, and didn't
invoke
the find facility for curl, so both were AWOL. Didn't matter with my hack,
since
we didn't look for them to be found, and the way I build, all the libs and
includes
are found during the compilation at the anticipated paths... all but the
libcurl_imp.lib which the existing cmake logic overlooked. Easily hardcoded
as;
cmake $(CMAKE_DEFAULTS)
-D CMAKE_INSTALL_PREFIX=$(DESTDIR) \
-D CURL_LIBRARIES=$(DESTDIR)/lib/libcurl_imp.lib

The lesson in this is that there is more to script than what was copied,
it was no different than asking configure.in to work given only half the
necessary lines of configure script, and there are one of two different
patterns that must be followed; either a FIND_PACKAGE implementation
is available in common flavors of cmake for a specific package, or is not.
I guess the ask is not to commit untested build changes, well at least
don't backport them.

The current state of CMake against 3.14 carries the following warnings,
I may or may not get around to addressing some or all of these, if anyone
else is looking for some low hanging fruit...


CMake Warning (dev) at CMakeLists.txt:563 (ELSEIF):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "i" will no longer be dereferenced when the policy
is
  set to NEW.  Since the policy is not set the OLD behavior will be used.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:615 (GET_TARGET_PROPERTY):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the
cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "gen_test_char".  Use
  the target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:120 (ELSEIF):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "i" will no longer be dereferenced when the policy
is
  set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  CMakeLists.txt:757 (GET_MOD_ENABLE_RANK)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:766 (IF):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "APR_HAS_LDAP" will no longer be dereferenced when
  the policy is set to NEW.  Since the policy is not set the OLD behavior
  will be used.
This warning is for project developers.  Use -Wno-dev to suppress it.









On Fri, Aug 30, 2019 at 2:24 AM Steve Hay <st...@googlemail.com>
wrote:

> Thanks to you both - that was indeed the trouble, and the fix has
> sorted it out for me.
>
> On Fri, 30 Aug 2019 at 08:16, Stefan Eissing
> <st...@greenbytes.de> wrote:
> >
> > Added to trunk in r1866119.
> > Merged to 2.4.x in r1866121.
> >
> > Thanks for this, Bill!
> >
> > > Am 29.08.2019 um 19:05 schrieb William A Rowe Jr <wrowe@rowe-clan.net
> >:
> > >
> > > Index: httpd-2.x/CMakeLists.txt
> > > ===================================================================
> > > --- httpd-2.x/CMakeLists.txt  (revision 1866089)
> > > +++ httpd-2.x/CMakeLists.txt  (working copy)
> > > @@ -508,7 +508,9 @@
> > >    modules/lua/lua_vmprep.c           modules/lua/lua_dbd.c
> > >  )
> > >  SET(mod_lua_requires                 LUA51_FOUND)
> > > -SET(mod_md_requires                  OPENSSL_FOUND CURL_FOUND
> JANSSON_FOUND HAVE_OPENSSL_102)
> > > +# TODO: _requires does not currently iterate a list, substitute the
> following once it does;
> > > +# SET(mod_md_requires                OPENSSL_FOUND CURL_FOUND
> JANSSON_FOUND HAVE_OPENSSL_102)
> > > +SET(mod_md_requires                  CURL_FOUND)
> > >  SET(mod_md_extra_includes            ${OPENSSL_INCLUDE_DIR}
> ${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
> > >  SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES}
> ${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
> > >  SET(mod_md_extra_sources
> > > @@ -763,6 +765,7 @@
> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/session
> > >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl
> > >    ${CMAKE_CURRENT_SOURCE_DIR}/server
> > > +  ${CMAKE_CURRENT_SOURCE_DIR}/server/mpm/winnt
> > >    ${APR_INCLUDE_DIR}
> > >    ${PCRE_INCLUDE_DIR}
> > >  )
> >
>

Re: Trouble building 2.4.41 on Windows with CMake

Posted by Steve Hay <st...@googlemail.com>.
Thanks to you both - that was indeed the trouble, and the fix has
sorted it out for me.

On Fri, 30 Aug 2019 at 08:16, Stefan Eissing
<st...@greenbytes.de> wrote:
>
> Added to trunk in r1866119.
> Merged to 2.4.x in r1866121.
>
> Thanks for this, Bill!
>
> > Am 29.08.2019 um 19:05 schrieb William A Rowe Jr <wr...@rowe-clan.net>:
> >
> > Index: httpd-2.x/CMakeLists.txt
> > ===================================================================
> > --- httpd-2.x/CMakeLists.txt  (revision 1866089)
> > +++ httpd-2.x/CMakeLists.txt  (working copy)
> > @@ -508,7 +508,9 @@
> >    modules/lua/lua_vmprep.c           modules/lua/lua_dbd.c
> >  )
> >  SET(mod_lua_requires                 LUA51_FOUND)
> > -SET(mod_md_requires                  OPENSSL_FOUND CURL_FOUND JANSSON_FOUND HAVE_OPENSSL_102)
> > +# TODO: _requires does not currently iterate a list, substitute the following once it does;
> > +# SET(mod_md_requires                OPENSSL_FOUND CURL_FOUND JANSSON_FOUND HAVE_OPENSSL_102)
> > +SET(mod_md_requires                  CURL_FOUND)
> >  SET(mod_md_extra_includes            ${OPENSSL_INCLUDE_DIR} ${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
> >  SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
> >  SET(mod_md_extra_sources
> > @@ -763,6 +765,7 @@
> >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/session
> >    ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl
> >    ${CMAKE_CURRENT_SOURCE_DIR}/server
> > +  ${CMAKE_CURRENT_SOURCE_DIR}/server/mpm/winnt
> >    ${APR_INCLUDE_DIR}
> >    ${PCRE_INCLUDE_DIR}
> >  )
>

Re: Trouble building 2.4.41 on Windows with CMake

Posted by Stefan Eissing <st...@greenbytes.de>.
Added to trunk in r1866119.
Merged to 2.4.x in r1866121.

Thanks for this, Bill!

> Am 29.08.2019 um 19:05 schrieb William A Rowe Jr <wr...@rowe-clan.net>:
> 
> Index: httpd-2.x/CMakeLists.txt
> ===================================================================
> --- httpd-2.x/CMakeLists.txt	(revision 1866089)
> +++ httpd-2.x/CMakeLists.txt	(working copy)
> @@ -508,7 +508,9 @@
>    modules/lua/lua_vmprep.c           modules/lua/lua_dbd.c
>  )
>  SET(mod_lua_requires                 LUA51_FOUND)
> -SET(mod_md_requires                  OPENSSL_FOUND CURL_FOUND JANSSON_FOUND HAVE_OPENSSL_102)
> +# TODO: _requires does not currently iterate a list, substitute the following once it does;
> +# SET(mod_md_requires                OPENSSL_FOUND CURL_FOUND JANSSON_FOUND HAVE_OPENSSL_102)
> +SET(mod_md_requires                  CURL_FOUND)
>  SET(mod_md_extra_includes            ${OPENSSL_INCLUDE_DIR} ${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
>  SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
>  SET(mod_md_extra_sources
> @@ -763,6 +765,7 @@
>    ${CMAKE_CURRENT_SOURCE_DIR}/modules/session
>    ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl
>    ${CMAKE_CURRENT_SOURCE_DIR}/server
> +  ${CMAKE_CURRENT_SOURCE_DIR}/server/mpm/winnt
>    ${APR_INCLUDE_DIR}
>    ${PCRE_INCLUDE_DIR}
>  )


Re: Trouble building 2.4.41 on Windows with CMake

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
Here's the short-term fix if someone would apply it to trunk and 2.4 branch,
it seems a stale password locked me out of https://svn.a.o/

mod_md needs private mpm_winnt.h internals, and we cannot iterate a
_requires list yet.

Index: httpd-2.x/CMakeLists.txt
===================================================================
--- httpd-2.x/CMakeLists.txt (revision 1866089)
+++ httpd-2.x/CMakeLists.txt (working copy)
@@ -508,7 +508,9 @@
   modules/lua/lua_vmprep.c           modules/lua/lua_dbd.c
 )
 SET(mod_lua_requires                 LUA51_FOUND)
-SET(mod_md_requires                  OPENSSL_FOUND CURL_FOUND
JANSSON_FOUND HAVE_OPENSSL_102)
+# TODO: _requires does not currently iterate a list, substitute the
following once it does;
+# SET(mod_md_requires                OPENSSL_FOUND CURL_FOUND
JANSSON_FOUND HAVE_OPENSSL_102)
+SET(mod_md_requires                  CURL_FOUND)
 SET(mod_md_extra_includes            ${OPENSSL_INCLUDE_DIR}
${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
 SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES}
${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
 SET(mod_md_extra_sources
@@ -763,6 +765,7 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/modules/session
   ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl
   ${CMAKE_CURRENT_SOURCE_DIR}/server
+  ${CMAKE_CURRENT_SOURCE_DIR}/server/mpm/winnt
   ${APR_INCLUDE_DIR}
   ${PCRE_INCLUDE_DIR}
 )

On Thu, Aug 29, 2019 at 11:38 AM William A Rowe Jr <wr...@rowe-clan.net>
wrote:

> I have the immediate fix, can commit after lunch.
>
> The *right* fix is to iterate over the _require'ments list, I just took
> the shortcut of reducing this list to cmake (one of the most recent
> additions.) That patch will take a bit longer.
>
>
>
> On Thu, Aug 29, 2019 at 7:50 AM Stefan Eissing <
> stefan.eissing@greenbytes.de> wrote:
>
>> Please have a look at:
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=63672
>>
>> I think this is what you are seeing. We seem to be still looking for the
>> cmake file that works well in all cases.
>>
>> > Am 29.08.2019 um 14:31 schrieb Steve Hay <st...@googlemail.com>:
>> >
>> > I'm getting errors about missing prerequisites when building
>> > httpd-2.4.41 on Windows using CMake (version 3.15.2).
>> >
>> > The modules in question are all optional so should simply be skipped
>> > rather than stopping the build (I'm building with -DENABLE_MODULES=a),
>> > but CMake is giving me an error:
>> >
>> > CMake Error at CMakeLists.txt:770 (IF):
>> >  if given arguments:
>> >
>> >    "NOT" "OPENSSL_FOUND" "CURL_FOUND" "JANSSON_FOUND"
>> > "HAVE_OPENSSL_102" "STREQUAL" ""
>> >
>> >  Unknown arguments specified
>> >
>> > Building with the same command-line worked fine in 2.4.39:
>> >
>> > cmake -DCMAKE_INSTALL_PREFIX=D:\Dev\Temp\mp2\apache -G "NMake
>> > Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_MODULES=a
>> >
>> > Output is attached.
>> >
>> > Any ideas what is going wrong here?
>> > <out.txt>
>>
>>

Re: Trouble building 2.4.41 on Windows with CMake

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
I have the immediate fix, can commit after lunch.

The *right* fix is to iterate over the _require'ments list, I just took the
shortcut of reducing this list to cmake (one of the most recent additions.)
That patch will take a bit longer.



On Thu, Aug 29, 2019 at 7:50 AM Stefan Eissing <st...@greenbytes.de>
wrote:

> Please have a look at:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=63672
>
> I think this is what you are seeing. We seem to be still looking for the
> cmake file that works well in all cases.
>
> > Am 29.08.2019 um 14:31 schrieb Steve Hay <st...@googlemail.com>:
> >
> > I'm getting errors about missing prerequisites when building
> > httpd-2.4.41 on Windows using CMake (version 3.15.2).
> >
> > The modules in question are all optional so should simply be skipped
> > rather than stopping the build (I'm building with -DENABLE_MODULES=a),
> > but CMake is giving me an error:
> >
> > CMake Error at CMakeLists.txt:770 (IF):
> >  if given arguments:
> >
> >    "NOT" "OPENSSL_FOUND" "CURL_FOUND" "JANSSON_FOUND"
> > "HAVE_OPENSSL_102" "STREQUAL" ""
> >
> >  Unknown arguments specified
> >
> > Building with the same command-line worked fine in 2.4.39:
> >
> > cmake -DCMAKE_INSTALL_PREFIX=D:\Dev\Temp\mp2\apache -G "NMake
> > Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_MODULES=a
> >
> > Output is attached.
> >
> > Any ideas what is going wrong here?
> > <out.txt>
>
>

Re: Trouble building 2.4.41 on Windows with CMake

Posted by Stefan Eissing <st...@greenbytes.de>.
Please have a look at: https://bz.apache.org/bugzilla/show_bug.cgi?id=63672

I think this is what you are seeing. We seem to be still looking for the cmake file that works well in all cases.

> Am 29.08.2019 um 14:31 schrieb Steve Hay <st...@googlemail.com>:
> 
> I'm getting errors about missing prerequisites when building
> httpd-2.4.41 on Windows using CMake (version 3.15.2).
> 
> The modules in question are all optional so should simply be skipped
> rather than stopping the build (I'm building with -DENABLE_MODULES=a),
> but CMake is giving me an error:
> 
> CMake Error at CMakeLists.txt:770 (IF):
>  if given arguments:
> 
>    "NOT" "OPENSSL_FOUND" "CURL_FOUND" "JANSSON_FOUND"
> "HAVE_OPENSSL_102" "STREQUAL" ""
> 
>  Unknown arguments specified
> 
> Building with the same command-line worked fine in 2.4.39:
> 
> cmake -DCMAKE_INSTALL_PREFIX=D:\Dev\Temp\mp2\apache -G "NMake
> Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_MODULES=a
> 
> Output is attached.
> 
> Any ideas what is going wrong here?
> <out.txt>