Skip to content

Add support for muslc on Linux

Old text:

Hello,

I am trying to run the Tor Browser on Alpine Linux in a VM. Unfortunately, the program would not start at the beginning. After installing some packages it worked: apk add build-base gcompat libc6-compact Now the following error message appears:

./start-tor-browser --verbose
mozilla::detail::MutexImpl::MutexImpl: pthread_mutexattr_settype failed: Invalid argument
./start-tor-browser: line 362:  4658 Segmentation fault      TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/null

How can I start the Tor Browser?

From @pierov's comment below:

Mozilla uses some glibc's non-standard (read POSIX) behavior. For this reason, Mozilla official binaries aren't compatible with Alpine, which uses musl libc. Alpine uses a set of patches to compile Firefox with musl libc in the version they package.

Tor Browser is in the same situation: I think that with the same patches and some toolchain magic, it could be compiled with muslc.

It would be interesting, imho, but I suppose we won't be interested, until Moz upstreams the required patches (I don't even know if their authors asked Moz to).

Edited by morgan
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information