Issue: https://github.com/php/php-src/issues/10148
Author: crackerjam
### Description
First, I build argon2 from [source](https://github.com/P-H-C/phc-winner-argon2), with a simple
make $PREFIX=$HOME/php-temp-argon2 and make install
$PREFIX=$HOME/php-temp-argon2. This builds successfully and places the build products in
$HOME/php-temp/argon2 as expected.
Then, on the php source, I run ./configure --prefix=$HOME/php
--with-password-argon2=$HOME/php-temp/argon2. This works successfully.
However, running make afterwards results this error message:
```/bin/bash /media/5cd8/crackerjam/php-temp/php-8.1.13/libtool --silent --preserve-dup-deps --tag
CC --mode=compile cc -Iext/standard/ -I/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/
-I/media/5cd8/crackerjam/php-temp/php-8.1.13/include
-I/media/5cd8/crackerjam/php-temp/php-8.1.13/main -I/media/5cd8/crackerjam/php-temp/php-8.1.13
-I/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/date/lib -I/usr/include/libxml2
-I/media/5cd8/crackerjam/php-temp/php-8.1.13/TSRM -I/media/5cd8/crackerjam/php-temp/php-8.1.13/Zend
-fno-common -Wstrict-prototypes -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra
-Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden
-DZEND_SIGNALS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c -o ext/standard/password.lo -MMD
-MF ext/standard/password.dep -MT ext/standard/password.lo
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c: In function
‘php_password_argon2_hash’:
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c:342:16: error: too many arguments
to function ‘argon2_encodedlen’
encoded_len = argon2_encodedlen(
^~~~~~~~~~~~~~~~~
In file included from /media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c:31:0:
/usr/include/argon2.h:366:22: note: declared here
ARGON2_PUBLIC size_t argon2_encodedlen(uint32_t t_cost, uint32_t m_cost,
^~~~~~~~~~~~~~~~~
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c: In function
‘php_password_argon2id_verify’:
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c:403:92: error: ‘Argon2_id’
undeclared (first use in this function)
return ARGON2_OK == argon2_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password),
Argon2_id);
^~~~~~~~~
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c:403:92: note: each undeclared
identifier is reported only once for each function it appears in
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c: In function
‘php_password_argon2id_hash’:
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c:407:53: error: ‘Argon2_id’
undeclared (first use in this function)
return php_password_argon2_hash(password, options, Argon2_id);
^~~~~~~~~
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c: In function
‘php_password_argon2id_verify’:
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c:404:1: warning: control reaches
end of non-void function [-Wreturn-type]
}
^
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c: In function
‘php_password_argon2id_hash’:
/media/5cd8/crackerjam/php-temp/php-8.1.13/ext/standard/password.c:408:1: warning: control reaches
end of non-void function [-Wreturn-type]
}
^
Makefile:1334: recipe for target 'ext/standard/password.lo' failed
make: *** [ext/standard/password.lo] Error 1
```
My interpretation of these errors is that php is looking for a method that the current argon2
library doesn't provide, but it's certainly possible I'm incorrect. Any help
resolving this would be greatly appreciated.
### PHP Version
PHP 8.1.13
### Operating System
Debian 9