Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734020 - dev-libs/apr-util-1.6.1-r4 dbd/apr_dbd_mysql.c:44:9: error: unknown type name ‘bool’
Summary: dev-libs/apr-util-1.6.1-r4 dbd/apr_dbd_mysql.c:44:9: error: unknown type nam...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-27 03:24 UTC by email200202
Modified: 2020-07-27 22:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,35.11 KB, text/plain)
2020-07-27 03:25 UTC, email200202
Details
emerge -pqv '=dev-libs/apr-util-1.6.1-r4::gentoo' (file_734020.txt,203 bytes, text/plain)
2020-07-27 03:26 UTC, email200202
Details
emerge --info '=dev-libs/apr-util-1.6.1-r4::gentoo' (file_734020.txt,6.28 KB, text/plain)
2020-07-27 03:27 UTC, email200202
Details

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2020-07-27 03:24:00 UTC
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
Comment 1 email200202 2020-07-27 03:25:40 UTC
Created attachment 650910 [details]
build.log
Comment 2 email200202 2020-07-27 03:26:37 UTC
Created attachment 650912 [details]
emerge -pqv '=dev-libs/apr-util-1.6.1-r4::gentoo'
Comment 3 email200202 2020-07-27 03:27:38 UTC
Created attachment 650914 [details]
emerge --info '=dev-libs/apr-util-1.6.1-r4::gentoo'
Comment 4 email200202 2020-07-27 07:46:30 UTC
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,
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2020-07-27 10:45:46 UTC
I cannot reproduce in stable chroot nor current ~amd64 system, but let us know if the improved my_bool patch will fix it.
Comment 6 Larry the Git Cow gentoo-dev 2020-07-27 10:46:27 UTC
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(-)
Comment 7 email200202 2020-07-27 14:32:32 UTC
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.
Comment 8 email200202 2020-07-27 14:35:33 UTC
I removed the patch file "apr-util-1.6.1-my_bool.patch".

The packages complies successfully without it.
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2020-07-27 17:00:44 UTC
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.
Comment 10 Mike Pagano gentoo-dev 2020-07-27 18:10:28 UTC
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.
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2020-07-27 21:14:23 UTC
Please reported installed 

- dev-db/{mysql,percona-server,mariadb} version
- dev-db/{mariadb,mysql}-connector-c version
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2020-07-27 22:03:29 UTC
I was finally able to reproduce, incoming fix.
Comment 13 Larry the Git Cow gentoo-dev 2020-07-27 22:08:52 UTC
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(-)