The package failed to compile with the error: dev-libs/apr-util-1.6.1-r4/work/apr-util-1.6.1/include/private -I/usr/include/mysql -I/usr/include/apr-1 -I/usr/include/db6.0 -c dbd/apr_dbd_sqlite3.c -fPIC -DPIC -o dbd/.libs/apr_dbd_sqlite3.o dbd/apr_dbd_mysql.c:44:9: error: unknown type name ‘bool’ 44 | typedef bool my_bool; | ^~~~ Reproducible: Always Steps to Reproduce: 1. emerge --sync 2. emerge -avuDN world Actual Results: failed Expected Results: compiles
Created attachment 650910 [details] build.log
Created attachment 650912 [details] emerge -pqv '=dev-libs/apr-util-1.6.1-r4::gentoo'
Created attachment 650914 [details] emerge --info '=dev-libs/apr-util-1.6.1-r4::gentoo'
The working version (apr-util-1.6.1-r3) of the package was removed from the tree. The only version available for the package is this faulty one,
I cannot reproduce in stable chroot nor current ~amd64 system, but let us know if the improved my_bool patch will fix it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a2bddbf014ae3b7bfa42203066f14f04fbe5ede commit 0a2bddbf014ae3b7bfa42203066f14f04fbe5ede Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-07-27 10:45:54 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-07-27 10:46:20 +0000 dev-libs/apr-util: improve my_bool patch Closes: https://bugs.gentoo.org/734020 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> dev-libs/apr-util/files/apr-util-1.6.1-my_bool.patch | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
I tried the new version dev-libs/apr-util-1.6.1-r5 It failed in the same way as apr-util-1.6.1-r4 my_bool is defined twice: The first time is in /usr/include/mysql/mysql.h #ifndef _mysql_h #define _mysql_h #ifdef __cplusplus extern "C" { #endif #ifndef MY_GLOBAL_INCLUDED /* If not standard header */ #ifndef MYSQL_ABI_CHECK #include <sys/types.h> #endif typedef char my_bool; <<<<<<<<<<<<<<<<<<<<<< HERE #if !defined(_WIN32) #define STDCALL #else #define STDCALL __stdcall #endif The second time is in /var/tmp/portage/dev-libs/apr-util-1.6.1-r5/work/apr-util-1.6.1/dbd/apr_dbd_mysql.c #if defined(HAVE_MYSQL_MYSQL_H) #if defined(HAVE_MYSQL_MY_GLOBAL_H) #include <mysql/my_global.h> #if defined(HAVE_MYSQL_MY_SYS_H) #include <mysql/my_sys.h> #endif #endif #include <mysql/mysql.h> #include <mysql/errmsg.h> #else /* !defined(HAVE_MYSQL_MYSQL_H) */ #if defined(HAVE_MY_GLOBAL_H) #include <my_global.h> #if defined(HAVE_MY_SYS_H) #include <my_sys.h> #endif #endif #include <mysql.h> #ifndef HAVE_TYPE_MY_BOOL #include <stdbool.h> typedef bool my_bool; <<<<<<<<<< HERE #endif #include <errmsg.h> #endif "HAVE_TYPE_MY_BOOL" didn't stop the second definition since it is not in mysql.h file.
I removed the patch file "apr-util-1.6.1-my_bool.patch". The packages complies successfully without it.
Please make sure your world is up to date. You shouldn't have /usr/include/mysql/mysql.h with that line on a proper system.
I can reproduce this when I try to emerge apr-util *with* the mysql flag and without mariadb installed. *With* the mysql flag and mariadb installed it works.
Please reported installed - dev-db/{mysql,percona-server,mariadb} version - dev-db/{mariadb,mysql}-connector-c version
I was finally able to reproduce, incoming fix.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a8c2df53d8abbe67ae89546075dcd31b65b61f9 commit 5a8c2df53d8abbe67ae89546075dcd31b65b61f9 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-07-27 22:08:19 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-07-27 22:08:36 +0000 dev-libs/apr-util: update my_bool patch We need to take a different solution because MariaDB Connector C is still defining my_bool. Closes: https://bugs.gentoo.org/734020 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> .../{apr-util-1.6.1-r5.ebuild => apr-util-1.6.1-r6.ebuild} | 0 dev-libs/apr-util/files/apr-util-1.6.1-my_bool.patch | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-)