On Sun, 2018-02-04 at 11:42 +0100, Thomas Trepl wrote: > Hi, > > got a abort message when compiling postgresql: > > gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after- > statement -Wendif-labels -Wmissing-format-attribute -Wformat-security > -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 > -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include - > D_GNU_SOURCE -c -o copy_fetch.o copy_fetch.c > copy_fetch.c:159:1: Fehler: In Konflikt stehende Typen für > »copy_file_range« > copy_file_range(const char *path, off_t begin, off_t end, bool > trunc) > ^~~~~~~~~~~~~~~ > In file included from copy_fetch.c:15:0: > /usr/include/unistd.h:1110:9: Anmerkung: Vorherige Deklaration von > »copy_file_range« war hier > ssize_t copy_file_range (int __infd, __off64_t *__pinoff, > ^~~~~~~~~~~~~~~ > make[3]: *** [<eingebaut>: copy_fetch.o] Fehler 1 > make[3]: Verzeichnis „/tmp/postgresql/build/postgresql- > 10.1/src/bin/pg_rewind“ wird verlassen > make[2]: *** [Makefile:40: all-pg_rewind-recurse] Fehler 2 > make[2]: Verzeichnis „/tmp/postgresql/build/postgresql-10.1/src/bin“ > wird verlassen > make[1]: *** [Makefile:37: all-bin-recurse] Fehler 2 > make[1]: Verzeichnis „/tmp/postgresql/build/postgresql-10.1/src“ wird > verlassen > make: *** [GNUmakefile:11: all-src-recurse] Fehler 2 > > To me it looks like a clash to the standard library function > copy_file_range. It's easy to fix as postgresql's copy_file_range is > a > static function. I did following sed > > sed -e "s/copy_file_range/_&/" \ > -i src/bin/pg_rewind/copy_fetch.c > > with which compilation was successfull. Donno whether it is caused > now > by gcc-7.3 and/or glibc-2.27 (on i686). > > Have you seen that issue, too or is it something wired here locally? > > -- > Thomas
From what I've seen, glibc-2.27 introduced copy_file_range. You could try and swap any instance of copy_file_range in postgresql with, say, pg_copy_file_range to avoid conflicts (or try and delete copy_file_range in pgsql entirely, and let it use the one from glibc). -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
