Use custom OpenSSL libs for OpenSSLDSOPatch#1186
Use custom OpenSSL libs for OpenSSLDSOPatch#1186SerheyDolgushev wants to merge 1 commit intophpbrew:masterfrom
Conversation
|
Ping @morozov (sorry, if you are the wrong person, I saw your name in the latest commits). |
If you mean 01de86c, it's just a code formatting change. I never modified this patch or used it myself.
Would it make sense to just disable the patch in this case? As far as I understand, even with this change, your case requires some trickery.
If you want to use multiple library versions for multiple PHP versions, should you be building PHP against a specific OpenSSL version, not just Also, according to php/php-src#2667 (comment), it should be possible to build PHP 7.3 against OpenSSL 1.1 and it actually is possible in my case: Why do you need to use multiple OpenSSL versions at a time? |
|
homebrew had upgraded openssl to 3.x, and php doesn't build with that currently. I need to use openssl@1.1 for building php while not breaking other things that rely on /usr/local/opt/openssl, and I ran into the same scenario. |
I can confirm I had the same issues with https://formulae.brew.sh/formula/openssl@3 last week. So the easiest way to reproduce this issues is:
And instead of getting installed PHP 8.1.1, you will get an OpenSSL error message. |
@jhdxr can you please have a look at this one? |
|
I belive I'm having a very similar issue, see #1274 |
|
The OpenSSL version error is caused by using the wrong OpenSSL version. Unfortunately the PHP compilation is quite bad in terms of requirement communication, and PHPBrew has nothing for it either. You can specify the version you desire like so: |
I had a funny case recently:
Have already installed
php-7.3.6, which usesOpenSSL 1.0.2s:Wanted to install
php-7.4.6, which requiresOpenSSL 1.1.1g. I was getting following errors during the build whenOpenSSL 1.0.2swas used:I wasn't able just to update
/usr/local/opt/opensslas it was breaking my currentphp-7.3.6. So I compiledOpenSSL 1.0.2sat/usr/local/openssl/1.1.1g, and was usingexport PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/openssl/1.1.1g/lib/pkgconfigbeforephpbrew install...call. But it still was causing the same error during the build. After some debugging I found out thatOpenSSLDSOPatchis causing it.So this PR allows to:
Use custom OpenSSL libs for
OpenSSLDSOPatch, they just need to be linked to/usr/local/opt/phpbrew/openssl/lib. And maybe it worth to add some notice message when this patch is applied?