-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Rewrite to be based on php-build #72
Comments
Better yet, why not install php precompiled? That would make the plugin so much easier to use (no need to install build dependencies and wait for php to compile etc.) Side rant: I can't believe it's 2021 and we still haven't shaken this "compile everything" idea in general oss. Right now, right this very second, there's millions of compiles of the same thing happening all over the world. |
I don't mind. PR is always welcome. |
Perhaps supporting both initially is the way to go. How about we transition to php-build but we cache the builds of individual versions somewhere online? So when someone wants to install a specific version, we:
Then the obvious question is, where can we host the builds for free? What do you think? |
The biggest issue is how to distribute the cache as you mentioned. Also, I'm not really familiar with PHP, but are they really relocatable? At this point, I don't have a clear ETA for php-build migration, so if you want to work on it, I recommend that you start by migrating to it first. |
Sadly I'm not familiar with PHP either. My only contribution was the comment about avoiding compilation if possible but in retrospect it's not really useful. |
In fact, there is no incentive to host the cache at all, and implementing something to make sure the cache is safe is quite a hassle. And we need to minimize the dependencies that it requires, and I don't want to do that. I won't stop if someone does it in another plugin, but I absolutely don't want to distribute third-party caches to users through this plugin. |
I looked into this a bit. IMHO this codebase is way better organized, and actually supports a greater set of options than php-build. I'd vote for not moving over to use php-build. |
The advantage of using php-build is that it can support more versions. Our current code only targets the latest version and does not support older versions. (There are some versions that can be built, but we can't say that they are officially supported.) |
True, although there are some tradeoffs to consider. The downside is there are a lot of compilation options which are not supported in php-build ( We could expand the PHP version matrix in this github workflow to cover more PHP versions, although we still wouldn't have the larger test suite available to us and there would still be duplicated efforts. |
I don't think so: https://github.com/php-build/php-build/blob/master/man/php-build.1.ronn#environment |
Somehow I had to come back to the PHP world. I've read some PR, but I'm sure what we need now is to rewrite the php-build based plugin. Does anyone want to tackle it? |
If you want to provide precompiled PHP, you have to also provide precompiled versions of many libraries used by PHP, for example OpenSSL, icu and others since PHP depends on them and user's system can have variety of versions (especially major versions). |
There are currently not enough main maintainers for this plugin, so it would be nice if someone could do it. Furthermore, if anyone would like to replace this with a php-build-based implementation, I'd be happy to help. |
I did some investigation, I still have CI broken for example (https://github.com/Tarik02/asdf-php). However this works for my local machine (Arch) it does not work on latest ubuntu machines. As I discovered, the problem is that ubuntu includes libxml which itself uses libicu (which I built together with php) of different version. So, now I see the only approach is to build most of dependencies before building PHP and use them, e.g. whole prefix with dependencies for it. I'm gonna do more investigation about this. For arch, it builds (assuming you have the needed dependencies) most verions like 5.6.40, 7.0.33, 7.1.33, 7.4, 8.1.10 and they work as expected. But for ubuntu it's completely broken. |
Ok so, I just read this thread after mentioning you elsewhere @smorimoto. I think moving to As far as @moljac024's argument against building from source: I understand the frustration but the alternative requires quite a bit of work to streamline. Either way you go about it, it comes with it's own downsides. At least building from source keeps things relatively straight forward as most operating systems have or had access to the dependencies at some point in time. |
there are a lot of deprecated packages required by php <= 7. No easy way to work with them. |
There is no benefit on our side to managing this too complex shell nightmare, and it should be managed centrally if possible.
The text was updated successfully, but these errors were encountered: