Article 5RYYM Compiling Basilisk browser on Slackware

Compiling Basilisk browser on Slackware

by
TheRealGrogan
from LinuxQuestions.org on (#5RYYM)
The latest Basilisk (basilisk-2021.11.14-source.tar.xz) can be compiled with gcc 11.x if you #include <limits> in 3 files within platform. Otherwise, with g++ 11.x:

Code:error: 'numeric_limits' is not a member of 'std'I made a patch for myself:

Code:diff -Naur basilisk-2021.11.14-source_orig/platform/gfx/2d/BaseRect.h basilisk-2021.11.14-source/platform/gfx/2d/BaseRect.h
--- basilisk-2021.11.14-source_orig/platform/gfx/2d/BaseRect.h 2021-11-12 17:10:16.000000000 -0500
+++ basilisk-2021.11.14-source/platform/gfx/2d/BaseRect.h 2021-11-15 17:32:59.411746189 -0500
@@ -9,6 +9,7 @@
#include <algorithm>
#include <cmath>
#include <ostream>
+#include <limits>

#include "mozilla/Assertions.h"
#include "mozilla/FloatingPoint.h"
diff -Naur basilisk-2021.11.14-source_orig/platform/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc basilisk-2021.11.14-source/platform/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
--- basilisk-2021.11.14-source_orig/platform/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc 2021-11-12 17:10:36.000000000 -0500
+++ basilisk-2021.11.14-source/platform/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc 2021-11-15 17:35:40.787737049 -0500
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-
+#include <limits>
#include "webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h"

#include "webrtc/base/checks.h"
diff -Naur basilisk-2021.11.14-source_orig/platform/netwerk/base/nsURLParsers.cpp basilisk-2021.11.14-source/platform/netwerk/base/nsURLParsers.cpp
--- basilisk-2021.11.14-source_orig/platform/netwerk/base/nsURLParsers.cpp 2021-11-12 17:10:38.000000000 -0500
+++ basilisk-2021.11.14-source/platform/netwerk/base/nsURLParsers.cpp 2021-11-15 17:33:50.427743299 -0500
@@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include <string.h>
+#include <limits>

#include "mozilla/RangedPtr.h"The file audio_encoder_opus.cc is a C source, and it seems odd and wrong to include a C++ header in it (and it is) but in context of the way it's being compiled it's fine. It's being wrapped in a generated C++ file with #include and it's compiled as C++. It would be more correct to find where to add it to whatever makefile generator template is adding it to the .mk files that use the macros in those opus directories, but I dunno, and it would require regenerating the autoconf stuff.

Like all mozilla projects, this is going to need autoconf 2.13 (no choice). Get it from gnu.org or copy it from Slackware's source/xap/mozilla-firefox/build-deps/autoconf

This coexists if you use --program-suffix.

Code:./configure --prefix=/usr/local --program-suffix=-2.13Builds that require a specific version generally look for it like that (autoconf-2.13, autoreconf-2.13 etc.)

I don't package things like these, that are just meant to run out of their own directories and their own libraries are linked in the program directory. I just send things like this to /opt

Anyway, this is tooled for mach, but since it's still the legacy build system (firefox 52), "make -f client.mk build" can be used directly. I preferred that and not the least of my reasons is that you can resume a build where you left off after fixing a compilation failure.

My .mozconfig file:

Code: export CC=gcc
export CXX=g++
export CFLAGS="-march=<yourcpu>"
export CXXFLAGS="-march=<yourcpu>"
mk_add_options MOZ_MAKE_FLAGS=-j10
mk_add_options PYTHON=/usr/bin/python2
ac_add_options --enable-application=basilisk
ac_add_options --enable-release
ac_add_options --enable-official-branding
ac_add_options --enable-private-build
export MOZILLA_OFFICIAL=1
export MOZ_DATA_REPORTING=0
export MOZ_TELEMETRY_REPORTING=0
export MOZ_SERVICES_HEALTHREPORT=0
ac_add_options --prefix=/opt/basilisk
ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-gold
ac_add_options --enable-jemalloc
ac_add_options --enable-optimize="-O2"
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-alsa
ac_add_options --enable-pulseaudio
ac_add_options --enable-devtools
ac_add_options --enable-eme
ac_add_options --enable-webrtc
ac_add_options --enable-av1
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --disable-dbus
ac_add_options --disable-gconf
ac_add_options --disable-gio
ac_add_options --disable-necko-wifi
ac_add_options --disable-startup-notification
ac_add_options --disable-updater
ac_add_options --disable-maintenance-serviceYou probably shouldn't do -march= but I do -march=nehalem for my builds and I'll show a placeholder for it. The build itself will give you at least -msse2 -mfpmath=sse regardless.

About the source tarball from http://archive.palemoon.org/source/
These will explode to the current working directory, possibly making a mess. So extract to an appropriate subdir.

OK, .mozconfig goes in the build directory and

Code:make -f client.mk buildIt should go smoothly on slackware-current. It took me about 45 minutes.

Then,

Code:make -f client.mk DESTDIR=/path/to/somewhere installSince it's autoconf based you know it supports DESTDIR, but since I'm just doing --prefix=/opt/basilisk I don't need to do that.

It just needs /opt/basilisk/bin in the path, or a wrapper or symlink in /usr/local/bin or whatever.

Simple as that.

I missed some of the old firefox appearance and behaviour. Don't expect this to be better performance or anything. It's about preserving old functionality and behaviour :-)
Attached Files
txt.gifbasilisk-include-limits.patch.txt (1.8 KB)
latest?d=yIl2AUoC8zA latest?i=ClanOj5fOg8:KDSoRxD-d2g:F7zBnMy latest?i=ClanOj5fOg8:KDSoRxD-d2g:V_sGLiP latest?d=qj6IDK7rITs latest?i=ClanOj5fOg8:KDSoRxD-d2g:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments