microsoft / php-sdk-binary-tools

Tool kit for building PHP under Windows
BSD 2-Clause "Simplified" License
270 stars 79 forks source link

how to build #41

Closed Gemorroj closed 6 years ago

Gemorroj commented 6 years ago
s:\VCS\Git\php-sdk-binary-tools>phpsdk-vc15-x64.bat
[vcvarsall.bat] Environment initialized for: 'x64'

PHP SDK 2.1.8-dev

OS architecture:    64-bit
Build architecture: 64-bit
Visual C++:         15
PHP-SDK path:       s:\VCS\Git\php-sdk-binary-tools

s:\VCS\Git\php-sdk-binary-tools
$ cd phpmaster\vc15\x64\php-src

s:\VCS\Git\php-sdk-binary-tools\phpmaster\vc15\x64\php-src
$ buildconf.bat
Rebuilding configure.js
Now run 'configure --help'

s:\VCS\Git\php-sdk-binary-tools\phpmaster\vc15\x64\php-src
$ configure --enable-cli --disable-all
PHP Version: 7.4.0-dev

Saving configure options to config.nice.bat
Checking for cl.exe ...  <in default path>
  Detected compiler MSVC15 (Visual C++ 2017)
  Detected 64-bit 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>
Checking for sed.exe ...  <in default path>
Checking for re2c.exe ...  <in default path>
  Detected re2c version 1.0.3
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 ...  <not found>
Checking for mt.exe ...  <not found>
Enabling multi process build

Build dir: S:\VCS\Git\php-sdk-binary-tools\phpmaster\vc15\x64\php-src\x64\Release_TS
PHP Core:  php7ts.dll and php7ts.lib

Checking for wspiapi.h ...  <not found>
Checking for wspiapi.h ...  <not found>
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\pcre
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
        [content unchanged; skipping]
Generating main/config.w32.h
Generating phpize
Done.

Enabled extensions:
-----------------------
| Extension  | Mode   |
-----------------------
| date       | static |
| pcre       | static |
| reflection | static |
| spl        | static |
| standard   | static |
-----------------------

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

------------------------------------------------
|                   |                          |
------------------------------------------------
| Build type        | Release                  |
| Thread Safety     | Yes                      |
| Compiler          | MSVC15 (Visual C++ 2017) |
| Architecture      | x64                      |
| Optimization      | PGO disabled             |
| Native intrinsics | SSE2                     |
| Static analyzer   | disabled                 |
------------------------------------------------

Type 'nmake' to build PHP

s:\VCS\Git\php-sdk-binary-tools\phpmaster\vc15\x64\php-src
$ nmake

Служебная программа обслуживания программ Microsoft (R), версия 14.14.26433.0
(C) Корпорация Майкрософт (Microsoft Corporation).  Все права защищены.

        "" -h win32\ -r S:\VCS\Git\php-sdk-binary-tools\phpmaster\vc15\x64\php-src\x64\Release_TS\ -x S:\VCS\Git\php-sdk-binary-tools\phpmaster\vc15\x64\php-src\x64\Release_TS\ win32\build\wsyslog.mc
"-h" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
NMAKE : fatal error U1077: " : возвращенный код "0x1"
Stop.

see https://github.com/php/php-src/blob/master/win32/build/Makefile#L117 Apparently, I have not set the variable MC. Can you help?

weltling commented 6 years ago

On my side, while on the SDK shell, it shows

$ where mt.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\mt.exe
C:\Program Files (x86)\Windows Kits\10\bin\x64\mt.exe

It it's not found, it might indicate none of the Windows SDK is installed. The fact it starts the shell on your side at all means, that the C++ component is installed however.

Thanks.

Gemorroj commented 6 years ago

Thank you! Works now. It would be nice to specify in readme exactly what VS components are required for correct works.

weltling commented 6 years ago

Thanks for the further check. Not sure vswhere could check the Windows SDK presence, but it shuld be in any case possible to add a check for mc.exe directly.

Thanks.