daleksprinter / dotfiles

My Dotfiles
0 stars 0 forks source link

phpbrew導入 #8

Open daleksprinter opened 1 year ago

daleksprinter commented 1 year ago

https://github.com/phpbrew/phpbrew phpenv脱却したいので

daleksprinter commented 1 year ago

phpbrew自体の導入はすんなりいったけど、phpのbuildに失敗

~ phpbrew install 7.2.34
===> phpbrew will now build 7.2.34
You haven't enabled any variants. The default variant will be enabled:
[bcmath, bz2, calendar, cli, ctype, dom, fileinfo, filter, ipc, json, mbregex, mbstring, mhash, pcntl, pcre, pdo, pear, phar, posix, readline, sockets, tokenizer, xml, curl, openssl, zip]
Please run 'phpbrew variants' for more information.

===> Loading and resolving variants...
Homebrew prefix "/usr/local/opt/mhash" does not exist.
Downloading https://www.php.net/distributions/php-7.2.34.tar.bz2 via curl extension
[==================================================================] 14.53/14.53MB 100%
===> Extracting /Users/r-sekine/.phpbrew/distfiles/php-7.2.34.tar.bz2 to /Users/r-sekine/.phpbrew/build/tmp.1682171798/php-7.2.34
===> Moving /Users/r-sekine/.phpbrew/build/tmp.1682171798/php-7.2.34 to /Users/r-sekine/.phpbrew/build/php-7.2.34
Running make clean to ensure everything will be rebuilt.
Makefile not found in path /Users/r-sekine/.phpbrew/build/php-7.2.34
===> Checking patches...
Checking patch for replace apache php module name with custom version name
Checking patch for replace freetype-config with pkg-config on php older than 7.4
Checking patch for fix readline detection on PHP 5.3 to PHP 7.1
---> Applying patch...
patching file ext/readline/config.m4
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file ext/readline/config.m4.rej

Patch failed
0 changes patched.
===> Configuring 7.2.34...

Use tail command to see what's going on:
   $ tail -F '/Users/r-sekine/.phpbrew/build/php-7.2.34/build.log'
daleksprinter commented 1 year ago

https://blog.siwa32.com/phpbrew_zlib_error/

https://laboliy.com/worklog-phpbrew-php-7-8/#rtoc-13

The last 5 lines in the log file:
/usr/local/opt/openssl@3/include/openssl/rsa.h:295:29: note: passing argument to parameter 'rsa' here

                       RSA *rsa, int padding);

                            ^

107 warnings and 1 error generated.

make: *** [ext/openssl/openssl.lo] Error 1

同じ問題が再現した

daleksprinter commented 1 year ago

phpbrew install 7.2.34 +default +zlib="$(brew --prefix zlib)" +openssl=/opt/homebrew/opt/openssl@1.1

Error: Configure failed:
The last 5 lines in the log file:
checking for Kerberos support... no

checking whether to use system default cipher list instead of hardcoded value... no

checking for RAND_egd... no

checking for pkg-config... /usr/local/bin/pkg-config

configure: error: Cannot find OpenSSL's <evp.h>

あ〜

daleksprinter commented 1 year ago

一旦今すぐ必要なわけではないのでpending