Open japinli opened 9 months ago
Hi, for compiling pg_probackup you can try the command
make -j $(nproc) USE_PGXS=1 PG_CONFIG="$PG_CONFIG"
Where PG_CONFIG is path ../bin/pg_config of required postgresql
@demonolock Thanks for your reply! It seems doesn't work.
$ make -j $(nproc) USE_PGXS=1 top_srcdir=/home/japin/Codes/postgres -s PG_CONFIG=/home/japin/Codes/postgres/build/pg/bin/pg_config
src/utils/file.c: In function ‘fio_gzread’:
src/utils/file.c:1676:43: warning: passing argument 2 of ‘fio_read’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1676 | rc = fio_read(gz->fd, gz->strm.next_in + gz->strm.avail_in,
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
src/utils/file.c:1096:24: note: expected ‘void *’ but argument is of type ‘const Bytef *’ {aka ‘const unsigned char *’}
1096 | fio_read(int fd, void* buf, size_t size)
| ~~~~~~^~~
src/utils/file.c: In function ‘fio_send_file_gz’:
src/utils/file.c:2510:14: warning: declaration of ‘hdr’ shadows a previous local [-Wshadow=compatible-local]
2510 | fio_header hdr;
| ^~~
src/utils/file.c:2491:13: note: shadowed declaration is here
2491 | fio_header hdr;
| ^~~
src/catalog.c: In function ‘catalog_get_timelines’:
src/catalog.c:1758:17: warning: declaration of ‘tlinfo’ shadows a previous local [-Wshadow=compatible-local]
1758 | timelineInfo *tlinfo = parray_get(timelineinfos, i);
| ^~~~~~
src/catalog.c:1537:16: note: shadowed declaration is here
1537 | timelineInfo *tlinfo;
| ^~~~~~
src/catalog.c:1775:17: warning: declaration of ‘tlinfo’ shadows a previous local [-Wshadow=compatible-local]
1775 | timelineInfo *tlinfo = parray_get(timelineinfos, i);
| ^~~~~~
src/catalog.c:1537:16: note: shadowed declaration is here
1537 | timelineInfo *tlinfo;
| ^~~~~~
src/catalog.c:1848:17: warning: declaration of ‘tlinfo’ shadows a previous local [-Wshadow=compatible-local]
1848 | timelineInfo *tlinfo = parray_get(timelineinfos, i);
| ^~~~~~
src/catalog.c:1537:16: note: shadowed declaration is here
1537 | timelineInfo *tlinfo;
| ^~~~~~
src/catalog.c:2084:17: warning: declaration of ‘tlinfo’ shadows a previous local [-Wshadow=compatible-local]
2084 | timelineInfo *tlinfo = parray_get(timelineinfos, i);
| ^~~~~~
src/catalog.c:1537:16: note: shadowed declaration is here
1537 | timelineInfo *tlinfo;
| ^~~~~~
src/stream.c:11:10: fatal error: receivelog.h: No such file or directory
11 | #include "receivelog.h"
| ^~~~~~~~~~~~~~
compilation terminated.
make: *** [/home/japin/Codes/postgres/build/pg/lib/pgxs/src/makefiles/../../src/Makefile.global:949: src/stream.o] Error 1
make: *** Waiting for unfinished jobs....
When the postgres comipled using
--with-llvm
, I try to parallelly build pg_probackup, it failed, here is the log:It seems
receivelog.h
is only used bysrc/stream.c
, so i try to modifyMakefile
with following:It failed with clang build
stream.bc
:Then, I try the following:
Why the first one doesn't work?