Bug 381999 - restore support of non-SSE2 CPUs
Summary: restore support of non-SSE2 CPUs
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VLO crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-04 21:09 UTC by 877lbi+8uenbc25t16q4
Modified: 2017-07-07 19:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 877lbi+8uenbc25t16q4 2017-07-04 21:09:14 UTC
When started on non-SSE2 machine (Pentium 3 ... in 2017 ... o_0 ;) it crashes with the message that it requires SSE2. It is marked as i386, but most i386 (and some i686) don't have SSE2 instruction set. I wonder why you have made such a restriction and if you can lift it?
Comment 1 Kevin Funk 2017-07-04 22:50:09 UTC
Which KDevelop version?
What's the exact wording of the error message?
And why do you work with a Pentium III, which is a ~15 year old processor?!

Needless to say, fixing this issue has the lowest possible importance for us. :)
Comment 2 87jl17+a0b25197ll9oo 2017-07-05 20:27:35 UTC
>Which KDevelop version?

kdevelop/zesty,now 4:5.0.4-0ubuntu2 i386
kdevelop-data/zesty,now 4:5.0.4-0ubuntu2 all
kdevelop-python/zesty,now 5.0.4-0ubuntu1 i386
kdevelop-python-data/zesty,now 5.0.4-0ubuntu1 all
plasma-kdevelop/zesty,now 4:5.0.4-0ubuntu2 i386

>What's the exact wording of the error message?

This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer
KCrash: crashing... crashRecursionCounter = 2

>And why do you work with a Pentium III, which is a ~15 year old processor?!

Because I have found that PC in ~~~tr~~~stash and want to make it work to put to my paranoid shelter where I'll be hidden during WW3, LoL :). One tasty bonus: no Intel ME and other backdoors (except CPU identifier, but it's seems to be disabled with microcode) embedded :). BTW: Mozilla Firefox works (WebGL of course doesn't because OpenGL < 2 means no shaders). Screen resolution makes my eyes hurt from the blur, the picture looks like shit (no DVI interface, only D-Sub), but these 17 yr old PC runs bleeding edge modern software. It's amazing!
Comment 3 Sven Brauch 2017-07-05 20:53:53 UTC
KDevelop doesn't explicitly require SSE2. Compile it without SSE2 support and I'm pretty sure it will work. We are not going to do that though, nor will Ubuntu or any other upstream probably. This is a compiler settings issue and not realted to our software.
Comment 4 Kevin Funk 2017-07-05 21:37:07 UTC
Okay, you got me curious. Indeed the issue can't be Qt5 (which I initially presumed it is), since on Ubuntu Zesty i386 it is in fact compiled without SSE2 support:

See build log:
https://launchpadlibrarian.net/305749426/buildlog_ubuntu-zesty-i386.qtbase-opensource-src_5.7.1+dfsg-2ubuntu4~1_BUILDING.txt.gz from https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/2454-deletedppa/+build/11985181

So feel free to investigate further -- I can imagine Clang/LLVM being the other possible cause.

Try to check which library KDevelop attempts to loads before crashing, e.g. by invoking this:
  LD_DEBUG=files kdevelop
Comment 5 Kevin Funk 2017-07-05 21:37:55 UTC
Further note: Please stop duplicating accounts for every reply. We'll lock this ticket down otherwise.
Comment 6 Kevin Funk 2017-07-05 21:58:58 UTC
Sorry, I should have googled the error message. KDevelop's Welcome Page is the one eventually requiring SSE2 support in your CPU.

You can disable loading the Welcome Page plugin via:
  KDEV_DISABLE_WELCOMEPAGE=1 kdevelop

Please report back if that works for you.
Comment 8 Kevin Funk 2017-07-05 22:57:45 UTC
Git commit 28e3b28829e192efd4cf39d460c7fed5f28df7ec by Kevin Funk.
Committed on 05/07/2017 at 22:57.
Pushed by kfunk into branch '5.1'.

WelcomePage: Don't load QML in some scenarios

There are a couple of distros which still provide x86 binaries with SSE2
support disabled to support older architectures. Let's not render
KDevelop useless on these platforms, this is easy enough to play along
with.

If one attempts to load QML on a processor without SSE2 support, the Qt
V8 engine by defaults just aborts the program.

Mitigate this by just not loading any QML in case the processor has no
SSE2 support.
FIXED-IN: 5.1.2
Ref T6462

M  +22   -2    plugins/welcomepage/welcomepageplugin.cpp

https://commits.kde.org/kdevplatform/28e3b28829e192efd4cf39d460c7fed5f28df7ec
Comment 9 87jl17+a0b25197ll9oo 2017-07-06 20:01:38 UTC
>You can disable loading the Welcome Page plugin via:
>  KDEV_DISABLE_WELCOMEPAGE=1 kdevelop

>Please report back if that works for you.

That works, thank you.

>Reference: http://lists.qt-project.org/pipermail/development/2013-December/014533.html

Hmm, now I know why sddm doesn't work.

>https://commits.kde.org/kdevplatform/28e3b28829e192efd4cf39d460c7fed5f28df7ec

Thank you much for the work! How about disabling it on runtime instead of compile time (some users of x64-capable CPUs still use 32-bit OS and apps because of lower memory requirements)?
Comment 10 Kevin Funk 2017-07-06 22:15:14 UTC
It's already done at runtime now, I've fixed up my own commit a couple of times already.

It now looks like this:
```
#if defined(Q_OS_LINUX) && (defined(Q_CC_GNU) || (defined(Q_CC_CLANG) && __clang_major__ >= 3 && __clang_minor__ >= 7))
    if (!__builtin_cpu_supports("sse2")) {
        qWarning() << "Welcome Page won't load any QML -- lacking SSE2 support on this processor";
        return nullptr;
    }
#endif
```
Comment 11 Kevin Funk 2017-07-06 22:17:50 UTC
SDDM is QML-based, too.

Anything with QML will just crash on your platform b/c Qt5Declarative initialization code is running into a qFatal(...) if it detects you don't have SSE2 support in your CPU. Debian and other distros actually have patched this out in Qt5Declarative.

See e.g.:
https://lists.debian.org/debian-qt-kde/2017/01/msg00008.html
Comment 12 87jl17+a0b25197ll9oo 2017-07-07 19:07:32 UTC
Thank you.