Im building php 8.1 on ubuntu 18 from the source code.
./configure --with-sodiummake
this way works perfectly.
If i add the rest of the modules i need i get this error
./configure --with-sodium OPENSSL_CFLAGS=-I/opt/openssl/include/ OPENSSL_LIBS="-L/opt/openssl/lib64/ -lssl -lcrypto" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-bcmath --enable-pdo --enable-soap --enable-fpm --enable-intl --enable-calendar --enable-pcntl --enable-mbstring --enable-sockets --enable-exif --enable-ftp --enable-dba --with-curl --enable-gd --with-zip --with-zlib --with-iconv --with-bz2 --with-gettext --with-xml --with-mhash --with-xsl --with-gmp --with-ldap --with-pear --with-pgsql --with-pdo-pgsql --with-mysqli --with-pdo-mysql --with-openssl --with-jpeg --with-freetype --without-sqlite3 --with-fpm-user=www-data --with-fpm-group=www-data --with-config-file-path=/usr/local/php/8.1.27/lib --prefix=/usr/local/php/8.1.27
xml2 -lxml2 -lxslt -lxml2 -lexslt -lxslt -lxml2 -lzip -lz -lz -lssl -lcrypto -lcrypt -lrt -o sapi/cli/phpext/sodium/libsodium.o: In function zif_sodium_crypto_scalarmult_ristretto255': /home/php-src/ext/sodium/libsodium.c:2586: undefined reference to
crypto_scalarmult_ristretto255'ext/sodium/libsodium.o: In function zif_sodium_crypto_scalarmult_ristretto255_base': /home/php-src/ext/sodium/libsodium.c:2613: undefined reference to
crypto_scalarmult_ristretto255_base'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_add': /home/php-src/ext/sodium/libsodium.c:3534: undefined reference to
crypto_core_ristretto255_add'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_from_hash': /home/php-src/ext/sodium/libsodium.c:3560: undefined reference to
crypto_core_ristretto255_from_hash'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_add': /home/php-src/ext/sodium/libsodium.c:3624: undefined reference to
crypto_core_ristretto255_scalar_add'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_invert': /home/php-src/ext/sodium/libsodium.c:3668: undefined reference to
crypto_core_ristretto255_scalar_invert'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_mul': /home/php-src/ext/sodium/libsodium.c:3701: undefined reference to
crypto_core_ristretto255_scalar_mul'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_sub': /home/php-src/ext/sodium/libsodium.c:3787: undefined reference to
crypto_core_ristretto255_scalar_sub'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_sub': /home/php-src/ext/sodium/libsodium.c:3816: undefined reference to
crypto_core_ristretto255_sub'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_is_valid_point': /home/php-src/ext/sodium/libsodium.c:3584: undefined reference to
crypto_core_ristretto255_is_valid_point'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_random': /home/php-src/ext/sodium/libsodium.c:3595: undefined reference to
crypto_core_ristretto255_random'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_complement': /home/php-src/ext/sodium/libsodium.c:3646: undefined reference to
crypto_core_ristretto255_scalar_complement'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_negate': /home/php-src/ext/sodium/libsodium.c:3723: undefined reference to
crypto_core_ristretto255_scalar_negate'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_random': /home/php-src/ext/sodium/libsodium.c:3736: undefined reference to
crypto_core_ristretto255_scalar_random'ext/sodium/libsodium.o: In function zif_sodium_crypto_core_ristretto255_scalar_reduce': /home/php-src/ext/sodium/libsodium.c:3758: undefined reference to
crypto_core_ristretto255_scalar_reduce'collect2: error: ld returned 1 exit statusMakefile:314: recipe for target 'sapi/cli/php' failedmake: *** [sapi/cli/php] Error 1
I already tried different ways of configuring the php