-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Disable tsrm_ls_cache usage on Cygwin #16920
Conversation
Otherwise, `--enable-opache-jit` won't even build there.
So that means we'd be returning 0 on Cygwin from php-src/ext/opcache/jit/zend_jit_ir.c Line 3243 in cd977ae
|
I have no idea about the details. I haven't used Cygwin for many years (and frankly, I don't see much point in using this at all nowadays, given that there is WSL2). What I know is that a swoole user/developer confirmed that the patch would work for them. And I know that If JIT does not work at all on Cygwin, we should disable |
Well I can't test this easily, but usually when a platform isn't supported it's not enough to just stub out the return value, see e.g. #16902 (comment) |
I had a closer look, and possibly #16568 is the proper solution (they actually And thinking about that more, we cannot apply #16568, since that would kill phpize builds of OPcache JIT (possible done by distros). Not sure what to do. |
I would expect it just uses the same TLS mechanism as the win32 subsystem does, so I can try to have a brief look to see how this would play out. Would need to install Cygwin and figure out how that works so see you in a bit I guess... |
I think I can do that. Have a little bit of experience with Cygwin at least. |
Well I also just got a Cygwin system going, just had to compile&install re2c manually, it's currently compiling php-src. |
It also goes wrong with the fiber asm, always fun to see at the end of a slow compile that I had to pass |
Well, it might not matter anyway as opcache doesn't seem to load for me (curiously I only get an .a archive file):
and come to think of it, is the PHP_WIN32 flag even defined? I don't think so. But that would break opcache anyway as we have some EDIT: we should probably just discourage people from building with Cygwin anyway since this is probably just the tip of the iceberg... |
See https://bugs.php.net/bug.php?id=65497. :) How did you build? On Cygwin, you can run .bat files, but you're not supposed to do that for native Cygwin builds. So you could do
Need to do this now. :) |
Hm, so it's not working at all anyway? I'm not sure what to make of this tbh. How are the swoole people running opcache then (on Cygwin)?
This means opcache will have issues with ASLR that are not properly mitigated. |
Not sure. This was long time ago, and maybe I've just screwed up back then.
I don't know if they actually run it. The CI was only about building, but no tests. |
Then I guess this is enough as I don't think opcache (and therefore the JIT) can work anyway... |
Well, but why would they even build with OPcache enabled, if it can't be used? I'm still trying to complete a minimal build on Cygwin. I've also stumbled upon |
Because they're doing hacky stuff to compile opcache statically: I don't want to support any of this, they seem that they don't know what they're doing with this code. |
Ah, completely forgot about that ticket. Then I agree it's good enough to fix the build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good enough for now
Just in case someone wants to pursue this
I can imagine that you would need to link against import libraries, in this case likely php.dll, but there is no such DLL; instead there is a big php.exe.
Indeed. There's likely a lot of work to do to have a reliable build. |
Otherwise,
--enable-opache-jit
won't even build there.Note that this is supposed to supersede #16568.