Reputation: 2339
I am creating a custom build in windows for php 7.0.4. All good when following the process in https://wiki.php.net/internals/windows/stepbystepbuild until nmake snap. When I do nmake after the building of config it was giving me some errors and exiting with error 1077. So as per the VS Documentation https://msdn.microsoft.com/en-us/library/dt309377.aspx I used /I to ignore errors and build further.
The issue is -> I am getting a x86 build instead of x64 build
. Second, rather than a clear build I am getting a manifest and development source.
I am not able to compile it further to .exe. The command I an using to build is simple and is configure --disable-all --enable-cli --enable-cgi --with-pgo --enable-snapshot-build
. It is a simple build for just php.exe, php-cgi.exe with pgo enabled.
What am I doing wrong? Any help is welcome.
UPDATE
I found out that --with-pgo
or adding any other extensions to the configure line is the culprit of the error 1077. Could this be due to lack of dependencies in the deps
folder? But I still cannot explain why a X86 dist is getting into X64 folder. I at times get an error saying the inbuilt build configuration does not match the X64 folder specification. Not sure whats happening not able to replicate issues other than 1077 by enabling the extra extensions.
Upvotes: 0
Views: 119
Reputation: 2339
The issues were of fatal error 1077 resolved by removing --with-pgo
from the configure script. The build process for it (optimizing in PHP7) has different steps than what is there in the docs for normal compiling
The issue of X86 getting built instead of X64 was due to environment architecture of the cl.exe in vc developer command prompt. It was set to x86. I changed it by providing the command vcvarsall X64
and the configure command, nmake command worked creating the build for X64.
Special note of Thanks to the Windows PHP team, especially Pierre for identifying it.
Upvotes: 0
Reputation: 11
You may want to have a look at this https://github.com/johmue/win-php-sdk-builder github project.
Upvotes: 1