Closed Bug 1278456 Opened 4 years ago Closed 4 years ago

Bump glibc and libstdc++ requirements

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(4 files)

No description provided.
Depends on: 1278718
Blocks: 1278718
No longer depends on: 1278718
The requirement for glibc has been set to version 2.7 for a long while.

Spidermonkey uses the pthread_setname_np symbol, which is only available
since glibc 2.12. So far, we've been fortunate that the symbol doesn't
end up in libxul, or tests that link to js directly, because the symbol
is eliminated as being called by effectively dead code.

There are multiple reasons why this is going to change, one of which
being changes to the way things are linked, that will make the linker
not eliminate that code in some cases. Another is that eventually, the
separation of build systems between js and top-level is going to fade,
and the glibc checks, which apply to all gecko binaries, will also apply
to js binaries. They currently are not happening, and would fail because
of pthread_setname_np if they were.

Taking a step back, as of version 46, the mozilla.org builds require at
least Gtk+3 3.4. Which means the requirements for the underlying system
have received a dramatic bump, and it's time to revisit the requirements
for binary compatibility.

I went through all my notes from all the recent times binary compatibility
has been considered, and put together a compatibility matrix on MDN from
that data as well as more recent data that I could find here and there,
about the major non-rolling-release distros (RHEL, Fedora, SuSE, Debian,
Ubuntu)
https://developer.mozilla.org/en-US/Firefox/Linux_compatibility_matrix

Considering the data there, none of the distros that have at least Gtk+3
3.4 have a glibc older than 2.13. The list of symbols that 2.13 provides
that 2.12 doesn't have is not large enough, though, to really care about
depending on 2.13.

Review commit: https://reviewboard.mozilla.org/r/58470/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58470/
Attachment #8761172 - Flags: review?(nfroyd)
Attachment #8761173 - Flags: review?(nfroyd)
Attachment #8761174 - Flags: review?(mshal)
Attachment #8761175 - Flags: review?(nfroyd)
Similarly to the considerations about glibc, the Linux compatibility matrix
(https://developer.mozilla.org/en-US/Firefox/Linux_compatibility_matrix)
tells us no distro with Gtk+3 3.4 has a version of libstdc++ older than
4.6.

The data in the matrix doesn't go to that level of detail, but Ubuntu
12.04 LTS, being the only one with version 4.6 (others have at least
4.7), it's worth noting it has version 4.6.3. Which means we can safely
require libstdc++ symbols version 3.4.16 (which were added in 4.6.1).

This will allow us to remove a lot of the stdc++ compatibility hacks.

Review commit: https://reviewboard.mozilla.org/r/58472/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58472/
Build slaves on automation are based on Centos 6, which doesn't have a
recent enough version of libstdc++ for our new requirements. But since
we're building with a recent GCC or clang with its own libstdc++, we do
have such a libstdc++ available somewhere, and the compiler picks it
when invoking the linker.

Problems start happening when we execute some of the built programs
during the build, like host tools (e.g. nsinstall), or target programs
(xpcshell, during packaging). In that case, we need the compiler's
libstdc++ to be used. Which required adding the GCC or clang library
directory to LD_LIBRARY_PATH.

Unconveniently enough, the clang 3.5 tooltool package we're using for
ASAN builds until we can update to at least 3.8 (bug 1278718) doesn't
contain libstdc++.so. So for those builds, pull the GCC package from
tooltool as well, and pick libstdc++ from there.

Review commit: https://reviewboard.mozilla.org/r/58474/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58474/
Summary: Bump glic and libstdc++ requirements → Bump glibc and libstdc++ requirements
Attachment #8761174 - Flags: review?(mshal) → review+
Attachment #8761172 - Flags: review?(nfroyd) → review+
Comment on attachment 8761172 [details]
Bug 1278456 - Bump glibc requirement to 2.12.

https://reviewboard.mozilla.org/r/58470/#review56096

Thanks for going through all the Linux distributions and making that compat matrix, very nice.  We will need to get this:

https://www.mozilla.org/en-US/firefox/47.0/system-requirements/

edited for the appropriate release, and possibly release note this, yes?
Comment on attachment 8761173 [details]
Bug 1278456 - Bump libstdc++ requirement to 3.4.16 (4.6.1).

https://reviewboard.mozilla.org/r/58472/#review56098
Attachment #8761173 - Flags: review?(nfroyd) → review+
Attachment #8761175 - Flags: review?(nfroyd) → review+
Comment on attachment 8761175 [details]
Bug 1278456 - Remove stdc++-compat hacks for libstdc++ < 4.6.1.

https://reviewboard.mozilla.org/r/58476/#review56100

Apologies for taking so long on what ought to have been a pretty simple review.
Release Note Request (optional, but appreciated)
[Why is this notable]: I'm not entirely sure it is. But at least it's worth discussing whether it is. The point is that the system requirements are going to change in version 50, but, as far as major distros are concerned, we're making Firefox still run where it currently runs. That is, Gtk+3 3.4 is still the system requirement that makes all the difference (see https://developer.mozilla.org/en-US/Firefox/Linux_compatibility_matrix).

It is however worth updating the system requirements page for 50, but I don't know how this happens. Hopefully, people reading this comment will know.
relnote-firefox: --- → ?
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/92c44ebd3d6e
Bump glibc requirement to 2.12. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/42c217cffdf8
Bump libstdc++ requirement to 3.4.16 (4.6.1). r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/93a4f9e7a6b0
Add the tooltool GCC library directory to LD_LIBRARY_PATH on Linux builds. r=mshal
https://hg.mozilla.org/integration/mozilla-inbound/rev/6803c5e3f34b
Remove stdc++-compat hacks for libstdc++ < 4.6.1. r=froydnj
Hi Mike, (In reply to Mike Hommey [:glandium] from comment #8)
> Release Note Request (optional, but appreciated)
> [Why is this notable]: I'm not entirely sure it is. But at least it's worth
> discussing whether it is. The point is that the system requirements are
> going to change in version 50, but, as far as major distros are concerned,
> we're making Firefox still run where it currently runs. That is, Gtk+3 3.4
> is still the system requirement that makes all the difference (see
> https://developer.mozilla.org/en-US/Firefox/Linux_compatibility_matrix).
> 
> It is however worth updating the system requirements page for 50, but I
> don't know how this happens. Hopefully, people reading this comment will
> know.

Hi Mike, this is the system requirements page for Fx 50. What would you like changed here? AFAICT, we do mention that GTK+ 3.4 or higher in the GNU/Linux software requirements section.
Flags: needinfo?(mh+mozilla)
(In reply to Ritu Kothari (:ritu) from comment #12)
> Hi Mike, this is the system requirements page for Fx 50. What would you like
> changed here? AFAICT, we do mention that GTK+ 3.4 or higher in the GNU/Linux
> software requirements section.

I guess you're missing a link in that comment. Anyways, based on the system requirements for 49, we should update the requirement for libstdc++ to 4.6.1

(While looking at those requirements, I see there's HAL listed in there, I'm not sure we use that anymore. Karl, do you know?)
Flags: needinfo?(mh+mozilla) → needinfo?(karlt)
(In reply to Mike Hommey [:glandium] from comment #13)
> (In reply to Ritu Kothari (:ritu) from comment #12)
> > Hi Mike, this is the system requirements page for Fx 50. What would you like
> > changed here? AFAICT, we do mention that GTK+ 3.4 or higher in the GNU/Linux
> > software requirements section.
> 
> I guess you're missing a link in that comment. Anyways, based on the system
> requirements for 49, we should update the requirement for libstdc++ to 4.6.1
> 
My bad. I've changed the libstdc++ version in Beta50. Here's the staging link: https://www-dev.allizom.org/en-US/firefox/50.0beta/system-requirements/
Removing the relnote flag as I have updated the system rqmts section of Beta50 release notes. 

Hi Gerry, could you please do the same for Aurora51? Thanks!
relnote-firefox: ? → ---
Flags: needinfo?(gchang)
Hi Rity,
Thanks for notification. I've also updated the system requirements for aurora 51. Here is the staging link: https://www-dev.allizom.org/en-US/firefox/51.0a2/system-requirements/
Flags: needinfo?(gchang)
Ritu. Sorry for typo.
(In reply to Mike Hommey [:glandium] from comment #13)
> (While looking at those requirements, I see there's HAL listed in there, I'm
> not sure we use that anymore. Karl, do you know?)

I doubt we use that in any way.  Filed bug 1307021.
Flags: needinfo?(karlt)
Depends on: 1365182
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.