[mythtv-users] 0.27 configure script does not recognize OpenGL

Michael T. Dean mtdean at thirdcontact.com
Thu Jan 23 15:27:25 UTC 2014


On 01/23/2014 09:59 AM, Jean-Yves Avenard wrote:
> On 24 January 2014 01:47, Dan Littlejohn wrote:
>> I had the same error
>>
>>
>> # pkg-config --list-all | grep Qt | grep OpenGL | awk '{print $1}'
>> Variable 'exec_prefix' not defined in '/usr/lib/pkgconfig/libsasl2.pc'
>>
>> And that is owned by the package cyrus-sasl.  So I removed it (temporarily)
>> and the command returns OpenGL and Mythtv also configures correctly
>> recognizing OpenGL.
>>
>> I believe this is a Gentoo package problem and now I and trying upgrading
>> the packages on my box to see if that fixes it (ie emerge -uDvdN world)
> ohhhhh...
>
> of course, the pkg-config throws that error message, it's going to
> confuse like crazy the configure script ..
>
> not sure why I didn't see that before

pkg-config is /supposed/ to output errors on stderr and still output the 
requested info on stdout.

That's how it works on my system.  I created a broken libsasl2.pc in 
/tmp/pkgconfig and get:

$ PKG_CONFIG_PATH=/tmp/pkgconfig --list-all | grep Qt
QtDesignerComponents                Qtdesignercomponents - 
Qtdesignercomponents Library
QtGui                               Qtgui - Qtgui Library
QtSql                               Qtsql - Qtsql Library
QtWebKit                            Qtwebkit - Qtwebkit Library
Variable 'exec_prefix' not defined in '/tmp/pkgconfig/libsasl2.pc'
QtXmlPatterns                       Qtxmlpatterns - Qtxmlpatterns Library
QtNetwork                           Qtnetwork - Qtnetwork Library
QtScript                            Qtscript - Qtscript Library
QtTest                              Qttest - Qt Unit Testing Library

(Notice the error amid the stdout output.)

Also, from the pkg-config man page:
-----
        PKG_CONFIG_PATH
               A colon-separated  (on  Windows,  semicolon-separated)  
list  of
               directories to search for .pc files.  The default 
directory will
               always be searched after searching the path; the default 
is lib-
               dir/pkgconfig:datadir/pkgconfig where libdir is the 
libdir where
               pkg-config and datadir  is  the  datadir  where  
pkg-config  was
               installed.
-----
shows that it's using the specified path (and finding the error) 
/before/ it's looking in the standard path (where it finds the Qt 
stuff), so it's not just a matter of it working properly with the 
standard path (and outputting Qt-related info), then finding the error 
and exiting/failing/crashing/...

Does it really prevent any output from pkg-config on yours?  What 
version of pkg-config?  It sounds to me like a bug in pkg-config (and 
the broken libsasl2.pc, though it should be fixed, is simply triggering 
the pkg-config bug).  The pkg-config command is supposed to do its best 
to give the information requested, or else the entire development system 
is broken when /any/ package has a bad pkg-config file (and this happens 
/far/ more often than most probably realize).  That's a terrible design, 
so I hope it's not an intentional change to pkg-config.

If that's not the case--if pkg-config now refuses to work unless every 
single pc file is perfect--we're going to have a lot of people 
complaining about MythTV breakage when other programs are broken.

Mike


More information about the mythtv-users mailing list