Bug 17201 - clanlib requires SSE2 but it is disabled at compile time
Summary: clanlib requires SSE2 but it is disabled at compile time
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: i586 Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-32-OK MGA5-64-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2015-11-22 12:40 CET by José Jorge
Modified: 2015-11-28 00:12 CET (History)
4 users (show)

See Also:
Source RPM: clanlib-2.3.7-2.1.mga5
CVE:
Status comment:


Attachments

Description José Jorge 2015-11-22 12:40:54 CET
Launching a clanlib app like openalchemist fails on i586 :
- if hardware has SSE2 it stops asking to enable it at compile time
- if hardware has no SSE2 supports it stops  requiring a SSE2 cpu.
José Jorge 2015-11-22 12:41:13 CET

Assignee: bugsquad => qa-bugs
CC: (none) => lists.jjorge

Comment 1 José Jorge 2015-11-22 12:41:52 CET
I will enable SSE2 on i586 for now, as it will at least allow to run clanlib apps on SSE2 cpus.

Status: NEW => ASSIGNED

Comment 2 José Jorge 2015-11-22 12:47:24 CET
I have uploaded a patched package for Mageia 5.

You can test this by launching openalchemist on a i586 SSE2 system : it will fail before this update, succeed after.

Suggested advisory:
========================

Updated clanlib package fix usage on 32 bit systems : it needs a SSE2 cpu.

========================

Updated packages in core/updates_testing:
========================
lib64clanlib2.3_1-2.3.7-2.1.mga5.x86_64.rpm
lib64clanlib2.3-devel-2.3.7-2.1.mga5.x86_64.rpm
clanlib-docs-2.3.7-2.1.mga5.noarch.rpm

Source RPMs: 
clanlib-2.3.7-2.1.mga5
Comment 3 Len Lawrence 2015-11-22 19:37:22 CET
mga5  x86_64  Mate

CPU supports SSE2 and the flag is on.

Checked openalchemist.  Already installed and running normally before the update.
After the update it opened as expected.  Played one game and retired.

mga5  i586 in vbox  Mate
SSE2 was reported by harddrake2 for the CPU.

Fumbled this.  Had to install openalchemist but forgot to run the rehash command at the command line so it gave a command not found message which I assumed meant failure.

Installed the updates and tried openalchemist; command not found again.
$ rehash
The interface launched OK albeit with these messages:
libGL error: pci id for fd 11: 80ee:beef, driver (null)
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo

These messages also appeared with
$ openalchemist --opengl
and
$ openalchemist --opengl2
but not with
$ openalchemist --software
as might be expected.
However, the game runs fine with any or none of these options.

Adding the OKs for both architectures.

CC: (none) => tarazed25

Len Lawrence 2015-11-22 19:38:14 CET

Whiteboard: (none) => MGA5-32-OK MGA5-64-OK

Comment 4 David Walser 2015-11-23 20:19:34 CET
Are we sure this doesn't break on CPUs that don't support SSE2?
Comment 5 Len Lawrence 2015-11-23 21:02:53 CET
I have no idea.  I would have to check my other five machines for SSE2 compatibility.
Comment 6 José Jorge 2015-11-24 07:28:56 CET
(In reply to David Walser from comment #4)
> Are we sure this doesn't break on CPUs that don't support SSE2?

My first comment : if hardware has no SSE2 supports it stops  requiring a SSE2 cpu. So it is already broken for SSE2 less cpus, and that will not change.
Comment 7 David Walser 2015-11-24 13:25:51 CET
(In reply to José Jorge from comment #6)
> (In reply to David Walser from comment #4)
> > Are we sure this doesn't break on CPUs that don't support SSE2?
> 
> My first comment : if hardware has no SSE2 supports it stops  requiring a
> SSE2 cpu. So it is already broken for SSE2 less cpus, and that will not
> change.

Maybe openalchemist does, but that doesn't mean all clanlib apps will be that way.

I can imagine that SSE2 was disabled on i586 for a reason; we can't count on support being available (whereas on x86_64, we can).

I believe our loader has the ability to load SSE2-enabled libs in /lib/sse2 if it is available and non-SSE2 ones from /lib otherwise.  If you haven't built it this way, it's probably wrong.

Whiteboard: MGA5-32-OK MGA5-64-OK => MGA5-32-OK MGA5-64-OK feedback

Comment 8 José Jorge 2015-11-24 20:29:06 CET
(In reply to David Walser from comment #7)
> I can imagine that SSE2 was disabled on i586 for a reason; we can't count on
> support being available (whereas on x86_64, we can).

Yes, it was disabled because there was a build time option. But it appears this option is bugged.

> 
> I believe our loader has the ability to load SSE2-enabled libs in /lib/sse2
> if it is available and non-SSE2 ones from /lib otherwise.  If you haven't
> built it this way, it's probably wrong.

This patch only fixes the case you have a SSE2 cpu. When you have a SSE2-less cpu it DID NOT WORK and it will STILL NOT WORK.
Comment 9 David Walser 2015-11-24 21:21:56 CET
(In reply to José Jorge from comment #8)
> This patch only fixes the case you have a SSE2 cpu. When you have a
> SSE2-less cpu it DID NOT WORK and it will STILL NOT WORK.

Again, as I said, that may be the case for openalchemist, but not necessarily for ALL APPS using clanlib.
Comment 10 José Jorge 2015-11-25 16:08:02 CET
urpmq --whatrequires clanlib2 -y says we only package openalchemist ... please push this update now is it validated in both archs.

Whiteboard: MGA5-32-OK MGA5-64-OK feedback => MGA5-32-OK MGA5-64-OK

Comment 11 Len Lawrence 2015-11-25 16:36:15 CET
OK, validating right now.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 12 claire robinson 2015-11-25 16:49:23 CET
Confirmed this shouldn't affect other packages, at least with requires. Uncertain for buildrequires. Has this been checked too?

Tested OK mga5 32 otherwise

$ urpmq --whatrequires-recursive libclanlib2.3_1
libclanlib2.3-devel
libclanlib2.3_1
openalchemist

Before
------
$ openalchemist
Can't create /home/claire/.openalchemist/preferences-0.4-svn.ini.
Exception caught:
Sorry, this compiled clanSWRender does not support SSE2, but your CPU does support SSE2. (Update clanSWRender to contain SSE2)
--------------------
Stack Trace:
CL_System::capture_stack_trace(int, int, void**, unsigned int*) (/lib/libclan23Core-2.3.so.1)
CL_Exception::CL_Exception(CL_String8 const&) (/lib/libclan23Core-2.3.so.1)
CL_SetupSWRender::CL_SetupSWRender() (/lib/libclan23SWRender-2.3.so.1)
 (openalchemist)
 (openalchemist)
 (openalchemist)
main (/lib/libclan23App-2.3.so.1)
__libc_start_main (/lib/i686/libc.so.6)
 (openalchemist)


After
-----
$ openalchemist
Can't access to /home/clairer/.openalchemist/preferences-0.4-svn.ini.
Can't read highscores file. Probably doesn't exist. 
Error while reading /home/clairer/.openalchemist/skins-0.4-svn file, probably doesn't exist yet.

Starting after this shows no warnings.
Comment 13 David Walser 2015-11-25 19:58:51 CET
Hopefully we won't have additional packages using clanlib in the future (or users who have their own locally compiled apps using it).  I don't believe that this was done correctly.
Dave Hodgins 2015-11-27 22:23:37 CET

Whiteboard: MGA5-32-OK MGA5-64-OK => MGA5-32-OK MGA5-64-OK advisory
CC: (none) => davidwhodgins

Comment 14 claire robinson 2015-11-27 23:06:28 CET
It could certainly impact future packages. It could be raised on dev ML for discussion, there may be a better fix we can implement. For now though, we can say that this causes no regressions, at least with our current packages.

Source RPM: (none) => clanlib-2.3.7-2.1.mga5

Comment 15 Mageia Robot 2015-11-28 00:12:00 CET
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0190.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.