Windows Build
krakjoe opened this issue · comments
Hi @weltling, please could you fix this up with some appveyor goodness for me ?
It has a dep on pthreads-w32, and I think the config.w32 is correct.
PHP 7.3.1 NTSx64:
N:\php-sdk\php73dev>nmake php_sandbox.dll
Microsoft (R) Program Maintenance Utility Version 14.16.27025.1
Copyright (C) Microsoft Corporation. All rights reserved.
"cl.exe" /I "../win64build.vc15\include" /DHAVE_PTHREAD_H=1 /DHAVE_SCHED_H=1 /D COMPILE_DL_SANDBOX /D SANDBOX_EXPORTS=1 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 /Iext\sandbox /nologo /I . /I main /I Zend /I TSRM /I ext /D _WINDOWS /D WINDOWS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 /D _USE_MATH_DEFINES /FD /wd4996 /Qspectre /guard:cf /Zc:inline /Gw /Zc:__cplusplus /MP /Zi /LD /MD /W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0 /I "../win64build.vc15\include" /D FD_SETSIZE=256 /DHAVE_ARGON2ID_HASH_RAW=1 /FoN:\php-sdk\php73dev\x64\Release\ext\sandbox\ /FpN:\php-sdk\php73dev\x64\Release\ext\sandbox\ /FRN:\php-sdk\php73dev\x64\Release\ext\sandbox\ /FdN:\php-sdk\php73dev\x64\Release\ext\sandbox\ /c ext\sandbox\sandbox.c
sandbox.c
"cl.exe" /I "../win64build.vc15\include" /DHAVE_PTHREAD_H=1 /DHAVE_SCHED_H=1 /D COMPILE_DL_SANDBOX /D SANDBOX_EXPORTS=1 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 /Iext\sandbox /nologo /I . /I main /I Zend /I TSRM /I ext /D _WINDOWS /D WINDOWS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 /D _USE_MATH_DEFINES /FD /wd4996 /Qspectre /guard:cf /Zc:inline /Gw /Zc:__cplusplus /MP /Zi /LD /MD /W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0 /I "../win64build.vc15\include" /D FD_SETSIZE=256 /DHAVE_ARGON2ID_HASH_RAW=1 /FoN:\php-sdk\php73dev\x64\Release\ext\sandbox\src\ /FpN:\php-sdk\php73dev\x64\Release\ext\sandbox\src\ /FRN:\php-sdk\php73dev\x64\Release\ext\sandbox\src\ /FdN:\php-sdk\php73dev\x64\Release\ext\sandbox\src\ /c ext\sandbox\src\copy.c ext\sandbox\src\monitor.c ext\sandbox\src\sandbox.c
copy.c
monitor.c
sandbox.c
ext\sandbox\src\copy.c(107): warning C4244: '=': conversion from '__int64' to 'uint32_t', possible loss of data
ext\sandbox\src\copy.c(119): warning C4244: '=': conversion from '__int64' to 'uint32_t', possible loss of data
ext\sandbox\src\sandbox.c(143): warning C4013: 'ts_resource' undefined; assuming extern returning int
ext\sandbox\src\sandbox.c(143): warning C4047: '=': 'void ***' differs in levels of indirection from 'int'
ext\sandbox\src\sandbox.c(275): warning C4047: '=': 'void ***' differs in levels of indirection from 'int'
ext\sandbox\src\sandbox.c(281): warning C4013: 'TSRM_UNSHUFFLE_RSRC_ID' undefined; assuming extern returning int
ext\sandbox\src\sandbox.c(281): error C2065: 'sapi_globals_id': undeclared identifier
ext\sandbox\src\sandbox.c(321): warning C4013: 'ts_free_thread' undefined; assuming extern returning int
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe"' : return code '0x2'
Stop.
Is it TS only? Compiles OK for PHP 7.2.14 TS x86.
Yes, it requires ZTS ... mentioned in readme but not enforced by configure ...
config.w32:
if (PHP_ZTS == "no") {
WARNING("Sandbox extension requires ZTS build of PHP on windows");
} else {
etc
}
PR #3
https://phpdev.toolsforresearch.com/php-7.3.1-Win32-VC15-x64.htm
https://phpdev.toolsforresearch.com/php-7.3.1-Win32-VC15-x64.zip
Missing 2 OK's in tests\004.phpt
TEST 4/22 [N:\php-sdk\php71dev\ext\sandbox\tests\004.phpt]
========DIFF========
002- OK
003- OK
========DONE========
FAIL Check sandbox closed [N:\php-sdk\php71dev\ext\sandbox\tests\004.phpt]
=====================================================================
Number of tests : 22 22
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 1 ( 4.5%) ( 4.5%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 21 ( 95.5%) ( 95.5%)
---------------------------------------------------------------------
Time taken : 2 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Check sandbox closed [N:\php-sdk\php71dev\ext\sandbox\tests\004.phpt]
=====================================================================
php.ini
[PHP]
extension_dir = "ext"
extension=sandbox
That's it for now. Time for @weltling to do some Appveyor magic.
I know what that crash is ... will fix that ... thanks :)
Got it, all tests should pass now ...
OK!
=====================================================================
Number of tests : 22 22
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 22 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken : 2 seconds
=====================================================================
We are basically Windows gods right now ... if not, demi-gods ... with cloaks ... and I even have an English accent ...
@krakjoe seems this project is not enabled on AppVeyor yet. Could you do it please?
Thanks.
Thanks @weltling :)
I did enable it before posting this: https://ci.appveyor.com/project/krakjoe/sandbox
It says something I don't understand ?
Edit: oh I think I had it set on the wrong branch, says it's building but I think that's because I triggered a new build ... do we need to do anything else ?
LGTM, ... I'l let you close when it LGTY ... thanks muchly :)
@krakjoe i've pushed one follow up commit, but it doesn't seem building. Perhaps it'll build yours? Not sure which config is that supposed to be :/
Thanks.
Ah it was the branches: list in config, and the wrong default branch in av ui ... I think ... it built my last commit automatically, feel free to make another test commit just to be sure ...
Yeah, everything's roger now :) Closing.
Thanks.