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)); | ^~~~~~~
This bug is related to the recent mysql-8 & mysql-connector-c-8 version bump. Candidate for tracker: https://bugs.gentoo.org/692570
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.
Patch works for me.
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)?
I had the same issue. The patch fixed it for me as well. Thank you!
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.
(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?
(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.
Same problem with gnome-extra/libgda-5.2.9 The patch works there also (actually it is a generic one for all 5.2.X versions)... Shame it is still not implemented in portage for both versions
After applying the patch, i still can't compile it
Created attachment 687615 [details] build.log.xz
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a2c12ba5c70d6887856c59e6c1b4e2633f9a441 commit 1a2c12ba5c70d6887856c59e6c1b4e2633f9a441 Author: shimataro <shimataro@zelkova.cc> AuthorDate: 2021-09-22 21:19:37 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-09-25 02:45:57 +0000 gnome-extra/libgda: fix build with newer MySQL Thanks-to: Attila Tóth <atoth@atoth.sote.hu> Closes: https://bugs.gentoo.org/692672 Signed-off-by: shimataro <shimataro@zelkova.cc> Closes: https://github.com/gentoo/gentoo/pull/22367 Signed-off-by: Sam James <sam@gentoo.org> .../libgda/files/libgda-5.2-my_bool-error.patch | 136 +++++++++++++++++++++ gnome-extra/libgda/libgda-5.2.9.ebuild | 3 + 2 files changed, 139 insertions(+)