Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692696 - net-misc/asterisk-13.23.1 USE=mysql with dev-db/mysql-connector-c-8.0.17-r1 : cdr_mysql.c:184:2: error: unknown type name ‘my_bool’
Summary: net-misc/asterisk-13.23.1 USE=mysql with dev-db/mysql-connector-c-8.0.17-r1 :...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tony Vroon
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: mysql-8
  Show dependency tree
 
Reported: 2019-08-21 19:03 UTC by Attila Tóth
Modified: 2019-10-22 16:50 UTC (History)
0 users

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


Attachments
asterisk-13.23.1-my_bool-error.diff (asterisk-13.23.1-my_bool-error.diff,1.35 KB, patch)
2019-08-21 19:06 UTC, Attila Tóth
Details | Diff
asterisk-13.23.1-my_bool-error.patch (asterisk-13.23.1-my_bool-error.patch,576 bytes, patch)
2019-09-16 15:44 UTC, Attila Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2019-08-21 19:03:58 UTC
[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):
Comment 1 Attila Tóth 2019-08-21 19:05:02 UTC
Related to the recent upgrade to mysql-8 & mysql-connector-c-8.
Candidate for tracker:
https://bugs.gentoo.org/692570
Comment 2 Attila Tóth 2019-08-21 19:06:48 UTC
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.
Comment 3 Russell Dwiggins 2019-09-15 21:22:33 UTC
(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.
Comment 4 Attila Tóth 2019-09-16 15:27:30 UTC
(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.
Comment 5 Attila Tóth 2019-09-16 15:40:30 UTC
> 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.
Comment 6 Attila Tóth 2019-09-16 15:44:44 UTC
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.
Comment 7 Alex D-Bug 2019-09-26 23:11:11 UTC
Confirm, compiled fine, thanks!