The DnD Sanctuary

Pings => Otter Browser Forum => Topic started by: konstantin on 2017-03-07, 11:14:24

Title: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-07, 11:14:24
I have read in this thread https://thedndsanctuary.eu/index.php?topic=1505.0 that Otter Browser can be compiled for older processors too which lack of SSE2 instruction set. Temporarily I have to use such an old PC. Its performance is not so low, quite acceptable in fact with 2 GB of RAM, but unfortunately I am unable to install any of my mostly used and favourite browsers (Opera, Chromium, Vivaldi, etc) because all of them need the SSE2 instruction set.

As far as I understanded the thread states that "libqt5webkit5" package should be recompiled from source by adding some compile rules:

Code: [Select]
5. Edit your_build_dir/qtwebkit-opensource-src-version/debian/rules:

Find the "disabled_jit_architectures" variable and add "i386" arch to it.
Code: [Select]
disabled_jit_architectures := armel mips mipsel
# becomes:
disabled_jit_architectures := armel mips mipsel i386

So my question would be that how can I do the compiling for my AMD Athlon XP (1533 Mhz) in Arch Linux and where can I download those mentioned sources?
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-07, 11:33:10
@konstantin, AFAIK you don't have to patch anything, and disabling JIT is going to negatively impact performance (information from QtWebKit devs).
Plus you should consider qt5-webkit-ng package anyway.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-07, 12:29:51
Thx, I have installed "qt5-webkit-ng-tp5-2" package. Now what should I do? Just compile Otter Browser and it will work on the Athlon without SSE2?
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-07, 14:37:45
@konstantin, it should.
You can try:
https://aur.archlinux.org/packages/otter-browser (stable releases)
Or:
https://aur.archlinux.org/packages/otter-browser-weekly (sometimes less stable but up to date)
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-07, 16:44:05
I see, but I have already made the compilation two times, and in both cases I had only an error message when I started Otter Browser:

Code: [Select]
Illegal instruction
core dumped

Due to the lack of SSE2 CPU support.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-07, 19:09:06
@konstantin, could you try to generate backtrace?

Also try exporting this environment variable before running:
Code: [Select]
export JSC_useLLInt=0

Or this one (but don't mix them!):
Code: [Select]
export JSC_useJIT=0
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-07, 21:34:25
I tried both in the form:

Code: [Select]
export JSC_useLLInt=0;otter-browser

But didn't helped. Still "illegal instruction (core dumped)"

And how can I generate a backtrace?

Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-08, 05:40:24
@konstantin, and the other one maybe?

Try this:
https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#Getting_the_trace
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-08, 16:25:31
I tried both the mentioned environment variables either in common or in separate bash windows. None of them worked for me.
Now I made a copy of my /etc/makepkg.conf and placed two directives in it:
CFLAGS=""
CXXFLAGS=""

Code: [Select]
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'rsync::/usr/bin/rsync --no-motd -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget

#-- The package required by makepkg to download VCS sources
#  Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="i686"
CHOST="i686-pc-linux-gnu"

#-- Compiler and Linker Flags
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
CFLAGS=""
CXXFLAGS=""

LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(!distcc color !ccache check !sign)
#  A negated environment option will do the opposite of the comments below.
#
#-- distcc:  Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:  Use ccache to cache compilation
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:    Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#  These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
#  A negated option will do the opposite of the comments below.
#
#-- strip:      Strip symbols from binaries/libraries
#-- docs:      Save doc directories specified by DOC_DIRS
#-- libtool:    Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs:  Leave empty directories in packages
#-- zipman:    Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:      Remove files specified by PURGE_TARGETS
#-- upx:        Compress binary executable files using UPX
#-- optipng:    Optimize PNG images with optipng
#-- debug:      Add debugging flags as specified in DEBUG_* variables
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
#          doing.
#
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'

# vim: set ft=sh ts=2 sw=2 et:

Then I saved the https://aur.archlinux.org/cgit/aur.git/snapshot/otter-browser.tar.gz from the AUR, extracted it, and I also modified the PKGBUILD by adding: options=(debug !strip) at the beginning.

Code: [Select]
# Maintainer: Steffen Weber <-boenki-gmx-de->

pkgname=otter-browser
pkgver=0.9.12
pkgrel=1
pkgdesc="Browser aiming to recreate classic Opera (12.x) UI using Qt5."
arch=('i686' 'x86_64')
url="http://$pkgname.org"
license=('GPL3')
depends=('qt5-multimedia' 'qt5-webkit' 'hicolor-icon-theme' 'desktop-file-utils' 'hunspell')
makedepends=('cmake' 'qt5-tools')
conflicts=('otter-browser-git')
source=($pkgname-$pkgver.tar.gz::https://github.com/OtterBrowser/$pkgname/archive/v$pkgver.tar.gz)
md5sums=('a9a141506f1ae428b21d69048840621f')
options=(debug !strip)

build() {
  cd $pkgname-$pkgver
  lrelease resources/translations/*.ts
  cmake -DCMAKE_INSTALL_PREFIX="/usr"
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR=$pkgdir install
}

Then I invoked makepkg -s --config ./makepkg.conf, I hope after the compilation the resulting binary will contain the debugging informations.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-08, 17:08:35
The trace.log after all:

Code: [Select]
Starting program: /usr/bin/otter-browser 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0xa5908b40 (LWP 5420)]
[New Thread 0xa4b43b40 (LWP 5421)]
[New Thread 0xa2d4fb40 (LWP 5422)]
[New Thread 0xa254eb40 (LWP 5423)]

Thread 1 "otter-browser" received signal SIGILL, Illegal instruction.
0xb2d729b9 in ?? () from /usr/lib/libQt5WebEngineCore.so.5
Already logging to trace.log.

Thread 5 (Thread 0xa254eb40 (LWP 5423)):
#0  0xb7fdacd9 in __kernel_vsyscall ()
#1  0xacffe15f in poll () at /usr/lib/libc.so.6
#2  0xac855f70 in g_poll () at /usr/lib/libglib-2.0.so.0
#3  0xac84650c in  () at /usr/lib/libglib-2.0.so.0
#4  0xac846929 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#5  0xa99dcdc5 in  () at /usr/lib/libgio-2.0.so.0
#6  0xac86e59a in  () at /usr/lib/libglib-2.0.so.0
#7  0xaca65301 in start_thread () at /usr/lib/libpthread.so.0
#8  0xad0080ae in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0xa2d4fb40 (LWP 5422)):
#0  0xb7fdacd9 in __kernel_vsyscall ()
#1  0xacffe15f in poll () at /usr/lib/libc.so.6
#2  0xac855f70 in g_poll () at /usr/lib/libglib-2.0.so.0
#3  0xac84650c in  () at /usr/lib/libglib-2.0.so.0
#4  0xac846644 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0xac8466a0 in  () at /usr/lib/libglib-2.0.so.0
#6  0xac86e59a in  () at /usr/lib/libglib-2.0.so.0
#7  0xaca65301 in start_thread () at /usr/lib/libpthread.so.0
#8  0xad0080ae in clone () at /usr/lib/libc.so.6

Quit
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-08, 17:18:43
@konstantin, huh, apparently you have QtWebEngine (Blink based library) installed and it's causing crash (we support two web backends).

You need to rebuild without it, either add -DENABLE_QTWEBENGINE=No to cmake call in PKGBUILD or simply uninstall QtWebEngine from your system (it won't work anyway) and then rebuild otter-browser package.

That doesn't guarantee that it will work now but at least QtWebEngine won't interfere.
If you will still get crash then try again setting variables and post new backtrace.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-08, 19:25:18
Man, it works now! Otter-browser compiled without QtWebEngine starts fine on an AMD Athlon XP without SSE2.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-08, 19:30:44
@konstantin, that's great. :-)
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-08, 19:54:40
Yes, but it unfortunately crashes again when I try to login into facebook.

Second trace.log (it crashed before I clicked on login button)

Code: [Select]
Starting program: /usr/bin/otter-browser 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0xaf3d0b40 (LWP 10263)]
[New Thread 0xae58cb40 (LWP 10264)]
[New Thread 0xacd63b40 (LWP 10265)]
[New Thread 0xac562b40 (LWP 10266)]
[New Thread 0xab997b40 (LWP 10267)]
[New Thread 0xaa1ffb40 (LWP 10268)]
[New Thread 0xa99feb40 (LWP 10269)]
[New Thread 0xa8dffb40 (LWP 10274)]
[New Thread 0xa85feb40 (LWP 10275)]
[New Thread 0xa7b47b40 (LWP 10276)]
[New Thread 0xa5fffb40 (LWP 10277)]
[New Thread 0xa4fffb40 (LWP 10278)]

Thread 1 "otter-browser" received signal SIGILL, Illegal instruction.
0xaa8a75a1 in ?? ()

Thread 13 (Thread 0xa4fffb40 (LWP 10278)):
#0  0xb7fdacd9 in __kernel_vsyscall ()
#1  0xb3387c8b in pthread_cond_wait@@GLIBC_2.3.2 ()
    at /usr/lib/libpthread.so.0
#2  0xb365ff4e in __gthread_cond_wait (__mutex=<optimized out>, __cond=0xa55632dc)
    at /build/gcc/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/gthr-default.h:864
        __e = <optimized out>
#3  0xb365ff4e in std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=0xa55632dc, __lock=...)
    at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
        __e = <optimized out>
#4  0xb4c31dd8 in WTF::ParkingLot::parkConditionally(void const*, std::function<bool ()>, std::function<void ()>, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > >) () at /usr/lib/libQt5WebKit.so.5
#5  0xb458811d in  () at /usr/lib/libQt5WebKit.so.5
#6  0xb4c34d70 in  () at /usr/lib/libQt5WebKit.so.5
#7  0xb4c610f9 in  () at /usr/lib/libQt5WebKit.so.5
#8  0xb3382301 in start_thread () at /usr/lib/libpthread.so.0
#9  0xb34820ae in clone () at /usr/lib/libc.so.6
Quit

Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-08, 20:39:00
@konstantin, have you tried these variables?
Try reproducing with one of them set.

Also there is hint for attempting to produce better backtrace:
Quote
<annulen|home> it may help to print disasm of current function after gdb stops on crash

BTW, if you are using Freenode then you can ask directly on #qtwebkit, that should make this debugging a bit faster. ;-)
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-08, 21:04:45
I tried out "export JSC_useJIT=0" and now I was able to login into facebook.
But sorry, I don't know what is Freenode.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-08, 21:41:13
@konstantin, OK, there is some more testing to be done apparently:
Quote
<annulen|home> try JSC_useDFGJIT=0 instead of JSC_useJIT
<annulen|home> make sure that JSC_useJIT is not set or set to non-null

Freenode provides IRC service, QtWebKit devs hang out on #qtwebkit channel there.

Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-09, 07:57:23
I tried now "JSC_useDFGJIT=0", but after a few minutes of facebook browsing it crashed soon.
Yesterday testing  "JSC_useJIT=0" seemd to be stable, no crash for about two hour of browsing.

Anyway I am testing "otter-browser-0.9.12". Handy little browser, performance is quite acceptable on this 16 years old PC especially compared to Firefox. I used Opera 43 recently, till my other PC which was SSE2 capable run down.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-09, 08:05:23
@konstantin, we will be able to debug it better in more interactive mode. :-P
If you don't have IRC client around then you can try web client (using another instance of browser), like:
http://irc.lc/freenode/qtwebkit
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Freeman on 2017-03-09, 09:45:23
@konstantin, OK, there is some more testing to be done apparently:
Quote
<annulen|home> try JSC_useDFGJIT=0 instead of JSC_useJIT
<annulen|home> make sure that JSC_useJIT is not set or set to non-null
Are they namesakes, or this is just trolling?  ??? Because annulen is also Konstantin.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-09, 09:47:41
@Freeman, I don't think that's such rare name. ;-)
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-09, 10:37:45
An interesting error came to light: when I try to save a file which name contains an apostrophe character, and it is passed by "Content-disposition: attachment; filename="A & # 3 9;B.txt;" the filename will be chunked after the & sign.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-09, 10:39:34
@konstantin, OK, there is some more testing to be done apparently:
Quote
<annulen|home> try JSC_useDFGJIT=0 instead of JSC_useJIT
<annulen|home> make sure that JSC_useJIT is not set or set to non-null
Are they namesakes, or this is just trolling?  ??? Because annulen is also Konstantin.

No, I live in Hungary, and the english / latin equivalent of my name is accidentally Konstantin, that's all.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-09, 11:05:20
@konstantin, lets focus on original first (crashes), the latter is probably unrelated to QtWebKit anyway (but will need research anyway).
Now it's the right time to visit IRC channel, QtWebKit maintainer is online.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: konstantin on 2017-03-09, 13:26:31
Another crash after a few hours of browsing:
Code: [Select]
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory

** (otter-browser:5189): CRITICAL **: file gstaudioringbuffer.c: line 1993 (gst_audio_ring_buffer_set_channel_positions): should not be reached
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: Emdek on 2017-03-09, 14:03:01
@konstantin, well, obviously you ran out of memory, I'm assuming that you don't have much RAM on that machine.
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: filip on 2017-03-14, 01:16:24
Yesterday testing  "JSC_useJIT=0" seemd to be stable, no crash for about two hour of browsing.
As far as I understanded the thread states that "libqt5webkit5" package should be recompiled from source by adding some compile rules:
@konstantin
Unless you're getting "Illegal intruction" error even with "JSC_useJIT=0", you probably don't need to recompile webkit, since it's JIT that triggers it.
Of course, given that "JSC_useJIT=0" is actually the same as a rebuild with JIT disabled.

I'd test it, however my Athlon box has been retired ( PSU died  :irked:  ), shortly after I wrote that guide (https://thedndsanctuary.eu/index.php?topic=1505.0).

By the way, these C/CXX flags set in "makepkg.conf" should be correct/appropriate for your Athlon:
Code: [Select]
CFLAGS="-march=native -O2 -mfpmath=sse -mno-sse2 -pipe -fstack-protector-strong"
CXXFLAGS="-march=native -O2 -mfpmath=sse -mno-sse2 -pipe -fstack-protector-strong"
:)
Title: Re: Compile Otter Browser for Athlon XP processor (without SSE2) in Arch Linux
Post by: noabody on 2019-02-03, 13:58:06
I have an old AMD K7 "Barton" computer.  After finding this forum, I put 32-bit Xubuntu 18.04.1 on it and am happy to report that otter-browser works as well as noted.

I can confirm JSC_useJIT=0 otter-browser has the same effect as disabling JIT in qtwebkit.  The options are:

Code: [Select]
    JSC_useJIT=0 - try running JS in interpreted-only mode, no compilation
    JSC_useLLInt=0 - avoid using interpreter, use only JIT
    JSC_useDFGJIT=0 - disable DFG and FTL tiers of JIT, leaving only baseline JIT
    JSC_useFTLJIT=0 - disable FTL JIT (only makes sense if it is enabled in your build; FTL is not available on 32-bit platforms and on Windows)

A command like...
Code: [Select]
(grep -Pi 'jsc_usejit' "$HOME/.profile") || echo "export JSC_useJIT=0" >> "$HOME/.profile"

var="JSC_useJIT" ; val="0" ; (grep -Pi "$var" "$HOME/.profile") && perl -pi -e "s|(.*$var)=.*|\\1=$val|gi" "$HOME/.profile" || echo "export $var=$val" >> "$HOME/.profile"
... will add (or modify) Ubuntu's global environment variable in .profile.

For the sake of curiosity, I decided to build a non-JIT qtwebkit-opensource-src, in a 32-bit Ubuntu LXC, with this change to debian/rules:
Code: [Select]
# JIT is only supported on x86 / armhf / aarch64 / mips32
ifeq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel))
 EXTRA_CMAKE_ARGUMENTS += -DENABLE_JIT=OFF
endif
Code: [Select]
# JIT is only supported on x86 / armhf / aarch64 / mips32
 EXTRA_CMAKE_ARGUMENTS += -DENABLE_JIT=OFF

This ensures the library is built with JIT disabled. The build process is typical:
Code: [Select]
sudo apt build-dep qtwebkit-opensource-src
apt source qtwebkit-opensource-src
cd qtwebkit-opensource-src-5.212.0~alpha2
(change debian/rules as noted)
dch -i (ctrl+x)
DEB_BUILD_OPTIONS="nocheck notest nodocs parallel=4" debuild -d -b -uc -us -nc -j4
cd ..
sudo dpkg -i libqt5webkit5_5.212.0~alpha2-7ubuntu1_i386.deb

otter-browser didn't build on Ubuntu 18.04.1 without a minor edit to CMakeLists.txt.
Code: [Select]
find_package(Qt5WebEngineWidgets 5.9.0 QUIET)
Then, to build:
Code: [Select]
sudo apt install libhunspell-dev libqt5core5a libqt5dbus5 libqt5gui5 libqt5multimedia5 libqt5network5 libqt5printsupport5 libqt5qml5 libqt5svg5-dev libqt5webenginewidgets5 libqt5webkit5-dev libqt5widgets5 libqt5xmlpatterns5 libqt5xmlpatterns5-dev qt5-default qtmultimedia5-dev qttools5-dev qttools5-dev-tools qtwebengine5-dev
git clone --branch master --depth 1 --recursive https://github.com/OtterBrowser/otter-browser.git
cd otter-browser
(mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_QTWEBENGINE=OFF -DCMAKE_INSTALL_PREFIX=/usr ..)
make -C build -j4
sudo checkinstall make -C build install

The package maintainer's version of checkinstall seg-faults and requires a hybrid patch, based on the working git and debian sources.  You can find it at checkinstall debian patch (https://raw.githubusercontent.com/noabody/unibuild/master/data/checkinst.patch)

The noted dependencies and instructions are provided to help save time for those interested in building otter from source (modified qtwebkit unneeded).  The better bet is to use a pre-built i386 package from Otter Browser Ubuntu PPA (https://launchpad.net/~otter-browser)

Even with JIT disabled, some websites can still cause otter-browser to hang.  For those that do, use "Tools > Preferences > Advanced > Content".  Under "Website Preferences > Add > Website" use the smallest portion of the URL required to identify the site, e.g. "launchpad.net".  On the "Scripting" tab, "Override Enable JavaScript" which should disable it.  These problem websites cause JavaScript issues in all browsers, not just otter.

Eventually, I was able to get both otter-browser and midori to work.  Xubuntu installer warns the processor doesn't support LFENCE for spectre v2 patch, and falls back to retpoline.  Not surprising since LFENCE is an SSE2 instruction.

Having used otter a bit I can say with confidence that it is the finest browser one could hope for on an old non-SSE2 PC running Linux.