Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

compile failed #17

Open
ROBERT-MCDOWELL opened this issue Jul 1, 2019 · 0 comments
Open

compile failed #17

ROBERT-MCDOWELL opened this issue Jul 1, 2019 · 0 comments

Comments

@ROBERT-MCDOWELL
Copy link

Fedora 29 gcc 8.3.1

[root@node177 pg_paxos]# make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -fPIC -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Iinclude -I/usr/local/pgsql/include -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/pg_paxos.o src/pg_paxos.c -MMD -MP -MF .deps/pg_paxos.Po
src/pg_paxos.c: In function ‘_PG_init’:
src/pg_paxos.c:138:22: error: assignment to ‘ProcessUtility_hook_type’ {aka ‘void (*)(struct PlannedStmt *, const char *, enum , struct ParamListInfoData *, struct QueryEnvironment *, struct _DestReceiver *, char )’} from incompatible pointer type ‘void ()(Node *, const char *, ProcessUtilityContext, struct ParamListInfoData *, DestReceiver *, char )’ {aka ‘void ()(struct Node *, const char *, enum , struct ParamListInfoData *, struct _DestReceiver *, char *)’} [-Werror=incompatible-pointer-types]
ProcessUtility_hook = PgPaxosProcessUtility;
^
In file included from /usr/local/pgsql/include/server/nodes/pg_list.h:40,
from /usr/local/pgsql/include/server/access/tupdesc.h:19,
from /usr/local/pgsql/include/server/funcapi.h:21,
from src/pg_paxos.c:17:
src/pg_paxos.c: In function ‘PgPaxosPlanner’:
/usr/local/pgsql/include/server/nodes/nodes.h:628:27: error: implicit declaration of function ‘typeof’; did you mean ‘pg_typeof’? [-Werror=implicit-function-declaration]
#define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj))
^~~~~~
src/pg_paxos.c:206:23: note: in expansion of macro ‘copyObject’
Query *paxosQuery = copyObject(query);
^~~~~~~~~~
/usr/local/pgsql/include/server/nodes/nodes.h:628:40: error: expected ‘)’ before ‘copyObjectImpl’
#define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj))
~ ^~~~~~~~~~~~~~
src/pg_paxos.c:206:23: note: in expansion of macro ‘copyObject’
Query *paxosQuery = copyObject(query);
^~~~~~~~~~
/usr/local/pgsql/include/server/nodes/nodes.h:628:25: error: initialization of ‘Query *’ {aka ‘struct Query *’} from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
#define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj))
^
src/pg_paxos.c:206:23: note: in expansion of macro ‘copyObject’
Query *paxosQuery = copyObject(query);
^~~~~~~~~~
src/pg_paxos.c: In function ‘PgPaxosExecutorStart’:
src/pg_paxos.c:554:3: error: implicit declaration of function ‘PreventTransactionChain’; did you mean ‘PreventInTransactionBlock’? [-Werror=implicit-function-declaration]
PreventTransactionChain(isTopLevel, "paxos commands");
^~~~~~~~~~~~~~~~~~~~~~~
PreventInTransactionBlock
src/pg_paxos.c:573:42: error: passing argument 1 of ‘pg_analyze_and_rewrite’ from incompatible pointer type [-Werror=incompatible-pointer-types]
queryTreeList = pg_analyze_and_rewrite(parseTreeNode, paxosQueryString, NULL, 0);
^~~~~~~~~~~~~
In file included from /usr/local/pgsql/include/server/tcop/utility.h:17,
from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/tcopprot.h:51:14: note: expected ‘RawStmt *’ {aka ‘struct RawStmt *’} but argument is of type ‘Node *’ {aka ‘struct Node *’}
extern List *pg_analyze_and_rewrite(RawStmt *parsetree,
^~~~~~~~~~~~~~~~~~~~~~
src/pg_paxos.c:573:19: error: too few arguments to function ‘pg_analyze_and_rewrite’
queryTreeList = pg_analyze_and_rewrite(parseTreeNode, paxosQueryString, NULL, 0);
^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/pgsql/include/server/tcop/utility.h:17,
from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/tcopprot.h:51:14: note: declared here
extern List *pg_analyze_and_rewrite(RawStmt *parsetree,
^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/pgsql/include/server/nodes/pg_list.h:40,
from /usr/local/pgsql/include/server/access/tupdesc.h:19,
from /usr/local/pgsql/include/server/funcapi.h:21,
from src/pg_paxos.c:17:
src/pg_paxos.c: In function ‘PgPaxosProcessUtility’:
/usr/local/pgsql/include/server/nodes/nodes.h:628:40: error: expected ‘)’ before ‘copyObjectImpl’
#define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj))
~ ^~~~~~~~~~~~~~
src/pg_paxos.c:826:21: note: in expansion of macro ‘copyObject’
Node *rawQuery = copyObject(copyStatement->query);
^~~~~~~~~~
/usr/local/pgsql/include/server/nodes/nodes.h:628:25: error: initialization of ‘Node *’ {aka ‘struct Node *’} from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
#define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj))
^
src/pg_paxos.c:826:21: note: in expansion of macro ‘copyObject’
Node *rawQuery = copyObject(copyStatement->query);
^~~~~~~~~~
src/pg_paxos.c:841:46: error: passing argument 1 of ‘pg_analyze_and_rewrite’ from incompatible pointer type [-Werror=incompatible-pointer-types]
List *queryList = pg_analyze_and_rewrite(rawQuery, queryString,
^~~~~~~~
In file included from /usr/local/pgsql/include/server/tcop/utility.h:17,
from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/tcopprot.h:51:14: note: expected ‘RawStmt *’ {aka ‘struct RawStmt *’} but argument is of type ‘Node *’ {aka ‘struct Node *’}
extern List *pg_analyze_and_rewrite(RawStmt *parsetree,
^~~~~~~~~~~~~~~~~~~~~~
src/pg_paxos.c:841:23: error: too few arguments to function ‘pg_analyze_and_rewrite’
List *queryList = pg_analyze_and_rewrite(rawQuery, queryString,
^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/pgsql/include/server/tcop/utility.h:17,
from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/tcopprot.h:51:14: note: declared here
extern List *pg_analyze_and_rewrite(RawStmt *parsetree,
^~~~~~~~~~~~~~~~~~~~~~
src/pg_paxos.c:864:30: error: passing argument 1 of ‘PreviousProcessUtilityHook’ from incompatible pointer type [-Werror=incompatible-pointer-types]
PreviousProcessUtilityHook(parsetree, queryString, context,
^~~~~~~~~
src/pg_paxos.c:864:30: note: expected ‘PlannedStmt *’ {aka ‘struct PlannedStmt *’} but argument is of type ‘Node *’ {aka ‘struct Node *’}
src/pg_paxos.c:865:20: error: passing argument 5 of ‘PreviousProcessUtilityHook’ from incompatible pointer type [-Werror=incompatible-pointer-types]
params, dest, completionTag);
^~~~
src/pg_paxos.c:865:20: note: expected ‘QueryEnvironment *’ {aka ‘struct QueryEnvironment *’} but argument is of type ‘DestReceiver *’ {aka ‘struct _DestReceiver *’}
src/pg_paxos.c:865:26: error: passing argument 6 of ‘PreviousProcessUtilityHook’ from incompatible pointer type [-Werror=incompatible-pointer-types]
params, dest, completionTag);
^~~~~~~~~~~~~
src/pg_paxos.c:865:26: note: expected ‘DestReceiver *’ {aka ‘struct _DestReceiver *’} but argument is of type ‘char *’
src/pg_paxos.c:864:3: error: too few arguments to function ‘PreviousProcessUtilityHook’
PreviousProcessUtilityHook(parsetree, queryString, context,
^~~~~~~~~~~~~~~~~~~~~~~~~~
src/pg_paxos.c:869:27: error: passing argument 1 of ‘standard_ProcessUtility’ from incompatible pointer type [-Werror=incompatible-pointer-types]
standard_ProcessUtility(parsetree, queryString, context,
^~~~~~~~~
In file included from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/utility.h:40:50: note: expected ‘PlannedStmt *’ {aka ‘struct PlannedStmt *’} but argument is of type ‘Node *’ {aka ‘struct Node *’}
extern void standard_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
~~~~~~~~~~~~~^~~~~
src/pg_paxos.c:870:17: error: passing argument 5 of ‘standard_ProcessUtility’ from incompatible pointer type [-Werror=incompatible-pointer-types]
params, dest, completionTag);
^~~~
In file included from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/utility.h:42:25: note: expected ‘QueryEnvironment *’ {aka ‘struct QueryEnvironment *’} but argument is of type ‘DestReceiver *’ {aka ‘struct _DestReceiver *’}
QueryEnvironment *queryEnv,
~~~~~~~~~~~~~~~~~~^~~~~~~~
src/pg_paxos.c:870:23: error: passing argument 6 of ‘standard_ProcessUtility’ from incompatible pointer type [-Werror=incompatible-pointer-types]
params, dest, completionTag);
^~~~~~~~~~~~~
In file included from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/utility.h:43:21: note: expected ‘DestReceiver *’ {aka ‘struct _DestReceiver *’} but argument is of type ‘char *’
DestReceiver *dest, char *completionTag);
~~~~~~~~~~~~~~^~~~
src/pg_paxos.c:869:3: error: too few arguments to function ‘standard_ProcessUtility’
standard_ProcessUtility(parsetree, queryString, context,
^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/pg_paxos.c:48:
/usr/local/pgsql/include/server/tcop/utility.h:40:13: note: declared here
extern void standard_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/Makefile.global:899: src/pg_paxos.o] Error 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant