Bug 180902 - libXvMCW looks for config file in the wrong place
libXvMCW looks for config file in the wrong place
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: libXvMC (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
:
Depends On:
Blocks: FC5Blocker
  Show dependency treegraph
 
Reported: 2006-02-10 09:10 EST by Dominik 'Rathann' Mierzejewski
Modified: 2013-01-09 22:41 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-22 02:59:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dominik 'Rathann' Mierzejewski 2006-02-10 09:10:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.0.1) Gecko/20060208 Fedora/1.5.0.1-2.1 Firefox/1.5.0.1

Description of problem:
strace -f -eopen mplayer -vo xvmc -vc ffmpeg12mc file.vob
[...]
VO: [xvmc] 720x576 => 1024x576 MPEG1/2 Motion Compensation and IDCT
vo_xvmc: Port 244 grabed
vo_xvmc: Found matching surface with id=54434449 on 244 port at 0 adapter
open("XConfigDir/XvMCConfig", O_RDONLY) = -1 ENOENT (No such file or directory)
XvMCWrapper: Could not open config file "XConfigDir/XvMCConfig".
XvMCWrapper: No such file or directory
vo_xvmc: XvMCCreateContext failed with error 2
FATAL: Cannot initialize video driver.
[...]

creating ./XConfigDir/XvMCConfig
with proper content, i.e. 
libXvMCNVIDIA_dynamic.so.1
or symlinking from the location mentioned by the docs (/etc/X11/XvMCConfig) makes it work (same command):
[...]
VO: [xvmc] 720x576 => 1024x576 MPEG1/2 Motion Compensation and IDCT
vo_xvmc: Port 244 grabed
vo_xvmc: Found matching surface with id=54434449 on 244 port at 0 adapter
open("XConfigDir/XvMCConfig", O_RDONLY) = 6
open("/etc/ld.so.cache", O_RDONLY)      = 6
open("/usr/lib/nvidia/libXvMCNVIDIA_dynamic.so.1", O_RDONLY) = 6
open("/dev/nvidiactl", O_RDWR|O_LARGEFILE) = 6
open("/dev/nvidia0", O_RDWR|O_LARGEFILE) = 7
vo_xvmc: Allocated Direct Context
vo_xvmc: data_blocks allocated
vo_xvmc: mv_blocks allocated
vo_xvmc: Motion Compensation context allocated - 8 surfaces
[...]

Here's a quick & dirty patch to fix that:
--- libXvMC-1.0.1/src/Makefile.in.path  2005-12-21 08:18:14.000000000 +0100
+++ libXvMC-1.0.1/src/Makefile.in       2006-02-10 15:10:56.000000000 +0100
@@ -158,7 +158,7 @@
 libXvMCW_la_LIBADD = @XVMC_LIBS@
 libXvMCW_la_CFLAGS = \
        $(AM_CFLAGS)                            \
-       -DXVMC_CONFIGDIR=XConfigDir             \
+       -DXVMC_CONFIGDIR=\"/etc/X11\"           \
        -DXVMC_SOVERSION=\".1.0\"               \
        -DXV_SOVERSION=\".1.0\"


Version-Release number of selected component (if applicable):
libXvMC-1.0.1-2

How reproducible:
Always

Steps to Reproduce:
On a XvMC-capable hardware (i.e. i810, nVidia GF2+)
1. install libXvMC-devel
2. build MPlayer with --with-xvmclib=libXvMCW
3. run mplayer -vo xvmc -vc ffmpeg12mc anyfile.mpeg


Actual Results:  XvMCW fails find its config file and fails to initialize.

Expected Results:  XvMCW should find it's config file and work properly.

Additional info:
Comment 1 Dominik 'Rathann' Mierzejewski 2006-02-10 09:24:08 EST
Fixed patch (without the quotes). ^_^

--- libXvMC-1.0.1/src/Makefile.in.path  2005-12-21 08:18:14.000000000 +0100
+++ libXvMC-1.0.1/src/Makefile.in       2006-02-10 15:10:56.000000000 +0100
@@ -158,7 +158,7 @@
 libXvMCW_la_LIBADD = @XVMC_LIBS@
 libXvMCW_la_CFLAGS = \
        $(AM_CFLAGS)                            \
-       -DXVMC_CONFIGDIR=XConfigDir             \
+       -DXVMC_CONFIGDIR=/etc/X11               \
        -DXVMC_SOVERSION=\".1.0\"               \
        -DXV_SOVERSION=\".1.0\"
Comment 2 Mike A. Harris 2006-02-10 17:29:34 EST
Thanks for the report.  The real problem seems to be that XConfigDir isn't
being properly defined.  Figuring out why that's occuring and fixing it is
probably the best solution to get integrated into upstream sources, assuming
it's not just a missing configure option.

Flagging as FC5Blocker as it's something that should be resolved before FC5.

Thanks again.
Comment 3 Mike A. Harris 2006-02-22 00:56:41 EST
I've reviewed the issue more closely, and indeed XConfigDir isn't getting
defined.  It appears that whoever migrated XvMC from imake to autotools
did not complete the job or test it adequately.  XConfigDir is an imake
variable used in the monolithic tree.

I decided to go with the suggested patch from comment #1 above for the
time being as a quick workaround.  This requires using automake-1.7
and autoconf in the spec file for now as well.


Sanity testing of resulting binary:

[root@fc4i386 RPMS]# rpm -Uvh libXvMC-1.0.1-3.i386.rpm
libXvMC-devel-1.0.1-3.i386.rpm
Preparing...                ########################################### [100%]
   1:libXvMC                ########################################### [ 50%]
   2:libXvMC-devel          ########################################### [100%]
[root@fc4i386 RPMS]# strings /usr/lib/libXvMCW.so.1.0.0 |grep XvMCConfig
/etc/X11/XvMCConfig


The bug is now fixed in CVS, and packages built.  Request for the new
packages to be included in FC5 submitted to release engineering.  Once
the packages are accepted and moved into fc5, I'll update and close the
report.

Comment 4 Mike A. Harris 2006-02-22 02:59:01 EST
Approved and moved to dist-fc5

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