Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build on Windows #106

Open
benjivm opened this issue Apr 1, 2024 · 0 comments
Open

Can't build on Windows #106

benjivm opened this issue Apr 1, 2024 · 0 comments

Comments

@benjivm
Copy link

benjivm commented Apr 1, 2024

Hey there, I am trying to build from source but am encountering an error:

...
.\ext\pcov/php_pcov.h(59): error C2061: syntax error: identifier 'pcre_cache_entry' (compiling source file main\internal_functions.c)
.\ext\pcov/php_pcov.h(67): error C2059: syntax error: '}' (compiling source file main\internal_functions.c)
...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe"' : return code '0x2'

The configure command I'm using:

configure --disable-all --disable-zts --enable-cli --enable-pcov

Output:

PHP Version: 8.3.6-dev

Saving configure options to config.nice.bat
Checking for cl.exe ...  <in default path>
  Detected compiler Visual C++ 2019
  Detected x64 compiler
Checking for link.exe ...  <in default path>
Checking for nmake.exe ...  <in default path>
Checking for lib.exe ...  <in default path>
Checking for bison.exe ...  <in default path>
  Detected bison version 3.3.2
Checking for sed.exe ...  <in default path>
Checking for re2c.exe ...  <in default path>
  Detected re2c version 1.1.1
Checking for zip.exe ...  <in default path>
Checking for lemon.exe ...  <in default path>
Checking for 7za.exe ...  <in default path>
Checking for mc.exe ...  C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64
Checking for mt.exe ...  C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64
Enabling multi process build

Build dir: C:\php-sdk\phpmaster\vs16\x64\php-src\x64\Release
PHP Core:  php8.dll and php8.lib
Checking for ML64.exe ...  <in default path>

Checking for wspiapi.h ...  <in default path>
Enabling IPv6 support
Enabling SAPI sapi\cli
Checking for library edit_a.lib;edit.lib ... <in deps path> \lib\edit_a.lib
Checking for editline/readline.h ...  <in deps path> \include
Enabling extension ext\date
Enabling extension ext\hash
Checking for KeccakHash.h ...  ext/hash/sha3/generic64lc
Checking for PMurHash.h ...  ext/hash/murmur
Checking for xxhash.h ...  ext/hash/xxhash
Enabling extension ext\json
Enabling extension ext\pcov
Enabling extension ext\pcre
Enabling extension ext\random
Enabling extension ext\reflection
Enabling extension ext\spl
Checking for timelib_config.h ...  ext/date/lib
Enabling extension ext\standard

Creating build dirs...
Generating files...
Generating Makefile
Generating main/internal_functions.c
Generating main/config.w32.h
Generating phpize
Done.



Enabled extensions:
-----------------------
| Extension  | Mode   |
-----------------------
| date       | static |
| hash       | static |
| json       | static |
| pcov       | static |
| pcre       | static |
| random     | static |
| reflection | static |
| spl        | static |
| standard   | static |
-----------------------


Enabled SAPI:
-------------
| Sapi Name |
-------------
| cli       |
-------------


-----------------------------------------
|                     |                 |
-----------------------------------------
| Build type          | Release         |
| Thread Safety       | No              |
| Compiler            | Visual C++ 2019 |
| Target Architecture | x64             |
| Host Architecture   | x64             |
| Optimization        | PGO disabled    |
| Native intrinsics   | SSE2            |
| Static analyzer     | disabled        |
-----------------------------------------


Type 'nmake' to build PHP

nmake output:

Microsoft (R) Program Maintenance Utility Version 14.29.30154.0
Copyright (C) Microsoft Corporation.  All rights reserved.

SAPI.c
fopen_wrappers.c
getopt.c
internal_functions.c
main.c
network.c
output.c
php_content_types.c
php_ini.c
php_ini_builder.c
php_odbc_utils.c
php_open_temporary_file.c
php_scandir.c
php_syslog.c
php_ticks.c
php_variables.c
.\ext\pcov/php_pcov.h(59): error C2061: syntax error: identifier 'pcre_cache_entry' (compiling source file main\internal_functions.c)
.\ext\pcov/php_pcov.h(67): error C2059: syntax error: '}' (compiling source file main\internal_functions.c)
reentrancy.c
rfc1867.c
safe_bcmp.c
snprintf.c
spprintf.c
strlcat.c
strlcpy.c
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe"' : return code '0x2'
Stop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant