Opened 6 weeks ago

Closed 3 weeks ago

Last modified 13 days ago

#31646 closed defect (fixed)

Update abicheck to require newer libstdc++.so.6

Reported by: boklm Owned by: tbb-team
Priority: Very High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, TorBrowserTeam201909R, tbb-9.0-must-alpha, ff68-esr
Cc: intrigeri Actual Points: 3
Parent ID: Points: 3
Reviewer: Sponsor:

Description

We should update projects/firefox/abicheck.cc to use features only provided by more recent versions of libstdc++.so.6.

Currently it only requires GLIBCXX_3.4.22:

$ strings tor-browser_en-US/Browser/abicheck | grep GLIBCXX_
GLIBCXX_3.4
GLIBCXX_3.4.22
GLIBCXX_3.4.21

https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html

Child Tickets

Change History (14)

comment:1 Changed 6 weeks ago by gk

I wonder if #31380 is related here, although that one still puzzles me...

comment:2 in reply to:  1 Changed 6 weeks ago by boklm

Replying to gk:

I wonder if #31380 is related here, although that one still puzzles me...

Ah yes, this is probably related.

comment:3 Changed 6 weeks ago by boklm

On some systems, this can cause an error like this when starting the browser:

/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.23' not found (required by $FOO/tor-browser_en-US_8.09a/Browser/libxul.so)

A temporary workaround is to edit the file Browser/firefox to move or copy the line add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/libstdc++/" outside the if:

diff --git a/projects/firefox/start-firefox b/projects/firefox/start-firefox
index 7e7685c..42ea1af 100644
--- a/projects/firefox/start-firefox
+++ b/projects/firefox/start-firefox
@@ -41,6 +41,7 @@ fi
 if [ $? -ne 0 ]; then
   add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/libstdc++/"
 fi
+add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/libstdc++/"
 add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/"
 export LD_LIBRARY_PATH
 

comment:4 Changed 5 weeks ago by intrigeri

Cc: intrigeri added

comment:5 Changed 4 weeks ago by boklm

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909 removed
Points: 3
Status: newneeds_review

There is a patch for review in branch bug_31646:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_31646&id=3ff1c896940d0150e90b12560c4a83f22263324c

With this patch, the abicheck binary now requires GLIBCXX_3.4.25, and the bundle is starting without error on a Debian 9 machine.

comment:6 Changed 3 weeks ago by gk

Keywords: TorBrowserTeam201909 added; TorBrowserTeam201909R removed
Status: needs_reviewneeds_revision

Two nits:
* system provides required the C++ ABI not sure what you mean here.

Let's keep maint() instead of maint ().

comment:7 Changed 3 weeks ago by boklm

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909 removed
Status: needs_revisionneeds_review

comment:8 Changed 3 weeks ago by cypherpunks

Why does this DLL/DSO Hell happen regularly? On sane systems, the app's components always use the bundled version, and the system's components always use the system version. So, what the heck is here? And why these tickets are not synced to bumping GCC?

comment:9 in reply to:  7 Changed 3 weeks ago by gk

Keywords: TorBrowserTeam201909 added; TorBrowserTeam201909R removed
Status: needs_reviewneeds_revision

Replying to boklm:

This should be fixed in branch bug_31646_v2:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_31646_v2&id=c88f26cefc658be1773c459d9f63f728312fdf4e

Looks good. One additional nit: we should probably mention that this fix solves #31380, too?

comment:10 in reply to:  8 Changed 3 weeks ago by boklm

Replying to cypherpunks:

Why does this DLL/DSO Hell happen regularly? On sane systems, the app's components always use the bundled version, and the system's components always use the system version. So, what the heck is here?

See #25485 for why we can't use the bundled libstdc++ in all cases.

And why these tickets are not synced to bumping GCC?

This should be done when bumping gcc, but was forgotten.

comment:11 Changed 3 weeks ago by boklm

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909 removed
Status: needs_revisionneeds_review

In branch bug_31646_v3 I updated the commit message to mention fixing #31380, and added a comment to projects/gcc/config to remind us about updating abicheck.cc when updating the gcc version:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_31646_v3&id=b16662aad8d9932819fea73746860ce9d8c711a4

comment:12 Changed 3 weeks ago by cypherpunks

That's not clear. AFAIK, symvers was developed, so that any package can update system version during installation and without bad consequences. But if you do something similar to Snap packages, isn't it easier to link statically?

comment:13 Changed 3 weeks ago by gk

Resolution: fixed
Status: needs_reviewclosed

Fixed with commit b16662aad8d9932819fea73746860ce9d8c711a4 on tor-browser-build's master branch, thanks.

comment:14 Changed 13 days ago by boklm

Actual Points: 3
Note: See TracTickets for help on using tickets.