I noticed that clicking on the Open Directory button in the Profile Directory entry in about:support fails with the following error:
nautilus: /home/systemdsucks/Desktop/tor-browser_en-US/Browser/TorBrowser/Tor/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)nautilus: /home/systemdsucks/Desktop/tor-browser_en-US/Browser/TorBrowser/Tor/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/lib/x86_64-linux-gnu/libmircommon.so.7)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
I wonder where the libmir* requirement is coming from. Cyperpunk: What Linux system is that and how are you extracting/starting Tor Browser?
Ubuntu 17.10. For that case I did cd Browser && ./start-tor-browser --debug.
I am having the same problem with one of my Ubuntu machines.
LD_LIBRARY_PATH=<PathToTor>/tor-browser_en-US/Browser/TorBrowser/Tor/ ./firefox --class 'Tor Browser' -profile TorBrowser/Data/Browser/profile.defaultXPCOMGlueLoad error for file <PATH>/tor-browser_en-US/Browser/libmozgtk.so:<PATH>/tor-browser_en-US/Browser/TorBrowser/Tor/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)Couldn't load XPCOM.
It seems that the issue is that libgdk-3.so.0 on Ubuntu is linked to libmirclient.so.9, which is linked to a newer version of libstdc++.so.6 than the one we ship.
Some (probably not good) solutions could be:
building and shipping a libgdk-3.so.0 (and maybe libgtk3?) that is not linked to libmirclient.so.9. However this will increase the complexity, build time, and size of our bundles.
building and shipping a libmirclient.so.9 that is linked to our version of libstdc++.so.6.
I think a better option might be to avoid having our version of libstdc++.so.6 in LD_LIBRARY_PATH when the version installed on the system is newer. Maybe the start-tor-browser script could detect which version of libstdc++.so.6 is available and only add our version to LD_LIBRARY_PATH when needed.
Do we actually still need to ship that lib?
I think we need to ship libstdc++.so.6 for the systems where the installed version is too old. As we are building using gcc 6.4.0, it seems our binaries will require CXXABI_1.3.10 added with gcc 6.1.0:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
Some of the distributions built using a gcc older than 6.1.0 are:
This is tested on Ubuntu 17.04 (gcc 7; newer) as well as Ubuntu 16.04 (gcc 5.3.1; older). To initiate the ABI check, we compare the installed gcc version with the bundled Tor Browser version 6.4.0. If the installed version is more recent, we remove the bundled libstdc++.so.6 from Browser/TorBrowser/Tor, which removes it from LD_LIBRARY_PATH.
I am guessing this should suffice, or should we follow the symlink for libstdc++.so.6 and then compare the CXXABI, like for Ubuntu 17.04:
I don't think this is correct. the gcc version has no particular relation to the glibc version. moreover, it may not even be installed. removing libraries is not a good idea, as the user may want to move their installation to another machine (or share it between two OSes on the same machine). additionally, grepping the versions is not a reliable way of checking ABI compatibility, as there may be missing symbols as well. the right-er way to do this is to build an old binary and a new binary, try to run the new binary on the system, and if it fails, use our library. this doesn't quite account for missing symbols though.
This is tested on Ubuntu 17.04 (gcc 7; newer) as well as Ubuntu 16.04 (gcc 5.3.1; older). To initiate the ABI check, we compare the installed gcc version with the bundled Tor Browser version 6.4.0. If the installed version is more recent, we remove the bundled libstdc++.so.6 from Browser/TorBrowser/Tor, which removes it from LD_LIBRARY_PATH.
That makes me nervous. It is not unusual (at least for me) to have different compiler versions around on my Linux box and use them. If I happen to use a newer version than usual your patch my blow away my libstdc++ which Tor Browser ships but switching back to my regular compiler suddenly breaks Tor Browser now.
I think trying to figure out the installed libstdc++ version and comparing it to the one we ship and not using the latter if the former is newer seems like a more plausible idea to me. However, there might be pitfalls we'd like to avoid in this scenario as well.
So the question then is that if it's not strings, then what would be a good way of finding out the installed version of libstdc++ to compare with the bundled version? Would parsing the readelf output be a better fit?
So the question then is that if it's not strings, then what would be a good way of finding out the installed version of libstdc++ to compare with the bundled version? Would parsing the readelf output be a better fit?
Maybe we could build a small c++ program linked with our libstdc++ and using the latest CXXABI. If running this program from start-tor-browser fails then we know that we need to add our libstdc++ to LD_LIBRARY_PATH.
How would it help with this issue? I think using rpath instead of LD_LIBRARY_PATH to use our libstdc++ library does not remove the issue that our libstdc++ can be too old for libgdk-3.so.0 or other installed libraries on some systems.
So the question then is that if it's not strings, then what would be a good way of finding out the installed version of libstdc++ to compare with the bundled version? Would parsing the readelf output be a better fit?
Maybe we could build a small c++ program linked with our libstdc++ and using the latest CXXABI. If running this program from start-tor-browser fails then we know that we need to add our libstdc++ to LD_LIBRARY_PATH.
How would it help with this issue? I think using rpath instead of LD_LIBRARY_PATH to use our libstdc++ library does not remove the issue that our libstdc++ can be too old for libgdk-3.so.0 or other installed libraries on some systems.
DT_RUNPATH to be specific, not DT_RPATH. it only applies to the immediate dependencies, so it solves the immediate problem. it doesn't fix data format changing though, so for example passing a std::string between a new lib and an old lib might crash or do something bad.
So the question then is that if it's not strings, then what would be a good way of finding out the installed version of libstdc++ to compare with the bundled version? Would parsing the readelf output be a better fit?
Maybe we could build a small c++ program linked with our libstdc++ and using the latest CXXABI. If running this program from start-tor-browser fails then we know that we need to add our libstdc++ to LD_LIBRARY_PATH.
When I build this program using gcc 6.4.0, and I try to run it using my system's libstdc++.so.6, it fails with:
$ ./out/test/a.out./out/test/a.out: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./out/test/a.out)./out/test/a.out: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./out/test/a.out)
But it works if I add Tor Browser's libstdc++.so.6 to LD_LIBRARY_PATH.
So we could run this small program from start-tor-browser to check if the system provides a recent libstdc++.so.6, and only if it fails add our version to LD_LIBRARY_PATH.
I decided to move the bundled libstdc++.so.6 to an additional Lib directory to make it easier to deal with LD_LIBRARY_PATH. Let me know if you prefer another way. Tested on Ubuntu 16.04.
Additionally, I decided to put this projects/firefox and not projects/tor-browser as gcc/g++ was already in scope for /firefox and I didn't want to bring it in for /tor-browser.
I decided to move the bundled libstdc++.so.6 to an additional Lib directory to make it easier to deal with LD_LIBRARY_PATH. Let me know if you prefer another way. Tested on Ubuntu 16.04.
Yes, moving it to a sub-directory sounds good. I'm thinking that maybe that sub-directory should be named something like libstdc++ to make it more clear what it is.
I decided to move the bundled libstdc++.so.6 to an additional Lib directory to make it easier to deal with LD_LIBRARY_PATH. Let me know if you prefer another way. Tested on Ubuntu 16.04.
Yes, moving it to a sub-directory sounds good. I'm thinking that maybe that sub-directory should be named something like libstdc++ to make it more clear what it is.
OK I updated that to libstdc++. I will submit the new branch after the complete review in case there are other changes.
I think we could add a comment in projects/firefox/abicheck.cc mentioning this ticket, and explaining that we found that this program is requiring GLIBCXX_3.4.22, which make it useful to check that the required version of libstdc++ is available.
Are you sure this does not break Linux users during an update? Because the update process is not touching LD_LIBRARY_PATH (see: comment:10:ticket:13359) it seems to me after removing the libstdc++ from the old location and adding it to the new one there is the risk that Tor Browser won't start anymore as LD_LIBRARY_PATH is still pointing to the old one.
Ah this is a good point, the browser will probably fail to restart on the systems where our version of libstdc++ is required.
Kathy and I agree that this change will cause the browser to fail to start after an update on systems that require our bundled libstdc++. A good catch by gk.
I am wondering if we could update LD_LIBRARY_PATH in the same way as the start script, during the update process, before restarting the browser.
The problem with this suggestion is that the updater that will be used is already on people's systems, so we cannot make changes to it :)
In general, I think we are putting too many important things inside start-tor-browser. Or to put it another way: after an update the browser should be started the same way as when users start the browser. In an ideal world, ./firefox would do everything necessary. We could move all of the start-tor-browser code into a script named firefox and rename the actual binary to something else)... but I don't know what that would break.
Ah this is a good point, the browser will probably fail to restart on the systems where our version of libstdc++ is required.
Kathy and I agree that this change will cause the browser to fail to start after an update on systems that require our bundled libstdc++. A good catch by gk.
Alternatively we could keep our bundled libstdc++ in the default path, and add a new directory containing links to all libraries except libstdc++ to use it on systems with a recent libstdc++. This would fix the issue on systems where our bundled libstdc++ is required, but would cause issues on systems affected by #26589 (moved) so it is not clear if it is better.
I am wondering if we could update LD_LIBRARY_PATH in the same way as the start script, during the update process, before restarting the browser.
The problem with this suggestion is that the updater that will be used is already on people's systems, so we cannot make changes to it :)
In general, I think we are putting too many important things inside start-tor-browser. Or to put it another way: after an update the browser should be started the same way as when users start the browser. In an ideal world, ./firefox would do everything necessary. We could move all of the start-tor-browser code into a script named firefox and rename the actual binary to something else)... but I don't know what that would break.
Setting LD_LIBRARY_PATH in a script named firefox sounds like a good thing to try.
In general, I think we are putting too many important things inside start-tor-browser. Or to put it another way: after an update the browser should be started the same way as when users start the browser. In an ideal world, ./firefox would do everything necessary. We could move all of the start-tor-browser code into a script named firefox and rename the actual binary to something else)... but I don't know what that would break.
I am not sure but doesn't that break the updater as well? Or would it simply replace the Firefox executable with the script and add the new binary?
I have not been able to test an update from 8.0a9 yet. It seems the pref app.update.url.override (which I think disabled signature verification) does not exist anymore. I tried manually installing the mar file, following the instruction from this page:
https://wiki.mozilla.org/Software_Update:Manually_Installing_a_MAR_file
But it complains about missing signature:
ERROR: There must be at least one signature.
So I am not sure if there is an easy way to test an update, without signing it.
So I am not sure if there is an easy way to test an update, without signing it.
I don't know of s way to test without a signed MAR file. Kathy and I usually build from a slightly modified tor-browser tree in which we have replaced release_primary.der and release_secondary.der with our own files, which of course allows us to create and sign MAR files using our own key. But the entire process is inconvenient.
And in case you did not find it yet, you can override the default update URL by opening the Browser Console (Alt+Shift+J / Cmd-Shift+J), and then executing a command similar to:
I have not been able to test an update from 8.0a9 yet. It seems the pref app.update.url.override (which I think disabled signature verification) does not exist anymore. I tried manually installing the mar file, following the instruction from this page:
https://wiki.mozilla.org/Software_Update:Manually_Installing_a_MAR_file
21:05 <+GeKo> i am wondering whether that would actually test what we want to test
21:06 <+GeKo> we already know that starting tor browser with your patch applied works but that is basically what you are doing with this method
That said I can help with the signing part and we can hold off starting the build until tomorrow for that.
I have not been able to test an update from 8.0a9 yet. It seems the pref app.update.url.override (which I think disabled signature verification) does not exist anymore. I tried manually installing the mar file, following the instruction from this page:
https://wiki.mozilla.org/Software_Update:Manually_Installing_a_MAR_file
21:05 <+GeKo> i am wondering whether that would actually test what we want to test
21:06 <+GeKo> we already know that starting tor browser with your patch applied works but that is basically what you are doing with this method
Yes, manually installing the mar file might not be enough. With a signed mar, I can generate some update xml, and test the update by changing app.update.url.
That said I can help with the signing part and we can hold off starting the build until tomorrow for that.
I am not sure if the updater will accept an update which is not in the same channel, and with tbb-nightly as the version number. So I did a new build with the same patch, but building an alpha, with version number 8.0a9.1:
https://people.torproject.org/~boklm/tmp/bug_25485-v2/
I am not sure if the updater will accept an update which is not in the same channel, and with tbb-nightly as the version number. So I did a new build with the same patch, but building an alpha, with version number 8.0a9.1:
https://people.torproject.org/~boklm/tmp/bug_25485-v2/