LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-15-2021, 05:44 PM   #1
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Compiling Basilisk browser on Slackware


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.13
Builds 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-service
You 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 build
It should go smoothly on slackware-current. It took me about 45 minutes.

Then,

Code:
make -f client.mk DESTDIR=/path/to/somewhere install
Since 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
File Type: txt basilisk-include-limits.patch.txt (1.8 KB, 18 views)

Last edited by TheRealGrogan; 11-15-2021 at 08:07 PM.
 
Old 11-16-2021, 09:51 AM   #2
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,142

Rep: Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315
Excellent work!
Many thanks!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Basilisk for Slackware Users cwizardone Slackware 60 05-11-2024 06:55 PM
Basilisk II on Slackware Audio Issue kc3 Slackware 14 11-11-2009 07:52 PM
hard time compiling basilisk ii on fedora core 9 backthefup Fedora 1 07-28-2008 03:05 AM
Basilisk II SpEcIeS Linux - Software 14 07-31-2005 09:21 AM
Basilisk start problem machadodaniel Linux - Software 2 03-22-2004 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration