Closed Bug 1727014 Opened 3 years ago Closed 3 years ago

Build librnp.so Linux CI builds against libstdc++ instead of libc++

Categories

(Thunderbird :: Build Config, task)

Thunderbird 93
Desktop
Linux

Tracking

(thunderbird_esr91+ wontfix)

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr91 + wontfix

People

(Reporter: rjl, Assigned: rjl)

Details

(Whiteboard: [TM: 91.3.0])

Attachments

(3 files, 1 obsolete file)

It would make things easier if the RNP dependency on libc++ were dropped, so that CI builds link against libstdc++ like the rest of the application.

Background:
librnp and its dependencies support libstdc++ just fine, the issue has been with older Linux distributions and symbols showing up for too-new libstdc++ versions.

As of August 2021, the remaining symbols turn out to be new-style C++ strings ABI symbols, std::out_of_range::out_of_range(const char* s) and std::invalid_argument::invalid_argument(char const* s).

The strings ABI can be forced to pre-GCC5 mode with -D_GLIBCXX_USE_CXX11_ABI=0. This already the case.

Prior to GCC 5, out_of_range and invalid_argument only accepted std::string as an argument.

namespace std {
__attribute__((weak)) out_of_range::out_of_range(char const* s)
    : out_of_range(std::string(s)) {}
__attribute__((weak)) invalid_argument::invalid_argument(char const* s)
    : invalid_argument(std::string(s)) {}
}  // namespace std

Recent build changes for Firefox permit Thunderbird to drop
the libc++ dependency for official builds and link librnp.so
(Linux) against libstdc++, like the rest of the application.

stdc++morecompat.cpp adds the remaining symbols needed to
be compatible with libstdc++ 4.8.1.

Attachment #9237416 - Attachment description: WIP: Bug 1727014 - Build librnp.so Linux against libstdc++ in CI. → WIP: Bug 1727014 - [esr91] Build librnp.so Linux against libstdc++ in CI.

Recent build changes for Firefox permit Thunderbird to drop
the libc++ dependency for official builds and link librnp.so
(Linux) against libstdc++, like the rest of the application.

stdc++morecompat.cpp adds the remaining symbols needed to
be compatible with libstdc++ 4.8.1.

librnp is used by Thunderbird for OpenPGP support. Until now, official builds
have been built statically linked to Clang/LLVM's libc++ to avoid problems with
libstdc++ symbols.
Recent build changes have narrowed the gap significantly, leaving out_of_range
and invalid_argument called with char const* rather than std::string.

Assignee: nobody → rob
Status: NEW → ASSIGNED
Attachment #9237417 - Attachment description: WIP: Bug 1727014 - Build librnp.so Linux against libstdc++ in CI. → WIP: Bug 1727014 - Build librnp.so Linux against libstdc++ in CI. r=darktrojan
Attachment #9237416 - Attachment is obsolete: true
Attachment #9237417 - Attachment description: WIP: Bug 1727014 - Build librnp.so Linux against libstdc++ in CI. r=darktrojan → Bug 1727014 - Build librnp.so Linux against libstdc++ in CI. r=darktrojan
Whiteboard: [TM: 91.3.0]
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/c899ff0553f4
Build librnp.so Linux against libstdc++ in CI. r=darktrojan
https://hg.mozilla.org/comm-central/rev/f012cf7abfd4
Remove lib32cxx build dependency; clean up toolchains. r=darktrojan
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/4a8f8e692b01
Follow-up: Don't try to include removed misc.yml file. rs=bustage-fix
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: