On current amd64, With USE=mysql or USE=mysqli, you also need USE=hash or this happens: ext/mysqlnd/mysqlnd_auth.o: In function `php_mysqlnd_scramble_sha2': mysqlnd_auth.c:(.text+0x1054): undefined reference to `PHP_SHA256Init' mysqlnd_auth.c:(.text+0x1064): undefined reference to `PHP_SHA256Update' mysqlnd_auth.c:(.text+0x1070): undefined reference to `PHP_SHA256Final' mysqlnd_auth.c:(.text+0x1078): undefined reference to `PHP_SHA256Init' mysqlnd_auth.c:(.text+0x1088): undefined reference to `PHP_SHA256Update' mysqlnd_auth.c:(.text+0x1094): undefined reference to `PHP_SHA256Final' mysqlnd_auth.c:(.text+0x109c): undefined reference to `PHP_SHA256Init' mysqlnd_auth.c:(.text+0x10ac): undefined reference to `PHP_SHA256Update' mysqlnd_auth.c:(.text+0x10bc): undefined reference to `PHP_SHA256Update' mysqlnd_auth.c:(.text+0x10c8): undefined reference to `PHP_SHA256Final' https://patchwork.ozlabs.org/patch/962514/
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a51890c8496984b6e774706bcdb05ff72bc8c4ce commit a51890c8496984b6e774706bcdb05ff72bc8c4ce Author: Brian Evans <grknight@gentoo.org> AuthorDate: 2018-09-20 02:32:16 +0000 Commit: Brian Evans <grknight@gentoo.org> CommitDate: 2018-09-20 02:32:16 +0000 dev-lang/php: Recent mysqlnd driver needs hash extension Set REQUIRED_USE on mysql and mysqli to need hash as build failures occur without. Example: ext/mysqlnd/mysqlnd_auth.o: In function `php_mysqlnd_scramble_sha2': mysqlnd_auth.c:(.text+0x1054): undefined reference to `PHP_SHA256Init' Does not affect PHP 5.6 or 7.0 as they are security only Closes: https://bugs.gentoo.org/666598 dev-lang/php/php-7.1.22.ebuild | 3 ++- dev-lang/php/php-7.2.10.ebuild | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)