Skip to main content

Topic: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC. (Read 3981 times)

  • mpjs
  • [*]
Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
I am having problem with Lubuntu deb. packages. The release is most likely done for too modern hardware.
My old AMD Athlon XP(about year 2004)  prosessor doesn^t work work with this newest Otter-browser release.

So I am requisting deb. packages with support for older prosessors, like mine AMD Athlon XP + 2500.

I am really looking forward to use Otter, but at this time it is not working for me. :nervous:

  • Emdek
  • [*][*][*][*][*]
  • Moderator
Re: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
Reply #1
@mpjs, the main issue is that Qt is now (AFAIR since 5.3.0) by default compiled for processors that have SSE2 etc.
The best approach seems to be to find some distribution that targets such hardware or compile Qt and Otter from sources (it's not that hard, but compiling Qt might take more than 24 hours on older hardware).
Also AFAIK they no longer test if it is even possible to compile Qt using previous flags. :-/
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.

  • filip
  • [*]
Re: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
Reply #2
It seems that JIT is actually causing the problem with non sse2 CPUs.
In my case, rebuilding QT5 (v5.3.2 @Debian Jessie) with appropriate C(XX)FLAGS and some patches I've found @Fedora, solved the (illegal instruction) crash only on some sites.

However, today I've rebuilt qtwebkit with JIT disabled, and had zero crashes so far!  :happy:
If anybody cares, same applies to webkit gtk.

When I have enough time, I'll test on a clean install with default QT5 packages + qtwebkit built without JIT to confirm whether JIT is the only cause, or QT5 also needs rebuilding.

@mpjs & everybody:

I can help with/write a how-to on rebuilding .debs if wanted.
And ofc, provide Athlon XP optimized, v5.3.2 packages for Jessie ( which *might* install and work on Lubuntu, depending on the version ).  :)
  • Last Edit: 2015-11-15, 20:43:16 by filip

  • Emdek
  • [*][*][*][*][*]
  • Moderator
Re: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
Reply #3
@filip, that's great. :-)
I guess that it could be a good idea to add link to these patches to our wiki.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.

  • filip
  • [*]
Re: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
Reply #4

When I have enough time, I'll test on a clean install with default QT5 packages + qtwebkit built without JIT to confirm whether JIT is the only cause, or QT5 also needs rebuilding.


I've forgot I had a almost clean install of Jessie with KDE...  :irked:

Quick test on two sites that always caused a crash:
1. Default QT packages, including webkit = crash.
2. Default QT packages + webkit with JIT disabled = rock solid:up:

http://pastebin.com/KiPxUnHr

So it seems that disabling JIT in qtwebkit is all that is needed.
I'll be using Otter activelly in the following days, hopefully to confirm that.

@JIT:
From what I've read, it generates some SSE2 code during runtime, and if I understood corectly it cannot be disabled in any way other then disabling JIT itself.


@filip, that's great. :-)
I guess that it could be a good idea to add link to these patches to our wiki.

Great indeed.  :)
There's more life to be squeezed out of these old bangers, now that Otter runs stable on them.
Since it trumps Seamonkey, IMO the only full featured browser that is stable, maintained and usable in both performance and memory usage.  ;)

And btw, I must note that fitting 16 tabs in ~107MB's of RAM is quite an achievement.
So I'll use the occasion to say thank you to Emdek, and everyone involved for all the effort! It is much appreciated!  :cheers:

Back to them patches:

Debian bug report in which I've found them: https://lists.debian.org/debian-qt-kde/2015/08/msg00149.html
And the patch: http://pkgs.fedoraproject.org/cgit/qt5-qtdeclarative.git/tree/qtdeclarative-opensource-src-5.2.0-no_sse2.patch?h=f19

--------------------------

I'll write a short guide for rebuilding Debian package tomorow.
And to avoid untested assumptions based on debian/rules, I'll add a guide for building complete QT/qtwebkit-only from upstream sources as well, once I actually do it and verify steps required. :)

  • Frenzie
  • [*][*][*][*][*]
  • Administrator
Re: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
Reply #5
I'll write a short guide for rebuilding Debian package tomorow.

Also see https://github.com/Frenzie/otter-virtual-build-environment/blob/master/debian/scripts/build-otter-deb.sh and some of the other stuff around there.

  • filip
  • [*]
Re: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
Reply #6
Debian/Ubuntu guide for rebuilding qtwebkit packages with JIT disabled.

I'm assuming that you're building on the same machine on which packages are to be installed/used.
Which, atleast means 32bit Debian/Ubuntu, since all 64bit capable CPUs have SSE2 and do not require this.

If you want to cross compile packages on a 64bit installation, the best way to that is inside chroot ( IMO ).
See: https://wiki.debian.org/Schroot & https://wiki.ubuntu.com/SecurityTeam/BuildEnvironment

1. Make sure your system is up-to-date:
Code: [Select]
sudo apt-get update && sudo apt-get upgrade


2. Install build dependencies:
Code: [Select]
sudo apt-get build-dep libqt5webkit5


3. Install devscripts:
Code: [Select]
sudo apt-get install devscripts


4. Change to directory in which you want to build and get the source:
Code: [Select]
apt-get source libqt5webkit5


If that fails, you need to enable sources in /etc/apt/sources.list
For Debian, open that file with text editor as root and copy the "deb ..." line containing "main" somewhere towards the end. Once pasted, replace the "deb" in the begining with "deb-src".
In my case:
Code: [Select]
deb http://http.debian.net/debian/ jessie contrib non-free main
# becomes:
deb-src http://http.debian.net/debian/ jessie contrib non-free main


Save the file, and run:
Code: [Select]
sudo apt-get update
# and get the source:
apt-get source libqt5webkit5


It's the same process with Ubuntu, except that you need to copy/paste the line containing "universe".

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


If you wish to optimize the code for your CPU, and it happens to be an Athlon XP, append "-march=athlon-xp" in C(XX)FLAGS:

Code: [Select]
export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) -march=athlon-xp -mno-sse2
export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) -march=athlon-xp -mno-sse2


Otherwise, find your CPU on this list and use the appropriate -march flag: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#x86-Options
Or, if you're building on the same machine on which the packages are to be installed, you can use "-march=native".

6. Increase the packages version number, to avoid overwriting them during upgrade:

Code: [Select]
# cd to your_build_dir/qtwebkit-opensource-src-[version_numer] and run
dch -i


That will open an editor ( should default to "nano" ). Just save the file and exit ( Ctrl + O & Ctrl + X in nano ).
If you get an error about editor not being set, run:
Code: [Select]
EDITOR=/usr/bin/nano dch -i


7. Start the build:

Code: [Select]
dpkg-buildpackage -uc -us -jN
# where N is number of CPU cores


Depending on your machine, that will take some time.
In my case:
- Athlon XP 2400+ needs about 3 hours
- Xeon E5400 ( Core2Quad 9550 equivalent ) needs about 35 minutes, using four cores.

8. When complete, and if you don't plan to compile Otter, just install "libqt5webkit5" package:
Code: [Select]
sudo dpkg -i ../libqt5webkit5_5.3.2+dfsg-4.1_i386.deb


Otherwise, install -dev package as well:
Code: [Select]
sudo dpkg -i ../libqt5webkit5_5.3.2+dfsg-4.1_i386.deb ../libqt5webkit5-dev_5.3.2+dfsg-4.1_i386.deb


Obviously, correct version numbers in pkg names, if different.  :)

DONE!  :cheers:





I'll write a short guide for rebuilding Debian package tomorow.

Also see https://github.com/Frenzie/otter-virtual-build-environment/blob/master/debian/scripts/build-otter-deb.sh and some of the other stuff around there.


Thanks.  :up:

However, I' using my own script, for quickly building native arch optimized packages from latest git, without much fiddling for different machines: http://pastebin.com/94pD7tw9

I just unpack debian files, install build deps, and let it build...  :D

:)

  • Frenzie
  • [*][*][*][*][*]
  • Administrator
Re: Otter deb. for Lubuntu with old processors, like AMD Athlon XP, ETC.
Reply #7
However, I' using my own script, for quickly building native arch optimized packages from latest git, without much fiddling for different machines: http://pastebin.com/94pD7tw9

The major thing I worked on in that script is creating proper (actually proper) Debian source packages. :)

The whole virtual machine part is just so you can set up the same build environment anywhere without any effort. The relevant scripts'll run fine locally.