Difference between revisions of "Porting/Tor Browser"
JeremyRand (talk | contribs) (Add meek and obfs4 projects to build instructions) |
JeremyRand (talk | contribs) (Mark building meek and obfs4 as complete in task list) |
||
Line 60: | Line 60: | ||
* (DONE!) Build https-everywhere without errors. | * (DONE!) Build https-everywhere without errors. | ||
* (DONE!) Build fonts without errors. | * (DONE!) Build fonts without errors. | ||
− | * Test the openssl, libevent, tor, firefox-langpacks, tor-launcher, torbutton, python, https-everywhere, and | + | * (DONE!) Build meek without errors. |
− | * Build the projects besides firefox, tor, firefox-langpacks, tor-launcher, torbutton, https-everywhere, and | + | * (DONE!) Build obfs4 without errors. |
+ | * Test the openssl, libevent, tor, firefox-langpacks, tor-launcher, torbutton, python, https-everywhere, fonts, meek, and obfs4 binaries. | ||
+ | * Build the projects besides firefox, tor, firefox-langpacks, tor-launcher, torbutton, https-everywhere, fonts, meek, and obfs4. | ||
* Fine-tune the compiler settings. (Are we inadvertently excluding some ARM devices that we want to support? Should we enable Neon?) | * Fine-tune the compiler settings. (Are we inadvertently excluding some ARM devices that we want to support? Should we enable Neon?) | ||
* Generalize the GNU/Linux cross-compiling changes so that they work on target arches besides armhf. (ppc64be, ppc64le, and aarch64 are all likely to be useful.) | * Generalize the GNU/Linux cross-compiling changes so that they work on target arches besides armhf. (ppc64be, ppc64le, and aarch64 are all likely to be useful.) |
Revision as of 12:28, 17 March 2019
Early efforts to port Tor Browser to POWER are underway. The primary challenge is that Tor Browser uses an unusual build system (rbm) in order to ensure reproducible builds. While Tor's configuration of rbm can cross-compile for Windows and macOS targets, it is not configured out of the box to cross-compile for GNU/Linux targets. As a result, our early efforts are focused on modifying Tor's rbm configuration to support cross-compiling for non-x86 GNU/Linux targets; it is expected that this will be useful not only for POWER but also for targets like ARM.
Current source code is at: https://notabug.org/JeremyRand/tor-browser-build/src/armhf-esr60 (armhf-esr60
branch)
If you're interested in joining the effort, talk to Jeremy_Rand or Jeremy_Rand_Talos in #talos-workstation.
Contents
Build instructions
./rbm/rbm build firefox --target nightly --target torbrowser-linux-arm ./rbm/rbm build tor --target nightly --target torbrowser-linux-arm ./rbm/rbm build firefox-langpacks --target nightly --target torbrowser-linux-arm ./rbm/rbm build tor-launcher --target nightly --target torbrowser-linux-arm ./rbm/rbm build torbutton --target nightly --target torbrowser-linux-arm ./rbm/rbm build https-everywhere --target nightly --target torbrowser-linux-arm ./rbm/rbm build fonts --target nightly --target torbrowser-linux-arm ./rbm/rbm build meek --target nightly --target torbrowser-linux-arm ./rbm/rbm build obfs4 --target nightly --target torbrowser-linux-arm
Errors / Troubleshooting
Unfixed
Missing libssp.so.0
./firefox: error while loading shared libraries: libssp.so.0: cannot open shared object file: No such file or directory
- Workaround: add the
Browser
directory to yourLD_LIBRARY_PATH
in order for Tor Browser to find the library. - This should be fixable by porting the non-Firefox projects (one of which is responsible for setting the
LD_LIBRARY_PATH
).
Fixed
/var/tmp/build/firefox-f8f42fea2af3/js/src/jsnativestack.cpp:69:31: error: 'syscall' was not declared in this scope
- This is because
jsnativestack.cpp
forgot to#include <unistd.h>
. This is fixed in all releases of Tor Browser based on ESR 60. Since we're still using ESR 52 for now, I fixed it by applying a short patch to add the missing include.
- This is because
/var/tmp/build/firefox-f8f42fea2af3/js/src/jsnativestack.cpp:77:27: error: 'getpid' was not declared in this scope
- Also caused by missing
#include <unistd.h>
injsnativestack.cpp
; same fixes as above.
- Also caused by missing
./firefox: error while loading shared libraries: libssp.so.0: cannot open shared object file: No such file or directory
- Workaround: copy
libssp.so*
from thegcc-cross
output tar into theBrowser
directory of thefirefox
output. - Fixed in the Firefox rbm build script as of 2018 Oct 10.
- Workaround: copy
- Segfault immediately on startup in
libxul.so
- Only affects ESR 60; ESR 52 unaffected
- Fixed by doing all of these:
- Upgrade to gcc 7.3.0 / binutils 2.29.1
- Build with
ac_add_options --disable-elf-hack
- Build with
ac_add_options --disable-stylo
- Possibly related bugs:
Task list
- (DONE!) Finish porting this to Firefox ESR 60.
- (DONE!) Build openssl without errors.
- (DONE!) Build libevent without errors.
- (DONE!) Build tor without errors.
- (DONE!) Build firefox-langpacks without errors.
- (DONE!) Build tor-launcher without errors.
- (DONE!) Build torbutton without errors.
- (DONE!) Build python without errors.
- (DONE!) Build https-everywhere without errors.
- (DONE!) Build fonts without errors.
- (DONE!) Build meek without errors.
- (DONE!) Build obfs4 without errors.
- Test the openssl, libevent, tor, firefox-langpacks, tor-launcher, torbutton, python, https-everywhere, fonts, meek, and obfs4 binaries.
- Build the projects besides firefox, tor, firefox-langpacks, tor-launcher, torbutton, https-everywhere, fonts, meek, and obfs4.
- Fine-tune the compiler settings. (Are we inadvertently excluding some ARM devices that we want to support? Should we enable Neon?)
- Generalize the GNU/Linux cross-compiling changes so that they work on target arches besides armhf. (ppc64be, ppc64le, and aarch64 are all likely to be useful.)