unknown type name ‘my_bool’
VinayIsHere opened this issue · comments
Vinay Kumar Shukla commented
While running make
command I am getting the following error
ake all-recursive
make[1]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server'
Making all in include
make[2]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/include'
Making all in ccnet
make[3]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/include/ccnet'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/include/ccnet'
make[3]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/include'
make[2]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/include'
Making all in lib
make[2]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/lib'
make all-am
make[3]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/lib'
make[2]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/lib'
Making all in net
make[2]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/net'
Making all in common
make[3]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/net/common'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/net/common'
Making all in server
make[3]: Entering directory '/home/vinay/Documents/seafile_source/ccnet-server/net/server'
depbase=`echo ../common/ccnet-db.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DCCNET_SERVER -I../../net/common -I../../include -I../../include/ccnet -I../../lib -I../../include -I../../lib -pthread -I/usr/local/include -I/usr/local/include/searpc -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/mysql -Wall -g -O2 -MT ../common/ccnet-db.o -MD -MP -MF $depbase.Tpo -c -o ../common/ccnet-db.o ../common/ccnet-db.c &&\
mv -f $depbase.Tpo $depbase.Po
../common/ccnet-db.c: In function ‘mysql_db_get_connection’:
../common/ccnet-db.c:560:5: error: unknown type name ‘my_bool’; did you mean ‘bool’?
560 | my_bool yes = 1;
| ^~~~~~~
| bool
../common/ccnet-db.c: In function ‘_bind_params_mysql’:
../common/ccnet-db.c:664:20: error: unknown type name ‘my_bool’
664 | static my_bool yes = TRUE;
| ^~~~~~~
../common/ccnet-db.c:672:35: warning: assignment to ‘_Bool *’ from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types]
672 | params[i].is_null = &yes;
| ^
In file included from /usr/include/glib-2.0/glib/glist.h:32,
from /usr/include/glib-2.0/glib/ghash.h:33,
from /usr/include/glib-2.0/glib.h:50,
from ../../include/ccnet/option.h:7,
from ../common/common.h:18,
from ../common/ccnet-db.c:2:
../common/ccnet-db.c: In function ‘mysql_db_query_foreach_row’:
../common/ccnet-db.c:791:42: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’?
791 | row.results[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~~
/usr/include/glib-2.0/glib/gmem.h:227:3: note: in definition of macro ‘_G_NEW’
227 | (struct_type *) (G_GNUC_EXTENSION ({ \
| ^~~~~~~~~~~
../common/ccnet-db.c:791:34: note: in expansion of macro ‘g_new0’
791 | row.results[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~
../common/ccnet-db.c:791:42: note: each undeclared identifier is reported only once for each function it appears in
791 | row.results[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~~
/usr/include/glib-2.0/glib/gmem.h:227:3: note: in definition of macro ‘_G_NEW’
227 | (struct_type *) (G_GNUC_EXTENSION ({ \
| ^~~~~~~~~~~
../common/ccnet-db.c:791:34: note: in expansion of macro ‘g_new0’
791 | row.results[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~
/usr/include/glib-2.0/glib/gmem.h:227:16: error: expected expression before ‘)’ token
227 | (struct_type *) (G_GNUC_EXTENSION ({ \
| ^
/usr/include/glib-2.0/glib/gmem.h:299:42: note: in expansion of macro ‘_G_NEW’
299 | #define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0)
| ^~~~~~
../common/ccnet-db.c:791:34: note: in expansion of macro ‘g_new0’
791 | row.results[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~
/usr/include/glib-2.0/glib/gmem.h:232:22: error: ‘__n’ undeclared (first use in this function); did you mean ‘__p’?
232 | __p = g_##func (__n); \
| ^~~
/usr/include/glib-2.0/glib/gmem.h:299:42: note: in expansion of macro ‘_G_NEW’
299 | #define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0)
| ^~~~~~
../common/ccnet-db.c:791:34: note: in expansion of macro ‘g_new0’
791 | row.results[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~
../common/ccnet-db.c: In function ‘mysql_db_row_get_column_string’:
../common/ccnet-db.c:888:45: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’?
888 | row->new_binds[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~~
/usr/include/glib-2.0/glib/gmem.h:227:3: note: in definition of macro ‘_G_NEW’
227 | (struct_type *) (G_GNUC_EXTENSION ({ \
| ^~~~~~~~~~~
../common/ccnet-db.c:888:37: note: in expansion of macro ‘g_new0’
888 | row->new_binds[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~
/usr/include/glib-2.0/glib/gmem.h:227:16: error: expected expression before ‘)’ token
227 | (struct_type *) (G_GNUC_EXTENSION ({ \
| ^
/usr/include/glib-2.0/glib/gmem.h:299:42: note: in expansion of macro ‘_G_NEW’
299 | #define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0)
| ^~~~~~
../common/ccnet-db.c:888:37: note: in expansion of macro ‘g_new0’
888 | row->new_binds[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~
/usr/include/glib-2.0/glib/gmem.h:232:22: error: ‘__n’ undeclared (first use in this function); did you mean ‘__p’?
232 | __p = g_##func (__n); \
| ^~~
/usr/include/glib-2.0/glib/gmem.h:299:42: note: in expansion of macro ‘_G_NEW’
299 | #define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0)
| ^~~~~~
../common/ccnet-db.c:888:37: note: in expansion of macro ‘g_new0’
888 | row->new_binds[i].is_null = g_new0 (my_bool, 1);
| ^~~~~~
make[3]: *** [Makefile:693: ../common/ccnet-db.o] Error 1
make[3]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/net/server'
make[2]: *** [Makefile:388: all-recursive] Error 1
make[2]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server/net'
make[1]: *** [Makefile:492: all-recursive] Error 1
make[1]: Leaving directory '/home/vinay/Documents/seafile_source/ccnet-server'
make: *** [Makefile:401: all] Error 2
how to solve this
My mariadb
version
mariadb Ver 15.1 Distrib 10.5.10-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Please help
Vinay Kumar Shukla commented
so inside the below path
ccnet-server/net/common
I just search for the my_bool
type using
grep -nr 'my_bool' *
I got four results in the same file, the file was ccnet-db.c
, So I just changed them from my_bool
to bool
and then it works.