Page MenuHomePhabricator

Add support for Glibc version 2.28
ClosedPublic

Authored by Fabien on Sep 27 2019, 13:13.

Details

Summary

The Glibc backward compatibility feature handles up to version 2.27
(used by Ubuntu Bionic). This diffs adds support for the version 2.28
(used by Debian Buster).

There is an additional compatibility fix involved due to the update of
fcntl() and the introduction of the new fcntl64() function.
These functions are linked against their previous version through a
compatibility symbol.

Test Plan

Cross build for all the linux platforms on an OS that ships Glibc 2.28
(tested on Debian Buster). Use both autotools and cmake for the
build.
Run the symbol-check.py script against the binaries and check there is
no complaint on fcntl or fcntl64 symbol being from a too recent
Glibc.
Check the binaries run on OS with a libc.so.6 version < 2.28

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note to reviewers:

This is WIP while the gitian builds on glibc < 2.28 are running.
The cmake tests have been run locally, the gitian builds over glibc 2.28 are running.

This diff is set up for early review, so if changes are requested it can be handled quickly.

Fabien planned changes to this revision.Sep 27 2019, 13:35

Build fails with autotools (is_same(off_t, off64_t) returns true on linux32 platform ???).

Fix autotools detection by moving the check before the CFLAGS enforce LFS.
Fix glibc_compat.cpp comment confusion between LFS and LFN.

Revert configure logic to wrap when needed.

Rebase on master (was on top of D4095, thus failing the symbol check with gitian on stretch).

This revision is now accepted and ready to land.Sep 28 2019, 14:53
Fabien planned changes to this revision.Sep 29 2019, 06:17

Fix Invalid argument by passing the address of first vararg as a void *.
The same is done internally by the glibc, but the compatibility symbols seems
to complain when the full vararg list is passed.

This revision is now accepted and ready to land.Sep 30 2019, 10:50
Fabien retitled this revision from [WIP] Add support for Glibc version 2.28 to Add support for Glibc version 2.28.Sep 30 2019, 10:54
This revision was automatically updated to reflect the committed changes.