Stab in the dark attempt at fixing the Windows CI#647
Closed
notroj wants to merge 5 commits into
Closed
Conversation
* CMakeLists.txt: Fix CMake generation failure with non-MSVC compilers (e.g. MinGW GCC) caused by unconditional use of $<TARGET_PDB_FILE:...> generator expressions, which are only supported by the MSVC linker. Guard all TARGET_PDB_FILE usage with IF(INSTALL_PDB), and default INSTALL_PDB to OFF for non-MSVC compilers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* CMakeLists.txt: TARGET_COMPILE_DEFINITIONS does not correctly handle
values with spaces for MinGW windres, which invokes cc1.exe as its
preprocessor. Defines like LONG_NAME="Apache HTTP Server htdbm
program" get split on spaces, causing "fatal error: HTTP\: No such
file or directory" and similar errors. LONG_NAME, BIN_NAME,
APP_FILE, and ICON_FILE are only used in build/win32/httpd.rc, so
generate per-target wrapper .rc files with these defines baked in as
#define directives, then #include the real httpd.rc. This avoids
command-line quoting entirely.
Also fix TARGET_COMPILE_OPTIONS in the standard_support FOREACH loop
which incorrectly referenced ${mod_name} from the outer modules loop
instead of ${pgm}.
Claude's explanation of the root cause:
Root cause: Commit ed4ffd0 replaced the DEFINE_WITH_BLANKS() macro with
TARGET_COMPILE_DEFINITIONS(), which correctly handles spaces for the C compiler but NOT for MinGW's
windres.exe. The resource compiler invokes cc1.exe as its preprocessor, and -DLONG_NAME="Apache HTTP
Server htdbm program" gets split on spaces — each word after Apache gets treated as an input file,
causing the fatal error: HTTP\: No such file or directory errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* CMakeLists.txt (GENERATE_RC_FILE): For MinGW, compile the .rc file
via ADD_CUSTOM_COMMAND with only the include paths actually needed
by httpd.rc (just ${CMAKE_SOURCE_DIR}/include for ap_release.h).
This avoids passing all target include directories to windres, which
cannot handle -I paths containing spaces such as the default
CMAKE_INSTALL_PREFIX of "C:/Program Files (x86)/HTTPD/include".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* CMakeLists.txt: ap_config.h includes ap_config_auto.h when __MINGW32__ is defined, but autoconf is not used in the CMake build so the file does not exist. Generate an empty one in the build directory to satisfy the include. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* modules/arch/win32/mod_win32.c (set_interpreter_source): Change third parameter from char * to const char * to match the AP_INIT_TAKE1 function signature. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
Made it worse, I give up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.