-
Notifications
You must be signed in to change notification settings - Fork 503
fix compile with Visual Studio on windows #720
Conversation
@dktapps I applied the patch to the fork by @sirsnyder The test results aren't bad:
See https://ci.appveyor.com/project/SirSnyder/pthreads-ftdtq/build/feature/winbuild.13 (at the bottom) |
Try changing this line in appveyor.yml
to
to see what Appveyor makes of your patch to @krakjoe 's version. |
I attempted to set-up an environment matrix for AppVeyor on my own fork to have it build for 7.0 and 7.1 both, but it was too much of a pain. |
Ah. AppVeyor won't build this PR anyway, the appveyor.yml is configured to build master only. |
No, pthreads master is now restricted to build with PHP 7.2 only:
See 5bb2058 |
You removed your commit, but the Appveyor output is still there ;-) |
My branch doesn't have the commit which prevents building on < 7.2... not sure what's going on there. I don't have VS2017 on my machine at the moment because I still need VS2015 for various things, so I can't test this against 7.2 immediately. I'll have to see if I can get them to coexist. |
Your patch is againts @krakjoe's version, which has the commit.. There is no problem in having VS2017 besides VS2015, with one caveat: |
My last commit fixes AppVeyor to build against 7.2dev, but don't be fooled by the test result - there's something wrong with pthreads on 7.2 with Windows (the exact same build process worked perfectly with 7.1 and all tests succeeded (without the last 5 commits to master or so)) - lots of the tests fail for reasons I can't explain. |
See https://www.apachelounge.com/posting.php?mode=editpost&p=30903 for my builds php /php-sdk/php72dev/run-tests.php /php-sdk/php72dev/ext/pthreads/tests/*.phpt
php.ini: |
It must be something in the test setup. I downloaded your master artificial and ran the tests with a php.ini:
|
since php 7.2 the only supported compiler will be vs2017 (VC15), not vs2015 (VC14) in case you don't know, and unsure if relevant information... |
@Jan-E if you run the tests with |
@dktapps With the php_pthreads.dll from the Appveyor build I have no failing tests. With my build, this resulted in a Unhandled exception: read access violation aka a crash:
The crash is not detected by run-tests.php, but volatile-objects.out is just 0 bytes. I am trying to find out what is the difference between your Appveyor build and mine. Maybe it is my custom pthreadsVC2.lib/dll (with a pthreadsVC2.pdb, maybe it is because you are building PHP 7.2.0-dev and I build PHP 7.2.0-beta1.
Strange. See my tests with the master artefact that I downloaded from the Appveyor build. Did you use that one as well? |
Downloaded http://windows.php.net/downloads/qa/php-7.2.0beta1-Win32-VC15-x86.zip added php_pthreads.dll and pthreadVC2.dll from the master artefact, added a php.ini and a tests.bat. Result:
|
Yep, doesn't matter what version I use, I see this at random intervals:
AppVeyor is being even more strange by frequently declaring that random pthreads classes don't exist. I don't know what's going on there. |
I do not know either what is going wrong. I rebuilt my ptreadsVC2.dll/lib, cloned this repo master, applied your patch and now got this result:
I am now building the x64 version. |
x64 build results:
|
Try setting TEST_PHP_EXECUTABLE before running run-tests.php, do not use the -p. |
@dktapps Maybe change the title and add VS2017. |
Thanks. Maybe I will try to fix the test setup now. |
@krakjoe If I do a git checkout 5272863 and apply @dktapps 's patch, below is the effect on PHP 7.1, Line 38 in 5bb2058
Time to revert (parts of) 5bb2058 ???
|
Wow. Am I reading this right? Is ZTS in PHP 7.0 and 7.1 broken, regardless of pthreads? That would justify an ABI break in the ZTS builds of 7.0 and 7.1... |
#722 I'm feeling lucky. Direct hit: |
AF_UNIX
is defined inWinSock2.h
which is included byphp_network.h
, meaningAF_UNIX
is never not defined. However, Windows doesn't support Unix domain sockets.This fixes #713 .