Closed mpociot closed 8 months ago
Seems related to patched libargon2 still have conflict on linking symbols. e.g. https://github.com/mpociot/phc-winner-argon2/blob/cde967ff411feb525285dc86efabe22ee7050371/src/core.c#L388
1.19 have renamed some functions: validate_inputs => argon2_validate_inputs
, which happens to conflict with the version we have patched.
Oh okay, well this sounds like we now no longer need a patched version, as we had to rename our functions in argon2 so we don't conflict with libsodium. Might be worth a try.
Still have conflicts (using P-H-C original branch):
duplicate symbol '_argon2_fill_memory_blocks' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[3](core.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[41](libsodium_la-argon2-core.o)
duplicate symbol '_blake2b_init_key' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[4](blake2b.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[26](libsodium_la-blake2b-ref.o)
duplicate symbol '_blake2b' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[4](blake2b.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[26](libsodium_la-blake2b-ref.o)
duplicate symbol '_blake2b_init_param' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[4](blake2b.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[26](libsodium_la-blake2b-ref.o)
duplicate symbol '_argon2_initialize' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[3](core.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[41](libsodium_la-argon2-core.o)
duplicate symbol '_blake2b_final' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[4](blake2b.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[26](libsodium_la-blake2b-ref.o)
duplicate symbol '_blake2b_init' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[4](blake2b.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[26](libsodium_la-blake2b-ref.o)
duplicate symbol '_argon2_validate_inputs' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[3](core.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[41](libsodium_la-argon2-core.o)
duplicate symbol '_argon2_finalize' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[3](core.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[41](libsodium_la-argon2-core.o)
duplicate symbol '_blake2b_update' in:
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libargon2.a[4](blake2b.o)
/Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsodium.a[26](libsodium_la-blake2b-ref.o)
If possible, I will thoroughly check the debugging symbol issue in the near future. Linux is also currently incompatible.
I forked static-php/phc-winner-argon2 and resolved the conflict. CI shows it is working on both linux and macOS. đź‘Ť
Command used:
/bin/spc build intl,pdo_sqlite,sqlite3,curl,openssl,tokenizer,bcmath,bz2,calendar,dba,ftp,iconv,mysqli,mbstring,mbregex,xml,simplexml,ctype,dom,pdo,filter,session,zlib,fileinfo,pdo_mysql,posix,sockets,shmop,sodium,sysvmsg,sysvsem,sysvshm,gd,zip,gmp,redis,xmlwriter,phar,exif,xmlreader,readline,pcntl,soap,imagick,ffi,password-argon2,pgsql,pdo_pgsql,imap,ldap,xsl --debug --build-cli --build-fpm --with-libs=nghttp2 --no-strip
This issue seems to appear after using the latest libsodium version: https://github.com/crazywhalecc/static-php-cli/blob/main/config/source.json#L339-L347
The error does not occur when using version 1.0.18 of libsodium: https://github.com/crazywhalecc/static-php-cli/blame/3828ba7c7747014e8d45f89c5448d8a913e90bc0/config/source.json#L253-L260