Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 393027 - app-admin/eselect-xvmc-0.3 doesn't detect available libs properly
Summary: app-admin/eselect-xvmc-0.3 doesn't detect available libs properly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christoph Junghans (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2011-12-03 16:02 UTC by Coacher
Modified: 2016-04-14 14:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Workaround patch. (ese,1.03 KB, patch)
2011-12-03 19:17 UTC, Coacher
Details | Diff
Workaround patch. (ese1,968 bytes, patch)
2011-12-03 19:21 UTC, Coacher
Details | Diff
quick hack to eselect intel-i915 XvMC (i915.patch,321 bytes, patch)
2012-10-02 22:52 UTC, Dave Armstrong
Details | Diff
patch to support libIntelXvMC (eselect-xvmc-0.3.eselect-libIntelXvMC.patch,393 bytes, patch)
2012-10-19 08:59 UTC, Christoph Junghans (RETIRED)
Details | Diff
eselect-xvmc-0.3.eselect (eselect-xvmc-0.3.eselect,3.81 KB, text/plain)
2013-01-10 12:24 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2011-12-03 16:02:22 UTC
eselect-xvmc-0.3 doesn't detect available libs properly, also option intel-i810 has a name intel-i815 which is insufficient mistake.

On my machine I have these libs:
ls -la /usr/lib/ | grep -i xvmc | grep -v ^l
-rwxr-xr-x   1 root root    47328 Ноя 27 16:06 libI810XvMC.so.1.0.0
-rwxr-xr-x   1 root root   409688 Ноя 27 16:06 libIntelXvMC.so.1.0.0
-rwxr-xr-x   1 root root    14224 Ноя 24 06:34 libxcb-xvmc.so.0.0.0
-rwxr-xr-x   1 root root    14472 Ноя 25 15:36 libXvMC.so.1.0.0
-rwxr-xr-x   1 root root    18320 Ноя 25 15:36 libXvMCW.so.1.0.0

However, eselect-xvmc shows me this:
eselect xvmc version
Version 20110829

eselect xvmc list
Available XvMC implementations  ( * is current ):
  [1]   xorg-x11
  [2]   intel-i815 *

Two bugs can be seen: incorrent naming for i810, completely ignored libIntelXvMC.so which should be listed as intel-i915

Reproducible: Always



Expected Results:  
intel-i915 option should be available
Comment 1 Coacher 2011-12-03 19:12:41 UTC
The problem is here in eselect-xvmc-0.3.eselect:
	for (( n = 0; n < ${#XVMCLIBS[@]}; ++n )); do
		[[ -e "${ROOT}/usr/lib/${XVMCLIBS[n]}" ]] && ret+=($n)
	done

It will fail for i915 because absolute path is used for it in XVMCLIBS.
Comment 2 Coacher 2011-12-03 19:17:59 UTC
Created attachment 294629 [details, diff]
Workaround patch.

Simple patch that just works for me.
Comment 3 Coacher 2011-12-03 19:21:57 UTC
Created attachment 294631 [details, diff]
Workaround patch.

Simple patch that just works for me. Fixed diff arguments.
Comment 4 Coacher 2012-07-02 17:44:14 UTC
Let me clarify this bug one more time:

Current `eselect-xvmc-0.3.eselect`'s implementation uses get_implementation_indices() function to get available XvMC implementations via searching for appropriate libs. It is searching for "/usr/lib/${XVMCLIBS[n]}" where XVMCLIBS entry for intel-i915 is "/usr/lib/libIntelXvMC.so", so for intel-i915 it would search for "/usr/lib/usr/lib/libIntelXvMC.so" which is incorrect.

On the other side i915 XvMC requires "/usr/lib/libIntelXvMC.so" to be presented in /etc/X11/XvMCConfig.

The proposed patch rename XVMCLIBS entry for intel-915 so get_implementation_indices() will find libs, but when it comes to writing to the /etc/X11/XvMCConfig we are adding "/usr/lib/libIntelXvMC.so" instead of plain "libIntelXvMC.so".

Please fix.
Comment 5 Dave Armstrong 2012-10-02 22:52:04 UTC
Created attachment 325556 [details, diff]
quick hack to eselect intel-i915 XvMC
Comment 6 Dave Armstrong 2012-10-02 23:01:57 UTC
I meant to include this comment with the patch:

Confirmed.  I'm suprised this bug is still around.

I too fixed my local config with a simple hack (see attached patch), which isn't a proper fix but meant to illustrate the problem in case there was some confusion.  My fix will only work until the the array indices change.  It's up to the maintainer to decicde on a permanent solution.
Comment 7 Christoph Junghans (RETIRED) gentoo-dev 2012-10-19 08:59:37 UTC
Created attachment 326912 [details, diff]
patch to support libIntelXvMC

Could that work as well?
Comment 8 Coacher 2012-10-19 09:21:53 UTC
(In reply to comment #7)
> Created attachment 326912 [details, diff] [details, diff]
> patch to support libIntelXvMC
> 
> Could that work as well?

Wow, it is super neat and elegant.
Comment 9 Christoph Junghans (RETIRED) gentoo-dev 2012-10-19 20:41:42 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Created attachment 326912 [details, diff] [details, diff] [details, diff]
> > patch to support libIntelXvMC
> > 
> > Could that work as well?
> 
> Wow, it is super neat and elegant.
@Ulm: can you please incorporate this change into the eselect repo as well.
Comment 10 Christoph Junghans (RETIRED) gentoo-dev 2012-11-17 03:33:45 UTC
@cardoe: ping
Comment 11 Coacher 2013-01-10 12:24:42 UTC
Created attachment 335056 [details]
eselect-xvmc-0.3.eselect

Proposed .eselect file, thanks to everyone who suggested patches above.

Here's the diff to the file currently in tree:
--- /usr/portage/app-admin/eselect-xvmc/files/eselect-xvmc-0.3.eselect  2011-08-30 01:02:02.000000000 +0400
+++ app-admin/eselect-xvmc/files/eselect-xvmc-0.3.eselect       2013-01-10 16:23:15.382414910 +0400
@@ -1,6 +1,5 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id: eselect-xvmc-0.3.eselect,v 1.1 2011/08/29 21:02:02 cardoe Exp $

 DESCRIPTION="Manage the XvMC implementation used by your system"
 MAINTAINER="cardoe@gentoo.org"
@@ -28,14 +27,14 @@
 "openchrome-pro"
 "unichrome"
 "unichrome-pro"
-"intel-i815"
-"intel-i915"
+"intel-i810"
+"intel-i915/i965"
 "ati" )

 get_implementation_indices() {
        local ret n
        for (( n = 0; n < ${#XVMCLIBS[@]}; ++n )); do
-               [[ -e "${ROOT}/usr/lib/${XVMCLIBS[n]}" ]] && ret+=($n)
+               [[ -e "${ROOT}/usr/lib/${XVMCLIBS[n]##*/}" ]] && ret+=($n)
        done

        echo ${ret[@]}

Once again, I ask somebody to merge this changes.
Comment 12 Christoph Junghans (RETIRED) gentoo-dev 2013-01-17 22:46:52 UTC
ping @ cardoe
Comment 13 Christoph Junghans (RETIRED) gentoo-dev 2013-03-11 14:36:51 UTC
+*eselect-xvmc-0.4 (11 Mar 2013)
+
+  11 Mar 2013; Christoph Junghans <ottxor@gentoo.org> +eselect-xvmc-0.4.ebuild,
+  +files/eselect-xvmc-0.4.eselect, metadata.xml:
+  version bump (fixes bugs #393027, #292120 and #434518)
Comment 14 Coacher 2013-03-12 21:54:15 UTC
Thank you, Christoph!