Page MenuHomePhabricator

Add support for Glibc version 2.28
ClosedPublic

Authored by Fabien on Fri, Sep 27, 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Fri, Sep 27, 13:13
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Sep 27, 13:13
Fabien added a comment.Fri, Sep 27, 13:17

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.Fri, Sep 27, 13:35

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

Fabien updated this revision to Diff 13186.Fri, Sep 27, 18:42

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

Fabien updated this revision to Diff 13261.Sat, Sep 28, 01:58

Revert configure logic to wrap when needed.

Fabien updated this revision to Diff 13262.Sat, Sep 28, 06:45

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

deadalnix accepted this revision.Sat, Sep 28, 14:53
This revision is now accepted and ready to land.Sat, Sep 28, 14:53
Fabien planned changes to this revision.Sun, Sep 29, 06:17
Fabien updated this revision to Diff 13268.Mon, Sep 30, 10:50

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.Mon, Sep 30, 10:50
Fabien retitled this revision from [WIP] Add support for Glibc version 2.28 to Add support for Glibc version 2.28.Mon, Sep 30, 10:54
This revision was automatically updated to reflect the committed changes.