Unable to build pg_rewind

Started by Ratay, Stevealmost 11 years ago5 messages
#1Ratay, Steve
Steve.Ratay@Teradata.com

I have checked out the pg_rewind code from https://github.com/vmware/pg_rewind.git on the master branch and am using PostgreSQL 9.4.1 source code to build against. When I try to compile pg_rewind, I am getting the following errors. How can I resolve these problems?

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql -I. -I./ -I/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server -I/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/internal -DFRONTEND -c -o parsexlog.o parsexlog.c

In file included from parsexlog.c:39:

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:28:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:29:68: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

In file included from parsexlog.c:39:

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:28: error: ‘PG_RMGR’ undeclared here (not in a function)

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:29: error: expected ‘}’ before ‘PG_RMGR’

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:30:64: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:31:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:32:68: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:33:73: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:34:81: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:35:69: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:36:73: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:37:65: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:38:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:39:65: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:40:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:41:81: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:42:87: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:43:62: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:44:87: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

parsexlog.c: In function ‘findLastCheckpoint’:

parsexlog.c:198: warning: implicit declaration of function ‘XLogRecGetInfo’

parsexlog.c:200: warning: implicit declaration of function ‘XLogRecGetRmid’

parsexlog.c: In function ‘extractPageInfo’:

parsexlog.c:344: error: ‘XLR_SPECIAL_REL_UPDATE’ undeclared (first use in this function)

parsexlog.c:344: error: (Each undeclared identifier is reported only once

parsexlog.c:344: error: for each function it appears in.)

parsexlog.c:358: error: ‘XLogReaderState’ has no member named ‘max_block_id’

parsexlog.c:364: warning: implicit declaration of function ‘XLogRecGetBlockTag’

make: *** [parsexlog.o] Error 1

#2Mark Kirkwood
mark.kirkwood@catalyst.net.nz
In reply to: Ratay, Steve (#1)
Re: Unable to build pg_rewind

On 25/02/15 11:06, Ratay, Steve wrote:

I have checked out the pg_rewind code from https://github.com/vmware/pg_rewind.git on the master branch and am using PostgreSQL 9.4.1 source code to build against. When I try to compile pg_rewind, I am getting the following errors. How can I resolve these problems?

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql -I. -I./ -I/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server -I/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/internal -DFRONTEND -c -o parsexlog.o parsexlog.c

In file included from parsexlog.c:39:

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:28:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:29:68: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

In file included from parsexlog.c:39:

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:28: error: �PG_RMGR� undeclared here (not in a function)

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:29: error: expected �}� before �PG_RMGR�

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:30:64: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:31:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:32:68: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:33:73: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:34:81: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:35:69: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:36:73: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:37:65: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:38:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:39:65: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:40:61: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:41:81: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:42:87: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:43:62: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

/var/tmp/vpagent/postgresql94-libs-9.4.1-build/usr/include/pgsql/server/access/rmgrlist.h:44:87: error: macro "PG_RMGR" requires 7 arguments, but only 6 given

parsexlog.c: In function �findLastCheckpoint�:

parsexlog.c:198: warning: implicit declaration of function �XLogRecGetInfo�

parsexlog.c:200: warning: implicit declaration of function �XLogRecGetRmid�

parsexlog.c: In function �extractPageInfo�:

parsexlog.c:344: error: �XLR_SPECIAL_REL_UPDATE� undeclared (first use in this function)

parsexlog.c:344: error: (Each undeclared identifier is reported only once

parsexlog.c:344: error: for each function it appears in.)

parsexlog.c:358: error: �XLogReaderState� has no member named �max_block_id�

parsexlog.c:364: warning: implicit declaration of function �XLogRecGetBlockTag�

make: *** [parsexlog.o] Error 1

It looks like master of pg_rewind expects to be built against Postgres
9.5. Try checking out the REL9_4_STABLE branch.

Cheers

Mark

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Michael Paquier
michael.paquier@gmail.com
In reply to: Mark Kirkwood (#2)
Re: Unable to build pg_rewind

On Wed, Feb 25, 2015 at 8:03 AM, Mark Kirkwood <
mark.kirkwood@catalyst.net.nz> wrote:

On 25/02/15 11:06, Ratay, Steve wrote:

I have checked out the pg_rewind code from
https://github.com/vmware/pg_rewind.git on the master branch and am
using PostgreSQL 9.4.1 source code to build against. When I try to compile
pg_rewind, I am getting the following errors. How can I resolve these
problems?

It looks like master of pg_rewind expects to be built against Postgres
9.5. Try checking out the REL9_4_STABLE branch.

This branching model makes management of the code easier because
WAL-related APIs and WAL format can change a lot between major releases
(and also because in this case it would have made the code less readable
using blocks based on PG_VERSION_NUM for not that much result).

Note as well that pg_rewind is not (yet?) added in PostgreSQL core, so you
should ask directly questions here:
https://github.com/vmware/pg_rewind/issues
Regards,
--
Michael

#4Mark Kirkwood
mark.kirkwood@catalyst.net.nz
In reply to: Michael Paquier (#3)
Re: Unable to build pg_rewind

On 25/02/15 12:47, Michael Paquier wrote:

On Wed, Feb 25, 2015 at 8:03 AM, Mark Kirkwood
<mark.kirkwood@catalyst.net.nz <mailto:mark.kirkwood@catalyst.net.nz>>
wrote:

On 25/02/15 11:06, Ratay, Steve wrote:

I have checked out the pg_rewind code from
https://github.com/vmware/pg_rewind.git on the master branch and
am using PostgreSQL 9.4.1 source code to build against. When I
try to compile pg_rewind, I am getting the following errors.
How can I resolve these problems?

It looks like master of pg_rewind expects to be built against
Postgres 9.5. Try checking out the REL9_4_STABLE branch.

This branching model makes management of the code easier because
WAL-related APIs and WAL format can change a lot between major releases
(and also because in this case it would have made the code less readable
using blocks based on PG_VERSION_NUM for not that much result).

Absolutely - and you've used the same branch names as the postgresql git
repo does - so really nice and easy to match things up!

Cheers

Mark

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Ratay, Steve
Steve.Ratay@Teradata.com
In reply to: Michael Paquier (#3)
Re: Unable to build pg_rewind

Thanks all. I opened an issue in GitHub (https://github.com/vmware/pg_rewind/issues/43). Sorry for posting to the wrong spot. I found some discussions on pg_rewind on this list, so I thought it was the appropriate place to send my questions.

Thanks, Steve

From: Michael Paquier <michael.paquier@gmail.com<mailto:michael.paquier@gmail.com>>
Date: Tuesday, February 24, 2015 at 6:47 PM
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz<mailto:mark.kirkwood@catalyst.net.nz>>
Cc: Steven Ratay <steve.ratay@teradata.com<mailto:steve.ratay@teradata.com>>, "pgsql-hackers@postgresql.org<mailto:pgsql-hackers@postgresql.org>" <pgsql-hackers@postgresql.org<mailto:pgsql-hackers@postgresql.org>>
Subject: Re: [HACKERS] Unable to build pg_rewind

On Wed, Feb 25, 2015 at 8:03 AM, Mark Kirkwood <mark.kirkwood@catalyst.net.nz<mailto:mark.kirkwood@catalyst.net.nz>> wrote:
On 25/02/15 11:06, Ratay, Steve wrote:
I have checked out the pg_rewind code from https://github.com/vmware/pg_rewind.git on the master branch and am using PostgreSQL 9.4.1 source code to build against. When I try to compile pg_rewind, I am getting the following errors. How can I resolve these problems?

It looks like master of pg_rewind expects to be built against Postgres 9.5. Try checking out the REL9_4_STABLE branch.

This branching model makes management of the code easier because WAL-related APIs and WAL format can change a lot between major releases (and also because in this case it would have made the code less readable using blocks based on PG_VERSION_NUM for not that much result).

Note as well that pg_rewind is not (yet?) added in PostgreSQL core, so you should ask directly questions here:
https://github.com/vmware/pg_rewind/issues
Regards,
--
Michael