Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 692672 - gnome-extra/libgda-5.2.8-r1 USE="mysql" fails with dev-db/mysql-connector-c-8.0.17-r1: gda-mysql-provider.c:1838:2: error: unknown type name ‘my_bool’
Summary: gnome-extra/libgda-5.2.8-r1 USE="mysql" fails with dev-db/mysql-connector-c-8...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://gitlab.gnome.org/GNOME/libgda...
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: mysql-8
  Show dependency tree
 
Reported: 2019-08-21 12:07 UTC by Attila Tóth
Modified: 2020-09-19 20:32 UTC (History)
4 users (show)

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


Attachments
libgda-5.2.8-my_bool-error.diff (libgda-5.2.8-my_bool-error.diff,5.58 KB, patch)
2019-08-21 12:09 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 12:07:19 UTC
gda-mysql-provider.c: In function ‘real_prepare’:
gda-mysql-provider.c:1838:2: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 1838 |  my_bool update_max_length = 1;
      |  ^~~~~~~
      |  bool
gda-mysql-provider.c: In function ‘prepare_stmt_simple’:
gda-mysql-provider.c:1944:2: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 1944 |  my_bool update_max_length = 1;
      |  ^~~~~~~
      |  bool
gda-mysql-provider.c: In function ‘gda_mysql_provider_statement_execute’:
gda-mysql-provider.c:2330:36: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’?
 2330 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                    ^~~~~~~
      |                                    bool
gda-mysql-provider.c:2330:36: note: each undeclared identifier is reported only once for each function it appears in
gda-mysql-provider.c:2330:44: error: expected expression before ‘)’ token
 2330 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-provider.c:2350:44: error: expected expression before ‘)’ token
 2350 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-provider.c:2402:44: error: expected expression before ‘)’ token
 2402 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-provider.c:2462:44: error: expected expression before ‘)’ token
 2462 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-provider.c:2498:44: error: expected expression before ‘)’ token
 2498 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-provider.c:2531:44: error: expected expression before ‘)’ token
 2531 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-provider.c:2551:44: error: expected expression before ‘)’ token
 2551 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-provider.c:2627:44: error: expected expression before ‘)’ token
 2627 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-recordset.c: In function ‘gda_mysql_recordset_new’:
gda-mysql-recordset.c:630:53: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’?
  630 |   mysql_bind_result[i].is_null = g_malloc0 (sizeof (my_bool));
      |                                                     ^~~~~~~
      |                                                     bool
gda-mysql-recordset.c:630:53: note: each undeclared identifier is reported only once for each function it appears in
gda-mysql-provider.c:2668:44: error: expected expression before ‘)’ token
 2668 |     mysql_bind_param[i].is_null = (my_bool*)1;
      |                                            ^
gda-mysql-recordset.c: In function ‘new_row_from_mysql_stmt’:
gda-mysql-recordset.c:756:4: error: unknown type name ‘my_bool’; did you mean ‘bool’?
  756 |    my_bool truncated;
      |    ^~~~~~~
      |    bool
gda-mysql-recordset.c:757:33: warning: assignment to ‘_Bool *’ from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types]
  757 |    mysql_bind_result[col].error = &truncated;
      |                                 ^
gda-mysql-recordset.c:787:3: error: unknown type name ‘my_bool’; did you mean ‘bool’?
  787 |   my_bool is_null = FALSE;
      |   ^~~~~~~
      |   bool
gda-mysql-recordset.c:790:60: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’?
  790 |   memmove (&is_null, mysql_bind_result[i].is_null, sizeof (my_bool));
      |                                                            ^~~~~~~
Comment 1 Attila Tóth 2019-08-21 12:08:07 UTC
This bug is related to the recent mysql-8 & mysql-connector-c-8 version bump.
Candidate for tracker:
https://bugs.gentoo.org/692570
Comment 2 Attila Tóth 2019-08-21 12:09:12 UTC
Created attachment 587742 [details, diff]
libgda-5.2.8-my_bool-error.diff

Proposed patch to make it compile with the recent version of mysql-connector-c.
Comment 3 Fred Krogh 2019-09-10 20:30:17 UTC
Patch works for me.
Comment 4 AstroFloyd 2020-02-24 09:49:48 UTC
Same issue here still after six months (for the stable version of gnome-extra/libgda!), and the patch solves this - thanks!

I added an ebuild for libgda-5.2.8-r2 using the patch to my private Gentoo repository: https://cgit.gentoo.org/user/AstroFloyd.git/tree/gnome-extra/libgda - should this or something similar be in Portage for a simpler workaround (unmasking rather than patching manually)?
Comment 5 Kelly Black 2020-02-24 16:16:42 UTC
I had the same issue. The patch fixed it for me as well. Thank you!
Comment 6 hangglider 2020-08-12 09:10:36 UTC
Same here. Patch maybe fixed it - I simply added line

typedef bool my_bool;

to providers/mysql/gda-mysql.h, as I noticed mysql uses 'bool' too.
Comment 7 Eric 2020-09-05 14:17:35 UTC
(In reply to Kelly Black from comment #5)
> I had the same issue. The patch fixed it for me as well. Thank you!

how do you use the patch please?
Comment 8 Attila Tóth 2020-09-05 16:42:46 UTC
(In reply to Eric from comment #7)
> (In reply to Kelly Black from comment #5)
> > I had the same issue. The patch fixed it for me as well. Thank you!
> 
> how do you use the patch please?

1. Create directory:
/etc/portage/patches/gnome-extra/libgda-5.2.8
2. Copy/save the patch in that directory
3. Re-emerge libgda
Note, that if a solution gets into portage, you may need to delete or disable the patch by renaming it to make the package compile.