[CC] res_config_mysql.c -> res_config_mysql.o cdr_mysql.c: In function ‘mysql_log’: cdr_mysql.c:184:2: error: unknown type name ‘my_bool’; did you mean ‘bool’? 184 | my_bool my_bool_true = 1; | ^~~~~~~ | bool cdr_mysql.c: In function ‘my_load_module’: cdr_mysql.c:474:2: error: unknown type name ‘my_bool’; did you mean ‘bool’? 474 | my_bool my_bool_true = 1; | ^~~~~~~ | bool make[1]: *** [/var/tmp/portage/net-misc/asterisk-13.23.1/work/asterisk-13.23.1/Makefile.rules:150: cdr_mysql.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:391: addons] Error 2 * ERROR: net-misc/asterisk-13.23.1::gentoo failed (compile phase):
Related to the recent upgrade to mysql-8 & mysql-connector-c-8. Candidate for tracker: https://bugs.gentoo.org/692570
Created attachment 587782 [details, diff] asterisk-13.23.1-my_bool-error.diff Proposed patch to resolve the problem with the new versions of mysql-connector-c.
(In reply to Attila Tóth from comment #2) > Created attachment 587782 [details, diff] [details, diff] > asterisk-13.23.1-my_bool-error.diff > > Proposed patch to resolve the problem with the new versions of > mysql-connector-c. I tried with your diff, but ran into: cdr_mysql.c: In function ‘mysql_log’: cdr_mysql.c:184:2: error: unknown type name ‘my_bool’; did you mean ‘bool’? my_bool my_bool_true = 1; Perhaps there are more files that need to be patched beyond that? I made an attempt to add to the patch, but failed miserably.
(In reply to Russell Dwiggins from comment #3) > (In reply to Attila Tóth from comment #2) > > Created attachment 587782 [details, diff] [details, diff] [details, diff] > > asterisk-13.23.1-my_bool-error.diff > > > > Proposed patch to resolve the problem with the new versions of > > mysql-connector-c. > > I tried with your diff, but ran into: > > cdr_mysql.c: In function ‘mysql_log’: > cdr_mysql.c:184:2: error: unknown type name ‘my_bool’; did you mean ‘bool’? > my_bool my_bool_true = 1; > > Perhaps there are more files that need to be patched beyond that? I made an > attempt to add to the patch, but failed miserably. The patch should have to take care of the problem you are mentioning. I suspect you may not be able to successfully apply it. The gentoo way: - download and place the patch in the following directory: /etc/portage/patches/net-misc/asterisk-13.23.1 - while issuing: ebuild /usr/portage/net-misc/asterisk/asterisk-13.23.1.ebuild prepare, you should see an output like this: >>> Existing ${T}/environment for 'asterisk-13.23.1' will be sourced. Run >>> 'clean' to start with a fresh environment. >>> Checking asterisk-13.23.1.tar.gz's mtime... >>> Checking gentoo-asterisk-patchset-4.07.tar.bz2's mtime... >>> WORKDIR is up-to-date, keeping... * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> It appears that 'pretend' has already executed for 'asterisk-13.23.1'; skipping. >>> Remove '/var/tmp/portage/net-misc/asterisk-13.23.1/.pretended' to force pretend. >>> It appears that 'setup' has already executed for 'asterisk-13.23.1'; skipping. >>> Remove '/var/tmp/portage/net-misc/asterisk-13.23.1/.setuped' to force setup. >>> It appears that 'unpack' has already executed for 'asterisk-13.23.1'; skipping. >>> Remove '/var/tmp/portage/net-misc/asterisk-13.23.1/.unpacked' to force unpack. >>> Preparing source in /var/tmp/portage/net-misc/asterisk-13.23.1/work/asterisk-13.23.1 ... * Applying patches from /var/tmp/portage/net-misc/asterisk-13.23.1/work/asterisk-patchset ... * 01-uclibc.patch ... [ ok ] * 02-dahdiras-without-root.patch ... [ ok ] * 03-pbxstart-failed-spurious-bye.patch ... [ ok ] * 04-invert-gmime-search-order.patch ... [ ok ] * 05-dundi-null-dereference.patch ... [ ok ] * 06-no-var-run-install.patch ... [ ok ] * Applying asterisk-13.23.1-my_bool-error.patch ... [ ok ] * User patches applied. * Running eautoreconf in '/var/tmp/portage/net-misc/asterisk-13.23.1/work/asterisk-13.23.1' ... * Running aclocal -I autoconf -I third-party -I third-party/pjproject ... [ ok ] * Running autoconf -I autoconf -I third-party -I third-party/pjproject --force ... [ ok ] * Running autoheader -I autoconf -I third-party -I third-party/pjproject ... [ ok ] * Running elibtoolize in: asterisk-13.23.1/ * Running elibtoolize in: asterisk-13.23.1/main/editline/ * Running elibtoolize in: asterisk-13.23.1/menuselect/ >>> Source prepared. Please notice these two lines: * Applying asterisk-13.23.1-my_bool-error.patch ... [ ok ] * User patches applied. If you simply emerge the ebuild, it also reports the latter line at the end of the emerge. * User patches applied. If you don't see these messages, the patch has not been applied (assuming you are trying to follow the gentoo way). It is important to have a name with an extension .patch or .diff in order to be recognised by portage as an active user patch.
> If you simply emerge the ebuild, it also reports the latter line at the end > of the emerge. > * User patches applied. This may not be visible at the end, but it will certainly appear in build.log, if you are in doubt.
Created attachment 590006 [details, diff] asterisk-13.23.1-my_bool-error.patch Updated patch for asterisk-13.23.1 to compile it with mysql-8+ in case of [mysql] use flag enabled.
Confirm, compiled fine, thanks!
A different fix is to depend on dev-db/mysql-connector-c instead ... which is what https://bugs.gentoo.org/666004 is forcing us to anyway. This is in my latest update. PR pending.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b44a1be8b8e28517ce843e630e30ccc1ddf3fae4 commit b44a1be8b8e28517ce843e630e30ccc1ddf3fae4 Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2019-11-10 18:29:19 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2019-11-30 07:48:56 +0000 net-misc/asterisk: version bump to 13.29.1 + maintainership Converted to GLEP 81 for user+group. Consolidated a few DEPEND issues. Dropped pkg_config phase function. Took maintainership. Fixed a bunch of other issues from pkgcheck (${D} and ${ROOT} not having a / following it directly). Bumped to EAPI=7 Use $ED over $D where applicable. Fix statsd integration. Update depend on virtual/mysql to db/mysql-connector-c Enable NOISY_BUILD as requested (instructed) by slyfox. Fix /usr/share/doc/${PV} being asterisk: owned. Make SSL optional. This commit enables progress on the GLSA bug: https://bugs.gentoo.org/689796 Might close: https://bugs.gentoo.org/594160 (SIGILL, may be GRSEC, or #667498) Package-Manager: Portage-2.3.76, Repoman-2.3.16 Closes: https://bugs.gentoo.org/631464 Closes: https://bugs.gentoo.org/654710 Closes: https://bugs.gentoo.org/656472 Closes: https://bugs.gentoo.org/666004 Closes: https://bugs.gentoo.org/667498 Closes: https://bugs.gentoo.org/670522 Closes: https://bugs.gentoo.org/679804 Closes: https://bugs.gentoo.org/686906 Closes: https://bugs.gentoo.org/692696 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/13649 Signed-off-by: Joonas Niilola <juippis@gentoo.org> net-misc/asterisk/Manifest | 2 + net-misc/asterisk/asterisk-13.29.1.ebuild | 327 ++++++++++++++++++++++++++++++ net-misc/asterisk/metadata.xml | 21 +- 3 files changed, 342 insertions(+), 8 deletions(-)