Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692560 - net-fs/netatalk-3.1.12 : cnid_mysql.c:851:5: error: unknown type name my_bool
Summary: net-fs/netatalk-3.1.12 : cnid_mysql.c:851:5: error: unknown type name my_bool
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: mysql-8
  Show dependency tree
 
Reported: 2019-08-19 18:03 UTC by Toralf Förster
Modified: 2020-06-03 16:15 UTC (History)
3 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.86 KB, text/plain)
2019-08-19 18:03 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,124.49 KB, text/plain)
2019-08-19 18:03 UTC, Toralf Förster
Details
environment (environment,134.18 KB, text/plain)
2019-08-19 18:03 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,10.86 KB, application/x-bzip)
2019-08-19 18:03 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,30.57 KB, application/x-bzip)
2019-08-19 18:03 UTC, Toralf Förster
Details
net-fs:netatalk-3.1.12:20190819-125609.log (net-fs:netatalk-3.1.12:20190819-125609.log,62.75 KB, text/plain)
2019-08-19 18:03 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,40.33 KB, application/x-bzip)
2019-08-19 18:03 UTC, Toralf Förster
Details
it patches libatalk/cnid/mysql/cnid_mysql.c when you have mysql-connector-c > 8.0 (cnid_mysql.patch,535 bytes, patch)
2019-09-02 17:18 UTC, Kostiantyn Gorbunov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-08-19 18:03:30 UTC
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../include -I../../../include -I../../.. -I/usr/include/mysql "-D_U_=__attribute__((unused))" -O2 -pipe -march=native -fno-strict-aliasing -c cnid_mysql.c  -fPIC -DPIC -o .libs/libcnid_mysql_la-cnid_mysql.o
cnid_mysql.c: In function ‘cnid_mysql_open’:
cnid_mysql.c:851:5: error: unknown type name ‘my_bool’; did you mean ‘bool’?
  851 |     my_bool my_recon = true;
      |     ^~~~~~~
      |     bool

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-20190816-151832

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.37.0 *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.13.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpvO net-fs/netatalk
[ebuild  N    ] net-fs/netatalk-3.1.12  USE="(acl) dbus ldap pam shadow ssl tcpd tracker utils -cracklib -debug -kerberos -pgp -quota -samba -static-libs -zeroconf" PYTHON_TARGETS="python2_7"
Comment 1 Toralf Förster gentoo-dev 2019-08-19 18:03:33 UTC
Created attachment 587554 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-08-19 18:03:36 UTC
Created attachment 587556 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2019-08-19 18:03:39 UTC
Created attachment 587558 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2019-08-19 18:03:41 UTC
Created attachment 587560 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2019-08-19 18:03:44 UTC
Created attachment 587562 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-08-19 18:03:47 UTC
Created attachment 587564 [details]
net-fs:netatalk-3.1.12:20190819-125609.log
Comment 7 Toralf Förster gentoo-dev 2019-08-19 18:03:50 UTC
Created attachment 587566 [details]
temp.tbz2
Comment 8 Steven Green 2019-08-21 07:36:49 UTC
This looks it could be related to bug 692462 where the type my_bool is not defined in mysql-connector-c-8.0.17-r1
Comment 9 Steven Green 2019-08-21 07:55:19 UTC
https://dev.mysql.com/doc/refman/8.0/en/c-api-data-structures.html says:

"The my_bool type was used before MySQL 8.0. As of MySQL 8.0, use the bool or int C type instead."
Comment 10 Kostiantyn Gorbunov 2019-09-02 17:12:18 UTC
cat /etc/portage/patches/net-fs/netatalk/cnid_mysql.patch 
--- a/libatalk/cnid/mysql/cnid_mysql.c	2016-03-10 10:06:20.000000000 +0200
+++ b/libatalk/cnid/mysql/cnid_mysql.c	2019-09-02 19:55:04.361132422 +0300
@@ -848,7 +848,7 @@
 
     /* Initialize and connect to MySQL server */
     EC_NULL( db->cnid_mysql_con = mysql_init(NULL) );
-    my_bool my_recon = true;
+    bool my_recon = true;
     EC_ZERO( mysql_options(db->cnid_mysql_con, MYSQL_OPT_RECONNECT, &my_recon) );
     int my_timeout = 600;
     EC_ZERO( mysql_options(db->cnid_mysql_con, MYSQL_OPT_CONNECT_TIMEOUT, &my_timeout) );
Comment 11 Kostiantyn Gorbunov 2019-09-02 17:18:56 UTC
Created attachment 588836 [details, diff]
it patches libatalk/cnid/mysql/cnid_mysql.c when you have mysql-connector-c > 8.0

just put the patch to /etc/portage/patches/net-fs/netatalk/cnid_mysql.patch
Comment 12 Larry the Git Cow gentoo-dev 2020-04-08 07:43:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18c9cd112e5f37795391d3f0b895741c79a047e7

commit 18c9cd112e5f37795391d3f0b895741c79a047e7
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-04-08 07:42:50 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-04-08 07:42:58 +0000

    net-fs/netatalk-3.1.2: fix compilation due to my_bool, bug #692560
    
    Closes: https://bugs.gentoo.org/692560
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 net-fs/netatalk/files/netatalk-3.1.12-my_bool.patch | 16 ++++++++++++++++
 net-fs/netatalk/netatalk-3.1.12.ebuild              |  1 +
 2 files changed, 17 insertions(+)
Comment 13 Tamas Jantvik 2020-05-01 11:27:55 UTC
 * Package:    net-fs/netatalk-3.1.12
 * Repository: gentoo
 * USE:        abi_x86_64 acl amd64 cracklib dbus elibc_glibc kerberos kernel_linux ldap pam pgp python_targets_python2_7 quota samba shadow ssl tcpd userland_GNU utils zeroconf
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Applying netatalk-3.1.7-gentoo.patch ...
 [ ok ]
 * Applying netatalk-3.1.8-disable-ld-library-path.patch ...
 [ ok ]
 * Applying netatalk-3.1.12-my_bool.patch ...
 [ ok ]
 * Applying 00000000-my_bool-removal.patch ...
patching file libatalk/cnid/mysql/cnid_mysql.c
Hunk #1 FAILED at 848.
1 out of 1 hunk FAILED -- saving rejects to file libatalk/cnid/mysql/cnid_mysql.c.rej
 [ !! ]
 * ERROR: net-fs/netatalk-3.1.12::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/net-fs/netatalk-3.1.12-r0/00000000-my_bool-removal.patch
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 3373:  Called default
 *      phase-functions.sh, line  855:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  350:  Called eapply_user
 *             environment, line 1510:  Called eapply '/etc/portage/patches/net-fs/netatalk-3.1.12-r0/00000000-my_bool-removal.patch'
 *             environment, line 1480:  Called _eapply_patch '/etc/portage/patches/net-fs/netatalk-3.1.12-r0/00000000-my_bool-removal.patch'
 *             environment, line 1418:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/net-fs/netatalk-3.1.12-r0/00000000-my_bool-removal.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=net-fs/netatalk-3.1.12::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-fs/netatalk-3.1.12::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/net-fs/netatalk-3.1.12:20200501-112406.log.gz'.
 * For convenience, a symlink to the build log is located at '/tmp/portage/net-fs/netatalk-3.1.12/temp/build.log.gz'.
 * The ebuild environment file is located at '/tmp/portage/net-fs/netatalk-3.1.12/temp/environment'.
 * Working directory: '/tmp/portage/net-fs/netatalk-3.1.12/work/netatalk-3.1.12'
 * S: '/tmp/portage/net-fs/netatalk-3.1.12/work/netatalk-3.1.12'
Comment 14 Christian Hoenig 2020-06-03 16:15:05 UTC
Hi,

You most probably have the file 00000000-my_bool-removal.patch in /etc/portage/patches/net-fs/netatalk/ from when the patch was not yet patched in the ebuild.

br
Christian