-
Notifications
You must be signed in to change notification settings - Fork 365
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
Use custom OpenSSL libs for OpenSSLDSOPatch #1186
base: master
Are you sure you want to change the base?
Use custom OpenSSL libs for OpenSSLDSOPatch #1186
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.2s
was used:I wasn't able just to update
/usr/local/opt/openssl
as it was breaking my currentphp-7.3.6
. So I compiledOpenSSL 1.0.2s
at/usr/local/openssl/1.1.1g
, and was usingexport PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/openssl/1.1.1g/lib/pkgconfig
beforephpbrew install...
call. But it still was causing the same error during the build. After some debugging I found out thatOpenSSLDSOPatch
is 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?