Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646498 - <dev-db/postgresql-{9.5.11:9.5,9.6.7:9.6,10.2:10} fail to build with glibc-2.27
Summary: <dev-db/postgresql-{9.5.11:9.5,9.6.7:9.6,10.2:10} fail to build with glibc-2.27
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
: 647158 (view as bug list)
Depends on: 647246
Blocks: glibc-2.27
  Show dependency tree
 
Reported: 2018-02-03 16:19 UTC by Helmut Jarausch
Modified: 2018-05-21 02:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2018-02-03 16:19:39 UTC
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
Comment 1 Jonas Stein gentoo-dev 2018-02-04 13:26:41 UTC
Thank you. 
There should also be a "|| die" after sed.
Comment 2 Aaron W. Swenson gentoo-dev 2018-02-05 11:33:04 UTC
Thanks!

Have you submitted a bug or a patch to PostgreSQL?
Comment 3 Toralf Förster gentoo-dev 2018-02-10 14:41:26 UTC
*** Bug 647202 has been marked as a duplicate of this bug. ***
Comment 4 Arfrever Frehtes Taifersar Arahesis 2018-02-11 02:15:18 UTC
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.
Comment 5 Aaron W. Swenson gentoo-dev 2018-02-11 02:28:22 UTC
(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.
Comment 6 Aaron W. Swenson gentoo-dev 2018-02-11 03:20:59 UTC
*** Bug 647158 has been marked as a duplicate of this bug. ***
Comment 7 Aaron W. Swenson gentoo-dev 2018-05-21 02:22:31 UTC
Affected versions removed from tree.