Here's what happened when I tried to compile it on Devuan Chimaera amd64.
I presume the prerequisites are these:
apt install python2 autoconf2.13 build-essential ccache python2-dev unzip uuid zip curl libgtk2-dev libgconf2-dev yasm libasound2-dev libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxt-dev
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python2 get-pip.py
I had to patch up the GST_API_VERSION in the configure script, since it got detected wrongly as 0.10 for some reason. I can't really tell what everything even is, so I just redefined it as 1.0 at line 23036, below the if check under "# Check whether --enable-gstreamer or --disable-gstreamer was given.", this made the build progress further.
Unfortunately, I hit a snag:
0:04.95 In file included from /home/fierelier/Documents/mozilla45esr/obj-x86_64-unknown-linux-gnu/dist/stl_wrappers/new:34,
0:04.95 from /usr/include/c++/10/bits/exception_ptr.h:40,
0:04.95 from /usr/include/c++/10/exception:147,
0:04.95 from /home/fierelier/Documents/mozilla45esr/obj-x86_64-unknown-linux-gnu/dist/system_wrappers/exception:3,
0:04.95 from /usr/include/c++/10/new:41,
0:04.95 from /home/fierelier/Documents/mozilla45esr/obj-x86_64-unknown-linux-gnu/dist/system_wrappers/new:3,
0:04.95 from /home/fierelier/Documents/mozilla45esr/obj-x86_64-unknown-linux-gnu/dist/stl_wrappers/cstdlib:28,
0:04.95 from /usr/include/c++/10/stdlib.h:36,
0:04.95 from /home/fierelier/Documents/mozilla45esr/obj-x86_64-unknown-linux-gnu/dist/system_wrappers/stdlib.h:3,
0:04.95 from /home/fierelier/Documents/mozilla45esr/toolkit/crashreporter/google-breakpad/src/common/linux/guid_creator.cc:35,
0:04.95 from /home/fierelier/Documents/mozilla45esr/obj-x86_64-unknown-linux-gnu/toolkit/crashreporter/google-breakpad/src/common/linux/Unified_cpp_src_common_linux0.cpp:11:
0:04.95 ../../../../../../dist/include/mozilla/mozalloc.h:184:33: error: ‘bad_alloc’ in namespace ‘std’ does not name a type
0:04.95 184 | void* operator new(size_t size) MOZALLOC_THROW_BAD_ALLOC
0:04.95 | ^~~~~~~~~~~~~~~~~~~~~~~~
...
This seems to have cropped up in newer GCC versions in Linux:
https://bugzilla.mozilla.org/show_bug.cgi?id=1269171
Getting GCC 5.x, which from this, seems to be the only solution I understand, is super difficult on my up to date Linux. @roytam1 maybe you can implement a fix, from what you can read on the bugzilla link? I'm willing to keep building on my system.