DomBlack / php-scrypt

A PHP wrapper fo the scrypt hashing algorithm
Other
209 stars 57 forks source link

Please release fix for PHP 8.0 #62

Closed kocsismate closed 2 years ago

kocsismate commented 2 years ago

Could you please release a new version which contains the PHP 8.0 related fix from the master branch?

Meldiron commented 2 years ago

I think we are encountering the same problem, also on PHP 8+. This is log from installation:

> [appwrite_appwrite-executor scrypt 1/1] RUN   git clone --depth 1 --branch v1.4.2 https://github.com/DomBlack/php-scrypt.git &&   cd php-scrypt &&   phpize &&   ./configure --enable-scrypt &&   make && make install:
#0 2.915 Cloning into 'php-scrypt'...
#0 3.364 Note: switching to '9372e577ded13b37fc265a7e3f86eb89f53ea169'.
#0 3.364 
#0 3.364 You are in 'detached HEAD' state. You can look around, make experimental
#0 3.364 changes and commit them, and you can discard any commits you make in this
#0 3.364 state without impacting any branches by switching back to a branch.
#0 3.364 
#0 3.364 If you want to create a new branch to retain commits you create, you may
#0 3.364 do so (now or later) by using -c with the switch command. Example:
#0 3.364 
#0 3.364   git switch -c <new-branch-name>
#0 3.364 
#0 3.364 Or undo this operation with:
#0 3.364 
#0 3.364   git switch -
#0 3.364 
#0 3.364 Turn off this advice by setting config variable advice.detachedHead to false
#0 3.364 
#0 3.372 Configuring for:
#0 3.372 PHP Api Version:         20200930
#0 3.372 Zend Module Api No:      20200930
#0 3.372 Zend Extension Api No:   420200930
#0 3.662 configure.ac:18: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
#0 3.662 build/php.m4:2072: PHP_CONFIG_NICE is expanded from...
#0 3.662 configure.ac:18: the top level
#0 3.662 configure.ac:161: warning: The macro `AC_LANG_C' is obsolete.
#0 3.662 configure.ac:161: You should run autoupdate.
#0 3.662 ./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
#0 3.662 build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.662 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.662 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.662 configure.ac:161: the top level
#0 3.662 configure.ac:161: warning: The macro `AC_LANG_C' is obsolete.
#0 3.662 configure.ac:161: You should run autoupdate.
#0 3.662 ./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
#0 3.662 lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
#0 3.662 lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
#0 3.662 ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
#0 3.662 ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
#0 3.662 build/libtool.m4:561: _LT_AC_LOCK is expanded from...
#0 3.662 build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
#0 3.662 build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.662 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.662 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.662 configure.ac:161: the top level
#0 3.662 configure.ac:161: warning: The macro `AC_TRY_LINK' is obsolete.
#0 3.662 configure.ac:161: You should run autoupdate.
#0 3.662 ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
#0 3.662 lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
#0 3.662 lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
#0 3.662 ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
#0 3.662 ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
#0 3.662 build/libtool.m4:561: _LT_AC_LOCK is expanded from...
#0 3.662 build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
#0 3.662 build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.662 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.662 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.662 configure.ac:161: the top level
#0 3.662 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
#0 3.662 build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
#0 3.662 build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
#0 3.662 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.662 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.662 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.662 configure.ac:161: the top level
#0 3.663 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
#0 3.663 build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
#0 3.663 build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
#0 3.663 build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
#0 3.663 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.663 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.663 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.663 configure.ac:161: the top level
#0 3.663 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist
#0 3.663 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.663 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.663 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.663 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.663 configure.ac:161: the top level
#0 3.663 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not exist
#0 3.663 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.663 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.663 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.663 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.663 configure.ac:161: the top level
#0 3.663 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script
#0 3.663 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.663 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.663 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.663 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.663 configure.ac:161: the top level
#0 3.663 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not look like a libtool script
#0 3.663 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.663 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.663 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.663 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.663 configure.ac:161: the top level
#0 3.663 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'
#0 3.663 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.663 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.663 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.663 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.663 configure.ac:161: the top level
#0 3.663 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'
#0 3.663 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.663 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.663 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.663 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.663 configure.ac:161: the top level
#0 3.664 configure.ac:161: warning: back quotes and double quotes must not be escaped in: tag name \"$tagname\" already exists
#0 3.664 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.664 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.664 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.664 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.664 configure.ac:161: the top level
#0 3.664 configure.ac:161: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
#0 3.664 configure.ac:161: You should run autoupdate.
#0 3.664 ./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
#0 3.664 build/libtool.m4:2810: _LT_AC_LANG_CXX_CONFIG is expanded from...
#0 3.664 build/libtool.m4:2809: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
#0 3.664 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.664 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.664 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.664 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.664 configure.ac:161: the top level
#0 3.664 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
#0 3.664 build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
#0 3.664 build/libtool.m4:2810: _LT_AC_LANG_CXX_CONFIG is expanded from...
#0 3.664 build/libtool.m4:2809: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
#0 3.664 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.664 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.664 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.664 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.664 configure.ac:161: the top level
#0 3.664 configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
#0 3.664 build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
#0 3.664 build/libtool.m4:2810: _LT_AC_LANG_CXX_CONFIG is expanded from...
#0 3.664 build/libtool.m4:2809: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
#0 3.664 build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
#0 3.664 build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
#0 3.664 build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
#0 3.664 build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
#0 3.664 configure.ac:161: the top level
#0 4.282 checking for grep that handles long lines and -e... /bin/grep
#0 4.342 checking for egrep... /bin/grep -E
#0 4.343 checking for a sed that does not truncate output... /bin/sed
#0 4.349 checking for pkg-config... /usr/bin/pkg-config
#0 4.349 checking pkg-config is at least version 0.9.0... yes
#0 4.350 checking for cc... cc
#0 4.365 checking whether the C compiler works... yes
#0 4.389 checking for C compiler default output file name... a.out
#0 4.389 checking for suffix of executables... 
#0 4.442 checking whether we are cross compiling... no
#0 4.473 checking for suffix of object files... o
#0 4.513 checking whether the compiler supports GNU C... yes
#0 4.532 checking whether cc accepts -g... yes
#0 4.553 checking for cc option to enable C11 features... none needed
#0 4.648 checking how to run the C preprocessor... cc -E
#0 4.715 checking for icc... no
#0 4.728 checking for suncc... no
#0 4.740 checking for system library directory... lib
#0 4.740 checking if compiler supports -Wl,-rpath,... yes
#0 4.781 checking build system type... x86_64-pc-linux-musl
#0 4.847 checking host system type... x86_64-pc-linux-musl
#0 4.848 checking target system type... x86_64-pc-linux-musl
#0 4.923 checking for PHP prefix... /usr/local
#0 4.923 checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
#0 4.923 checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20200930
#0 4.923 checking for PHP installed headers prefix... /usr/local/include/php
#0 4.923 checking if debug is enabled... no
#0 4.935 checking if zts is enabled... no
#0 4.946 checking for gawk... no
#0 4.947 checking for nawk... no
#0 4.947 checking for awk... awk
#0 4.947 checking if awk is broken... no
#0 4.948 checking whether to enable scrypt support... yes, shared
#0 4.952 checking for clock_gettime in -lrt... yes
#0 5.016 checking for library containing clock_gettime... none required
#0 5.046 checking for stdio.h... yes
#0 5.061 checking for stdlib.h... yes
#0 5.115 checking for string.h... yes
#0 5.135 checking for inttypes.h... yes
#0 5.158 checking for stdint.h... yes
#0 5.226 checking for strings.h... yes
#0 5.252 checking for sys/stat.h... yes
#0 5.317 checking for sys/types.h... yes
#0 5.347 checking for unistd.h... yes
#0 5.414 checking for struct sysinfo.uptime... no
#0 5.466 checking for struct sysinfo.totalram... no
#0 5.566 checking for a sed that does not truncate output... /bin/sed
#0 5.614 checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
#0 5.623 checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
#0 5.625 checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
#0 5.625 checking for BSD-compatible nm... /usr/bin/nm -B
#0 5.627 checking whether ln -s works... yes
#0 5.627 checking how to recognize dependent libraries... pass_all
#0 5.642 ./configure: line 1: /usr/bin/file: not found
#0 5.643 checking for dlfcn.h... yes
#0 5.671 checking the maximum length of command line arguments... 98304
#0 5.715 checking command to parse /usr/bin/nm -B output from cc object... ok
#0 5.824 checking for objdir... .libs
#0 5.827 checking for ar... ar
#0 5.827 checking for ranlib... ranlib
#0 5.828 checking for strip... strip
#0 5.936 checking if cc supports -fno-rtti -fno-exceptions... no
#0 5.956 checking for cc option to produce PIC... -fPIC
#0 5.957 checking if cc PIC flag -fPIC works... yes
#0 6.019 checking if cc static flag -static works... yes
#0 6.053 checking if cc supports -c -o file.o... yes
#0 6.120 checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes
#0 6.133 checking whether -lc should be explicitly linked in... no
#0 6.159 checking dynamic linker characteristics... GNU/Linux ld.so
#0 6.165 checking how to hardcode library paths into programs... immediate
#0 6.165 checking whether stripping libraries is possible... yes
#0 6.216 checking if libtool supports shared libraries... yes
#0 6.216 checking whether to build shared libraries... yes
#0 6.216 checking whether to build static libraries... no
#0 6.468 
#0 6.468 creating libtool
#0 6.544 appending configuration tag "CXX" to libtool
#0 6.644 configure: patching config.h.in
#0 6.652 configure: creating ./config.status
#0 6.726 config.status: creating config.h
#0 6.770 /bin/sh /php-scrypt/libtool --mode=compile cc -I. -I/php-scrypt -I/php-scrypt/include -I/php-scrypt/main -I/php-scrypt -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php-scrypt/crypto  -DHAVE_CONFIG_H  -g -O2 -msse -msse2    -c /php-scrypt/php_scrypt.c -o php_scrypt.lo 
#0 6.851 mkdir .libs
#0 6.853  cc -I. -I/php-scrypt -I/php-scrypt/include -I/php-scrypt/main -I/php-scrypt -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php-scrypt/crypto -DHAVE_CONFIG_H -g -O2 -msse -msse2 -c /php-scrypt/php_scrypt.c  -fPIC -DPIC -o .libs/php_scrypt.o
#0 7.598 /php-scrypt/php_scrypt.c: In function 'zif_scrypt':
#0 7.599 /php-scrypt/php_scrypt.c:160:29: error: expected ')' before 'TSRMLS_CC'
#0 7.599   160 |             ZEND_NUM_ARGS() TSRMLS_CC, "ssllll|b",
#0 7.599       |                             ^~~~~~~~~
#0 7.599 /php-scrypt/php_scrypt.c:159:9: error: too few arguments to function 'zend_parse_parameters'
#0 7.599   159 |     if (zend_parse_parameters(
#0 7.599       |         ^~~~~~~~~~~~~~~~~~~~~
#0 7.600 In file included from /usr/local/include/php/main/php.h:35,
#0 7.600                  from /php-scrypt/php_scrypt.c:31:
#0 7.600 /usr/local/include/php/Zend/zend_API.h:304:22: note: declared here
#0 7.600   304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
#0 7.600       |                      ^~~~~~~~~~~~~~~~~~~~~
#0 7.600 /php-scrypt/php_scrypt.c:176:31: error: expected ')' before 'TSRMLS_CC'
#0 7.600   176 |         php_error_docref(NULL TSRMLS_CC, E_ERROR, "Key length is too low, must be greater or equal to 16");
#0 7.600       |                               ^~~~~~~~~
#0 7.600 /php-scrypt/php_scrypt.c:176:9: error: too few arguments to function 'php_error_docref'
#0 7.600   176 |         php_error_docref(NULL TSRMLS_CC, E_ERROR, "Key length is too low, must be greater or equal to 16");
#0 7.600       |         ^~~~~~~~~~~~~~~~
#0 7.601 In file included from /php-scrypt/php_scrypt.c:31:
#0 7.601 /usr/local/include/php/main/php.h:341:23: note: declared here
#0 7.601   341 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#0 7.601       |                       ^~~~~~~~~~~~~~~~
#0 7.604 /php-scrypt/php_scrypt.c:179:31: error: expected ')' before 'TSRMLS_CC'
#0 7.604   179 |         php_error_docref(NULL TSRMLS_CC, E_ERROR, "Key length is too high, must be no more than (2^32 - 1) * 32");
#0 7.604       |                               ^~~~~~~~~
#0 7.604 /php-scrypt/php_scrypt.c:179:9: error: too few arguments to function 'php_error_docref'
#0 7.604   179 |         php_error_docref(NULL TSRMLS_CC, E_ERROR, "Key length is too high, must be no more than (2^32 - 1) * 32");
#0 7.604       |         ^~~~~~~~~~~~~~~~
#0 7.604 In file included from /php-scrypt/php_scrypt.c:31:
#0 7.604 /usr/local/include/php/main/php.h:341:23: note: declared here
#0 7.604   341 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#0 7.604       |                       ^~~~~~~~~~~~~~~~
#0 7.604 /php-scrypt/php_scrypt.c:189:29: error: expected ')' before 'TSRMLS_CC'
#0 7.604   189 |       php_error_docref(NULL TSRMLS_CC, E_ERROR, "N parameter must be a power of 2");
#0 7.604       |                             ^~~~~~~~~
#0 7.604 /php-scrypt/php_scrypt.c:189:7: error: too few arguments to function 'php_error_docref'
#0 7.604   189 |       php_error_docref(NULL TSRMLS_CC, E_ERROR, "N parameter must be a power of 2");
#0 7.604       |       ^~~~~~~~~~~~~~~~
#0 7.605 In file included from /php-scrypt/php_scrypt.c:31:
#0 7.605 /usr/local/include/php/main/php.h:341:23: note: declared here
#0 7.605   341 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#0 7.605       |                       ^~~~~~~~~~~~~~~~
#0 7.605 /php-scrypt/php_scrypt.c: In function 'zif_scrypt_pickparams':
#0 7.605 /php-scrypt/php_scrypt.c:256:29: error: expected ')' before 'TSRMLS_CC'
#0 7.605   256 |             ZEND_NUM_ARGS() TSRMLS_CC, "ldd",
#0 7.605       |                             ^~~~~~~~~
#0 7.606 /php-scrypt/php_scrypt.c:255:9: error: too few arguments to function 'zend_parse_parameters'
#0 7.606   255 |     if (zend_parse_parameters(
#0 7.606       |         ^~~~~~~~~~~~~~~~~~~~~
#0 7.606 In file included from /usr/local/include/php/main/php.h:35,
#0 7.606                  from /php-scrypt/php_scrypt.c:31:
#0 7.606 /usr/local/include/php/Zend/zend_API.h:304:22: note: declared here
#0 7.606   304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
#0 7.606       |                      ^~~~~~~~~~~~~~~~~~~~~
#0 7.606 /php-scrypt/php_scrypt.c:270:31: error: expected ')' before 'TSRMLS_CC'
#0 7.606   270 |         php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not determine scrypt parameters.");
#0 7.606       |                               ^~~~~~~~~
#0 7.606 /php-scrypt/php_scrypt.c:270:9: error: too few arguments to function 'php_error_docref'
#0 7.606   270 |         php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not determine scrypt parameters.");
#0 7.606       |         ^~~~~~~~~~~~~~~~
#0 7.606 In file included from /php-scrypt/php_scrypt.c:31:
#0 7.606 /usr/local/include/php/main/php.h:341:23: note: declared here
#0 7.606   341 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#0 7.606       |                       ^~~~~~~~~~~~~~~~
#0 7.618 make: *** [Makefile:209: php_scrypt.lo] Error 1
------
failed to solve: executor failed running [/bin/sh -c git clone --depth 1 --branch $PHP_SCRYPT_VERSION https://github.com/DomBlack/php-scrypt.git &&   cd php-scrypt &&   phpize &&   ./configure --enable-scrypt &&   make && make install]: exit code: 2
jmwendt commented 2 years ago

I manually built from this repo and have no issues with PHP 8+, but it looks like the PECL package was last updated 2016-05-18. I do use this in an AWS Elastic Beanstalk environment running PHP 7 and would really like to move to PHP 8. It would be WAY easier to just include a PECL package requirement, rather than trying to bundle source code and compile on deploy, so if possible I too would really appreciate an update to this PECL package.

DomBlack commented 2 years ago

Hi all,

Sorry just seen this.

I've not worked with PHP in a while, is anybody willing to issue a PR to get it building under PHP 8 (or wants to become a collaborator on this repo to help maintain it going forward)?

kocsismate commented 2 years ago

@DomBlack Yes, I can file a PR and I'd be happy if you granted me commit access :) Actually, I already forked the repo and made a few PHP 8+ related changes. To be honest, IIRC none of them are absolutely required, but they make the behavior of the extension consistent with PHP 8.0+.

DomBlack commented 2 years ago

🙏 Awesome, thanks @kocsismate, sent you and invite to the repo