To build dev-db/postgresql-10.1 with glibc-2.27 one has to - re-emerge dev-lang/tcl since the old version (/usr/lib64/pkgconfig/tcl.pc) requires libieee which doesn't exit any more - needs a patch since glibc' /usr/include/unistd.h now has a definition of copy_file_range You have to add # glibc-2.27 sed -i -e"s/copy_file_range/Copy_File_Range/g" src/bin/pg_rewind/copy_fetch.c at the end of src_prepare - this doesn't hurt with any glibc version since it is a static function in copy_fetch.c
Thank you. There should also be a "|| die" after sed.
Thanks! Have you submitted a bug or a patch to PostgreSQL?
*** Bug 647202 has been marked as a duplicate of this bug. ***
https://www.postgresql.org/docs/9.5/static/release-9-5-11.html and https://www.postgresql.org/docs/9.6/static/release-9-6-7.html and https://www.postgresql.org/docs/10/static/release-10-2.html mention: """ ・ Rename pg_rewind's copy_file_range function to avoid conflict with new Linux system call of that name (Andres Freund) This change prevents build failures with newer glibc versions. """ But it would have been better to make custom definition of copy_file_range() function conditional on availability of this function in libc: #if ! HAVE_COPY_FILE_RANGE ... #endif Release notes of 9.3.21 and 9.4.16 do not mention any fix, so updating summary.
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #4) > Release notes of 9.3.21 and 9.4.16 do not mention any fix, so updating > summary. 9.3 and 9.4 don't mention it because pg_rewind (that had copy_file_range() the function call) was introduced in 9.5. There's nothing to fix for 9.3 or 9.4.
*** Bug 647158 has been marked as a duplicate of this bug. ***
Affected versions removed from tree.