1
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 ), shortly after I wrote that guide.
By the way, these C/CXX flags set in "makepkg.conf" should be correct/appropriate for your Athlon:
CFLAGS="-march=native -O2 -mfpmath=sse -mno-sse2 -pipe -fstack-protector-strong"
CXXFLAGS="-march=native -O2 -mfpmath=sse -mno-sse2 -pipe -fstack-protector-strong"
2
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:
sudo apt-get update && sudo apt-get upgrade
2. Install build dependencies:
sudo apt-get build-dep libqt5webkit5
3. Install devscripts:
sudo apt-get install devscripts
4. Change to directory in which you want to build and get the source:
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:
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:
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.
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:
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:
# 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:
EDITOR=/usr/bin/nano dch -i
7. Start the build:
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:
sudo dpkg -i ../libqt5webkit5_5.3.2+dfsg-4.1_i386.deb
Otherwise, install -dev package as well:
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!
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.
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...